]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3551. [bug] resolver.querydscp[46] were uninitialized. [RT #32686]
authorMark Andrews <marka@isc.org>
Fri, 19 Apr 2013 02:36:02 +0000 (12:36 +1000)
committerMark Andrews <marka@isc.org>
Fri, 19 Apr 2013 02:36:02 +0000 (12:36 +1000)
CHANGES
bin/named/config.c
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index 0e12aa6daa90e2a452ad7f1d70ceb0f81aa2b71e..eac11209e8bec82349a733b20e0fc97e8acc80c1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+3551.  [bug]           resolver.querydscp[46] were uninitialized.  [RT #32686]
+
 3550.  [func]          Unified the internal and export versions of the
                        BIND libraries, allowing external clients to use
                        the same libraries as BIND. [RT #33131]
index 80347902e3907c7cebb8f2b3add65da31f1de707..2de1db3786c674eeb850d1e00541948720a304de 100644 (file)
@@ -64,7 +64,6 @@ options {\n\
        session-keyalg hmac-sha256;\n\
        deallocate-on-exit true;\n\
 #      directory <none>\n\
-       dscp 0;\n\
        dump-file \"named_dump.db\";\n\
        fake-iquery no;\n\
        has-old-clients false;\n\
@@ -903,19 +902,15 @@ ns_config_getport(const cfg_obj_t *config, in_port_t *portp) {
 
 isc_result_t
 ns_config_getdscp(const cfg_obj_t *config, isc_dscp_t *dscpp) {
-       const cfg_obj_t *maps[2];
        const cfg_obj_t *options = NULL;
        const cfg_obj_t *dscpobj = NULL;
        isc_result_t result;
-       int i;
 
        (void)cfg_map_get(config, "options", &options);
-       i = 0;
-       if (options != NULL)
-               maps[i++] = options;
-       maps[i] = NULL;
+       if (options == NULL)
+               return (ISC_R_SUCCESS);
 
-       result = ns_config_get(maps, "dscp", &dscpobj);
+       result = cfg_map_get(options, "dscp", &dscpobj);
        if (result != ISC_R_SUCCESS || dscpobj == NULL) {
                *dscpp = -1;
                return (ISC_R_SUCCESS);
index 36f46e02ccb96dce0a98869919caa136d7bc2eef..7b7745d2877dabc4085e5e6a457d7541d349dbf0 100644 (file)
@@ -7776,6 +7776,8 @@ dns_resolver_create(dns_view_t *view,
                        ISC_TF((dispattr & DNS_DISPATCHATTR_EXCLUSIVE) != 0);
        }
 
+       res->querydscp4 = -1;
+       res->querydscp6 = -1;
        res->references = 1;
        res->exiting = ISC_FALSE;
        res->frozen = ISC_FALSE;