]> 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>
Wed, 6 May 2020 19:42:11 +0000 (12:42 -0700)
(cherry picked from commit f8d753d452fdbe18a89d9cedab58a51c9b48f113)

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 ee9d0ad819082784b420db66a09da87bf6f37a64..f40ca1e39e11a2750013a072f3c21be5fc430e2f 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 2eb2850f105bafd940066766584be8102aaa41ac..4f65c0621ec40b73c7276eda15d23f29f957962d 100644 (file)
@@ -117,6 +117,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 b9f9c08cc56d855df5b1e71ba08bd6b37c6137bd..993969c42e5616d92570f183433292d72a67af03 100644 (file)
@@ -381,7 +381,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 94acdf82c038f649f4e633c03007bf5c2c825a7c..145a0f203628f4139dcc9d9b857f62423144589d 100644 (file)
@@ -3223,6 +3223,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: