mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-13 18:50:54 -04:00
Merge branch 'v9_10' of /proj/git/prod/bind9 into v9_10
This commit is contained in:
commit
b99f7bf9b7
11 changed files with 121 additions and 127 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
4044. [bug] Change 3955 was not complete, resulting in an assertion
|
||||
failure if the timing was just right. [RT #38352]
|
||||
|
||||
4039. [cleanup] Cleaned up warnings from gcc -Wshadow. [RT #37381]
|
||||
|
||||
4038. [bug] Add 'rpz' flag to node and use it to determine whether
|
||||
|
|
|
|||
|
|
@ -80,9 +80,10 @@ ns_paths_init(void) {
|
|||
static void
|
||||
version_check(const char *progname) {
|
||||
|
||||
if(isc_win32os_majorversion() < 5)
|
||||
if ((isc_win32os_versioncheck(4, 0, 0, 0) >= 0) &&
|
||||
(isc_win32os_versioncheck(5, 0, 0, 0) < 0))
|
||||
return; /* No problem with Version 4.0 */
|
||||
if(isc_win32os_versioncheck(5, 0, 2, 0) < 0)
|
||||
if (isc_win32os_versioncheck(5, 0, 2, 0) < 0)
|
||||
if (ntservice_isservice())
|
||||
NTReportError(progname, version_error);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -4982,16 +4982,16 @@ badresp:1,adberr:0,findfail:0,valfail:0]
|
|||
<optional> min-table-size <replaceable>number</replaceable> ; </optional>
|
||||
} ; </optional>
|
||||
<optional> response-policy {
|
||||
zone <replaceable>zone_name</replaceable> ;
|
||||
<optional> policy <replaceable>given | disabled | passthru | drop | nxdomain | nodata | cname</replaceable> <replaceable>domain</replaceable> </optional>
|
||||
<optional> recursive-only <replaceable>yes_or_no</replaceable> </optional>
|
||||
<optional> max-policy-ttl <replaceable>number</replaceable> ; </optional> ;
|
||||
}
|
||||
zone <replaceable>zone_name</replaceable>
|
||||
<optional> policy <replaceable>(given | disabled | passthru | drop |
|
||||
nxdomain | nodata | cname domain</replaceable>) </optional>
|
||||
<optional> recursive-only <replaceable>yes_or_no</replaceable> </optional>
|
||||
<optional> max-policy-ttl <replaceable>number</replaceable> </optional>
|
||||
<optional> break-dnssec <replaceable>yes_or_no</replaceable> </optional>
|
||||
<optional> min-ns-dots <replaceable>number</replaceable> </optional>
|
||||
<optional> qname-wait-recurse <replaceable>yes_or_no</replaceable> </optional> ; </optional>
|
||||
<optional> qname-wait-recurse <replaceable>yes_or_no</replaceable> </optional>
|
||||
; <optional>...</optional>
|
||||
} ; </optional>
|
||||
};
|
||||
</programlisting>
|
||||
|
||||
|
|
|
|||
|
|
@ -805,7 +805,9 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx,
|
|||
dns_fixedname_t fixed;
|
||||
const char *str;
|
||||
dns_name_t *name;
|
||||
#ifdef ISC_PLATFORM_USESIT
|
||||
isc_buffer_t b;
|
||||
#endif
|
||||
|
||||
static intervaltable intervals[] = {
|
||||
{ "cleaning-interval", 60, 28 * 24 * 60 }, /* 28 days */
|
||||
|
|
|
|||
|
|
@ -2378,7 +2378,6 @@ setnsec3parameters(dns_db_t *db, rbtdb_version_t *version) {
|
|||
unsigned int count, length;
|
||||
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db;
|
||||
|
||||
RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
|
||||
version->havensec3 = ISC_FALSE;
|
||||
node = rbtdb->origin_node;
|
||||
NODE_LOCK(&(rbtdb->node_locks[node->locknum].lock),
|
||||
|
|
@ -2455,7 +2454,6 @@ setnsec3parameters(dns_db_t *db, rbtdb_version_t *version) {
|
|||
unlock:
|
||||
NODE_UNLOCK(&(rbtdb->node_locks[node->locknum].lock),
|
||||
isc_rwlocktype_read);
|
||||
RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -2576,6 +2574,11 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
|
|||
cleanup_version->changed_list,
|
||||
link);
|
||||
}
|
||||
/*
|
||||
* Update the zone's secure status.
|
||||
*/
|
||||
if (!IS_CACHE(rbtdb))
|
||||
iszonesecure(db, version, rbtdb->origin_node);
|
||||
/*
|
||||
* Become the current version.
|
||||
*/
|
||||
|
|
@ -2654,12 +2657,6 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
|
|||
least_serial = rbtdb->least_serial;
|
||||
RBTDB_UNLOCK(&rbtdb->lock, isc_rwlocktype_write);
|
||||
|
||||
/*
|
||||
* Update the zone's secure status.
|
||||
*/
|
||||
if (writer && commit && !IS_CACHE(rbtdb))
|
||||
iszonesecure(db, version, rbtdb->origin_node);
|
||||
|
||||
if (cleanup_version != NULL) {
|
||||
INSIST(EMPTY(cleanup_version->changed_list));
|
||||
isc_mem_put(rbtdb->common.mctx, cleanup_version,
|
||||
|
|
|
|||
|
|
@ -154,8 +154,8 @@ isc_ratelimiter_enqueue(isc_ratelimiter_t *rl, isc_task_t *task,
|
|||
if (rl->state == isc_ratelimiter_ratelimited ||
|
||||
rl->state == isc_ratelimiter_stalled) {
|
||||
ev->ev_sender = task;
|
||||
ISC_LIST_APPEND(rl->pending, ev, ev_link);
|
||||
*eventp = NULL;
|
||||
ISC_LIST_APPEND(rl->pending, ev, ev_link);
|
||||
} else if (rl->state == isc_ratelimiter_idle) {
|
||||
result = isc_timer_reset(rl->timer, isc_timertype_ticker, NULL,
|
||||
&rl->interval, ISC_FALSE);
|
||||
|
|
@ -181,9 +181,10 @@ isc_ratelimiter_dequeue(isc_ratelimiter_t *rl, isc_event_t *event) {
|
|||
REQUIRE(event != NULL);
|
||||
|
||||
LOCK(&rl->lock);
|
||||
if (ISC_LINK_LINKED(event, ev_link))
|
||||
if (ISC_LINK_LINKED(event, ev_link)) {
|
||||
ISC_LIST_UNLINK(rl->pending, event, ev_link);
|
||||
else
|
||||
event->ev_sender = NULL;
|
||||
} else
|
||||
result = ISC_R_NOTFOUND;
|
||||
UNLOCK(&rl->lock);
|
||||
return (result);
|
||||
|
|
|
|||
|
|
@ -29,30 +29,6 @@ ISC_LANG_BEGINDECLS
|
|||
* be determined.
|
||||
*/
|
||||
|
||||
unsigned int
|
||||
isc_win32os_majorversion(void);
|
||||
/*
|
||||
* Major Version of the O/S.
|
||||
*/
|
||||
|
||||
unsigned int
|
||||
isc_win32os_minorversion(void);
|
||||
/*
|
||||
* Minor Version of the O/S.
|
||||
*/
|
||||
|
||||
unsigned int
|
||||
isc_win32os_servicepackmajor(void);
|
||||
/*
|
||||
* Major Version of the Service Pack for O/S.
|
||||
*/
|
||||
|
||||
unsigned int
|
||||
isc_win32os_servicepackminor(void);
|
||||
/*
|
||||
* Minor Version of the Service Pack for O/S.
|
||||
*/
|
||||
|
||||
int
|
||||
isc_win32os_versioncheck(unsigned int major, unsigned int minor,
|
||||
unsigned int updatemajor, unsigned int updateminor);
|
||||
|
|
|
|||
|
|
@ -729,10 +729,6 @@ isc_timermgr_destroy
|
|||
isc_timermgr_poke
|
||||
isc_tm_timegm
|
||||
isc_tm_strptime
|
||||
isc_win32os_majorversion
|
||||
isc_win32os_minorversion
|
||||
isc_win32os_servicepackmajor
|
||||
isc_win32os_servicepackminor
|
||||
isc_win32os_versioncheck
|
||||
openlog
|
||||
@IF PKCS11
|
||||
|
|
|
|||
|
|
@ -927,7 +927,7 @@ connection_reset_fix(SOCKET fd) {
|
|||
BOOL bNewBehavior = FALSE;
|
||||
DWORD status;
|
||||
|
||||
if (isc_win32os_majorversion() < 5)
|
||||
if (isc_win32os_versioncheck(5, 0, 0, 0) < 0)
|
||||
return (ISC_R_SUCCESS); /* NT 4.0 has no problem */
|
||||
|
||||
/* disable bad behavior using IOCTL: SIO_UDP_CONNRESET */
|
||||
|
|
|
|||
|
|
@ -15,88 +15,106 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: win32os.c,v 1.5 2007/06/19 23:47:19 tbox Exp $ */
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#ifndef TESTVERSION
|
||||
#include <isc/win32os.h>
|
||||
|
||||
static BOOL bInit = FALSE;
|
||||
static OSVERSIONINFOEX osVer;
|
||||
|
||||
static void
|
||||
initialize_action(void) {
|
||||
BOOL bSuccess;
|
||||
|
||||
if (bInit)
|
||||
return;
|
||||
/*
|
||||
* NOTE: VC++ 6.0 gets this function declaration wrong
|
||||
* so we compensate by casting the argument
|
||||
* NOTE: GetVersionEx() deprecated in Windows 8.1
|
||||
*/
|
||||
osVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
bSuccess = GetVersionEx((OSVERSIONINFO *) &osVer);
|
||||
|
||||
/*
|
||||
* Versions of NT before NT4.0 SP6 did not return the
|
||||
* extra info that the EX structure provides and returns
|
||||
* a failure so we need to retry with the old structure.
|
||||
*/
|
||||
if(!bSuccess) {
|
||||
osVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
(void)GetVersionEx((OSVERSIONINFO *) &osVer);
|
||||
}
|
||||
bInit = TRUE;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
isc_win32os_majorversion(void) {
|
||||
initialize_action();
|
||||
return ((unsigned int)osVer.dwMajorVersion);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
isc_win32os_minorversion(void) {
|
||||
initialize_action();
|
||||
return ((unsigned int)osVer.dwMinorVersion);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
isc_win32os_servicepackmajor(void) {
|
||||
initialize_action();
|
||||
return ((unsigned int)osVer.wServicePackMajor);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
isc_win32os_servicepackminor(void) {
|
||||
initialize_action();
|
||||
return ((unsigned int)osVer.wServicePackMinor);
|
||||
}
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
int
|
||||
isc_win32os_versioncheck(unsigned int major, unsigned int minor,
|
||||
unsigned int spmajor, unsigned int spminor) {
|
||||
unsigned int spmajor, unsigned int spminor)
|
||||
{
|
||||
OSVERSIONINFOEX osVer;
|
||||
DWORD typeMask;
|
||||
ULONGLONG conditionMask;
|
||||
|
||||
initialize_action();
|
||||
memset(&osVer, 0, sizeof(OSVERSIONINFOEX));
|
||||
osVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
typeMask = 0;
|
||||
conditionMask = 0;
|
||||
|
||||
if (major < isc_win32os_majorversion())
|
||||
/* Optimistic: likely greater */
|
||||
osVer.dwMajorVersion = major;
|
||||
typeMask |= VER_MAJORVERSION;
|
||||
conditionMask = VerSetConditionMask(conditionMask,
|
||||
VER_MAJORVERSION,
|
||||
VER_GREATER);
|
||||
osVer.dwMinorVersion = minor;
|
||||
typeMask |= VER_MINORVERSION;
|
||||
conditionMask = VerSetConditionMask(conditionMask,
|
||||
VER_MINORVERSION,
|
||||
VER_GREATER);
|
||||
osVer.wServicePackMajor = spmajor;
|
||||
typeMask |= VER_SERVICEPACKMAJOR;
|
||||
conditionMask = VerSetConditionMask(conditionMask,
|
||||
VER_SERVICEPACKMAJOR,
|
||||
VER_GREATER);
|
||||
osVer.wServicePackMinor = spminor;
|
||||
typeMask |= VER_SERVICEPACKMINOR;
|
||||
conditionMask = VerSetConditionMask(conditionMask,
|
||||
VER_SERVICEPACKMINOR,
|
||||
VER_GREATER);
|
||||
if (VerifyVersionInfo(&osVer, typeMask, conditionMask))
|
||||
return (1);
|
||||
if (major > isc_win32os_majorversion())
|
||||
return (-1);
|
||||
if (minor < isc_win32os_minorversion())
|
||||
return (1);
|
||||
if (minor > isc_win32os_minorversion())
|
||||
return (-1);
|
||||
if (spmajor < isc_win32os_servicepackmajor())
|
||||
return (1);
|
||||
if (spmajor > isc_win32os_servicepackmajor())
|
||||
return (-1);
|
||||
if (spminor < isc_win32os_servicepackminor())
|
||||
return (1);
|
||||
if (spminor > isc_win32os_servicepackminor())
|
||||
return (-1);
|
||||
|
||||
/* Exact */
|
||||
return (0);
|
||||
/* Failed: retry with equal */
|
||||
conditionMask = 0;
|
||||
conditionMask = VerSetConditionMask(conditionMask,
|
||||
VER_MAJORVERSION,
|
||||
VER_EQUAL);
|
||||
conditionMask = VerSetConditionMask(conditionMask,
|
||||
VER_MINORVERSION,
|
||||
VER_EQUAL);
|
||||
conditionMask = VerSetConditionMask(conditionMask,
|
||||
VER_SERVICEPACKMAJOR,
|
||||
VER_EQUAL);
|
||||
conditionMask = VerSetConditionMask(conditionMask,
|
||||
VER_SERVICEPACKMINOR,
|
||||
VER_EQUAL);
|
||||
if (VerifyVersionInfo(&osVer, typeMask, conditionMask))
|
||||
return (0);
|
||||
else
|
||||
return (-1);
|
||||
}
|
||||
|
||||
#ifdef TESTVERSION
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
unsigned int major = 0;
|
||||
unsigned int minor = 0;
|
||||
unsigned int spmajor = 0;
|
||||
unsigned int spminor = 0;
|
||||
int ret;
|
||||
|
||||
if (argc > 1) {
|
||||
--argc;
|
||||
++argv;
|
||||
major = (unsigned int) atoi(argv[0]);
|
||||
}
|
||||
if (argc > 1) {
|
||||
--argc;
|
||||
++argv;
|
||||
minor = (unsigned int) atoi(argv[0]);
|
||||
}
|
||||
if (argc > 1) {
|
||||
--argc;
|
||||
++argv;
|
||||
spmajor = (unsigned int) atoi(argv[0]);
|
||||
}
|
||||
if (argc > 1) {
|
||||
--argc;
|
||||
++argv;
|
||||
spminor = (unsigned int) atoi(argv[0]);
|
||||
}
|
||||
|
||||
ret = isc_win32os_versioncheck(major, minor, spmajor, spminor);
|
||||
|
||||
printf("%s major %u minor %u SP major %u SP minor %u\n",
|
||||
ret > 0 ? "greater" : (ret == 0 ? "equal" : "less"),
|
||||
major, minor, spmajor, spminor);
|
||||
return (ret);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@
|
|||
./bin/named/win32/named.vcxproj.in X 2013,2014
|
||||
./bin/named/win32/named.vcxproj.user X 2013
|
||||
./bin/named/win32/ntservice.c C 1999,2000,2001,2002,2004,2006,2007,2009,2011,2013,2014
|
||||
./bin/named/win32/os.c C 1999,2000,2001,2002,2004,2005,2007,2008,2009,2012,2013,2014
|
||||
./bin/named/win32/os.c C 1999,2000,2001,2002,2004,2005,2007,2008,2009,2012,2013,2014,2015
|
||||
./bin/named/xfrout.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014
|
||||
./bin/named/zoneconf.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015
|
||||
./bin/nsupdate/.gitignore X 2012
|
||||
|
|
@ -3664,14 +3664,14 @@
|
|||
./lib/isc/win32/include/isc/syslog.h C 1999,2000,2001,2004,2007
|
||||
./lib/isc/win32/include/isc/thread.h C 1998,1999,2000,2001,2004,2005,2007,2009,2013
|
||||
./lib/isc/win32/include/isc/time.h C 1998,1999,2000,2001,2004,2006,2007,2008,2009,2012,2014
|
||||
./lib/isc/win32/include/isc/win32os.h C 2002,2004,2007,2009
|
||||
./lib/isc/win32/include/isc/win32os.h C 2002,2004,2007,2009,2015
|
||||
./lib/isc/win32/include/pkcs11/Makefile.in MAKE 2014
|
||||
./lib/isc/win32/include/pkcs11/cryptoki.h X 2014
|
||||
./lib/isc/win32/interfaceiter.c C 1999,2000,2001,2004,2007,2008,2009,2013,2014
|
||||
./lib/isc/win32/ipv6.c C 1999,2000,2001,2004,2007
|
||||
./lib/isc/win32/keyboard.c C 2000,2001,2004,2007
|
||||
./lib/isc/win32/libgen.h C 2009
|
||||
./lib/isc/win32/libisc.def.in X 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014
|
||||
./lib/isc/win32/libisc.def.in X 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015
|
||||
./lib/isc/win32/libisc.dsp.in X 2001,2002,2003,2004,2005,2006,2007,2008,2009,2013,2014
|
||||
./lib/isc/win32/libisc.dsw X 2001
|
||||
./lib/isc/win32/libisc.mak.in X 2001,2002,2003,2004,2005,2006,2007,2008,2009,2013,2014
|
||||
|
|
@ -3686,7 +3686,7 @@
|
|||
./lib/isc/win32/os.c C 2000,2001,2002,2004,2007,2013
|
||||
./lib/isc/win32/pk11_api.c C 2014
|
||||
./lib/isc/win32/resource.c C 2000,2001,2004,2007,2008
|
||||
./lib/isc/win32/socket.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014
|
||||
./lib/isc/win32/socket.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015
|
||||
./lib/isc/win32/stdio.c C 2000,2001,2004,2007,2013
|
||||
./lib/isc/win32/stdtime.c C 1999,2000,2001,2004,2007,2013
|
||||
./lib/isc/win32/strerror.c C 2001,2002,2004,2007
|
||||
|
|
@ -3696,7 +3696,7 @@
|
|||
./lib/isc/win32/time.c C 1998,1999,2000,2001,2003,2004,2006,2007,2008,2009,2012,2013,2014
|
||||
./lib/isc/win32/unistd.h C 2000,2001,2004,2007,2008,2009
|
||||
./lib/isc/win32/version.c C 1998,1999,2000,2001,2004,2007
|
||||
./lib/isc/win32/win32os.c C 2002,2004,2007,2013,2014
|
||||
./lib/isc/win32/win32os.c C 2002,2004,2007,2013,2014,2015
|
||||
./lib/isc/x86_32/Makefile.in MAKE 2007,2012
|
||||
./lib/isc/x86_32/include/Makefile.in MAKE 2007,2012
|
||||
./lib/isc/x86_32/include/isc/Makefile.in MAKE 2007,2012
|
||||
|
|
|
|||
Loading…
Reference in a new issue