From: Michał Kępień Date: Thu, 28 Jun 2018 11:38:39 +0000 (+0200) Subject: Disable notifies for mirror zones unless also-notify is used X-Git-Tag: v9.13.2~7^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd30f53edc7f51ede15ed523be2613aa85b53656;p=thirdparty%2Fbind9.git Disable notifies for mirror zones unless also-notify is used Since the mirror zone feature is expected to mostly be used for the root zone, prevent slaves from sending NOTIFY messages for mirror zones by default. Retain the possibility to use "also-notify" as it might be useful in certain cases. --- diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 0e7539e7f70..231447d9eb7 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -1745,6 +1745,11 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, dns_zone_setxfracl(zone, none); dns_acl_detach(&none); } + /* + * Only allow "also-notify". + */ + notifytype = dns_notifytype_explicit; + dns_zone_setnotifytype(zone, notifytype); } } diff --git a/bin/tests/system/mirror/tests.sh b/bin/tests/system/mirror/tests.sh index ac85a429666..797610f0d2f 100644 --- a/bin/tests/system/mirror/tests.sh +++ b/bin/tests/system/mirror/tests.sh @@ -347,5 +347,12 @@ grep "; Transfer failed" dig.out.ns3.test$n > /dev/null || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` +n=`expr $n + 1` +echo_i "checking that notifies are disabled by default for mirror zones ($n)" +ret=0 +grep "initially-unavailable.*sending notifies" ns3/named.run > /dev/null && ret=1 +if [ $ret != 0 ]; then echo_i "failed"; fi +status=`expr $status + $ret` + echo_i "exit status: $status" [ $status -eq 0 ] || exit 1