]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Disable notifies for mirror zones unless also-notify is used
authorMichał Kępień <michal@isc.org>
Thu, 28 Jun 2018 11:38:39 +0000 (13:38 +0200)
committerMichał Kępień <michal@isc.org>
Thu, 28 Jun 2018 11:38:39 +0000 (13:38 +0200)
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.

bin/named/zoneconf.c
bin/tests/system/mirror/tests.sh

index 0e7539e7f70af0d7c279088a8ec76c3ae3e7fc40..231447d9eb769aedb33ccdc6d8711224ea4f1910 100644 (file)
@@ -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);
                        }
                }
 
index ac85a429666ec481bafda4b246edcd9f833a7bb8..797610f0d2fb1127d78e1d3f149f0c1040b71702 100644 (file)
@@ -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