]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
initialize sockaddrdscp to prevent spurious output from 'named-checkconf -p'
authorEvan Hunt <each@isc.org>
Tue, 5 May 2020 19:48:31 +0000 (12:48 -0700)
committerEvan Hunt <each@isc.org>
Tue, 5 May 2020 19:48:31 +0000 (12:48 -0700)
CHANGES
bin/tests/system/checkconf/good.conf
bin/tests/system/checkconf/good.zonelist
bin/tests/system/checkconf/tests.sh
lib/isccfg/parser.c

diff --git a/CHANGES b/CHANGES
index 75529d89ec75ee2ad623a4b67fdd262bbf18cb18..337903517d1641c29bf90915f1f7f5028d87faa5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+5405.  [bug]           'named-checkconf -p' could include spurious text
+                       in server-addresses statements due to an uninitialized
+                       DSCP value. [GL #1812]
+
 5404.  [bug]           'named-checkconf -z' could incorrectly indicate
                        success if errors were found in one view but not in a
                        subsequent one. [GL #1807]
index f2dae97362df0be61b895d5dc933f61340bdc4a8..2faeadbebcc56af89959054b1aba50eedd4baf7e 100644 (file)
@@ -120,6 +120,12 @@ view "second" {
                };
                zone-statistics no;
        };
+       zone "example3" {
+               type static-stub;
+               server-addresses {
+                       1.2.3.4;
+               };
+       };
        zone "clone" {
                in-view "first";
        };
index dff4d170cac5b84e120f8ebba1aa28fa383b5843..b33d2fc239e0ba8b1bd4b583a595836491c9bf31 100644 (file)
@@ -2,6 +2,7 @@ example1 IN first master
 clone IN first master
 example1 IN second master
 example2 IN second static-stub
+example3 IN second static-stub
 clone IN second in-view first
 . IN second redirect
 clone IN third in-view first
index a3901111faf900e3316bf2d36fd6419278aeac3e..b2f5b7b22f1b64166728097374174b29b1b18aec 100644 (file)
@@ -380,7 +380,7 @@ if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo_i "check that named-checkconf -l print out the zone list ($n)"
+echo_i "check that named-checkconf -l prints out the zone list ($n)"
 ret=0
 $CHECKCONF -l good.conf |
 grep -v "is not implemented" |
index 154311ace43c27eb83c2fcfe885e189e56b11217..73ade898a09bfc96910cc39d9bbed12e36b50264 100644 (file)
@@ -3239,6 +3239,7 @@ parse_netaddr(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
        CHECK(cfg_create_obj(pctx, type, &obj));
        CHECK(cfg_parse_rawaddr(pctx, flags, &netaddr));
        isc_sockaddr_fromnetaddr(&obj->value.sockaddr, &netaddr, 0);
+       obj->value.sockaddrdscp.dscp = -1;
        *ret = obj;
        return (ISC_R_SUCCESS);
 cleanup: