]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1595. [func] New notify type 'master-only'. Enable notify for
authorMark Andrews <marka@isc.org>
Tue, 30 Mar 2004 02:13:45 +0000 (02:13 +0000)
committerMark Andrews <marka@isc.org>
Tue, 30 Mar 2004 02:13:45 +0000 (02:13 +0000)
                        master zones only.

CHANGES
bin/named/zoneconf.c
doc/arm/Bv9ARM-book.xml
lib/dns/include/dns/types.h
lib/dns/zone.c
lib/isccfg/namedconf.c

diff --git a/CHANGES b/CHANGES
index 3a2037ced4fdff23e89e2f8fb2eb32aa8f78919b..45bad73eb4d6d5795eed8f2df43fdf7df6fbe2e8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,7 +8,8 @@
 
 1596.  [func]          Accept 'notify-source' style syntax for query-source.
 
-1595.  [placeholder]   rt9164
+1595.  [func]          New notify type 'master-only'.  Enable notify for
+                       master zones only.
 
 1594.  [placeholder]   rt10565
 
index 66cbad9fe714c60b6c66be542e2ef55b699b47fc..3121dd61dc6a9b8afac5c8089c0896bb1475c5f8 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zoneconf.c,v 1.110 2004/03/05 04:57:49 marka Exp $ */
+/* $Id: zoneconf.c,v 1.111 2004/03/30 02:13:43 marka Exp $ */
 
 #include <config.h>
 
@@ -472,6 +472,8 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
                        char *notifystr = cfg_obj_asstring(obj);
                        if (strcasecmp(notifystr, "explicit") == 0)
                                notifytype = dns_notifytype_explicit;
+                       else if (strcasecmp(notifystr, "master-only") == 0)
+                               notifytype = dns_notifytype_masteronly;
                        else
                                INSIST(0);
                }
index b5af9b183de59191bcdbacf49f4491424420ffb8..b7f66f3a58a56f6d42702e53aed7025bb73c6560 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
                "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
 
-<!-- File: $Id: Bv9ARM-book.xml,v 1.242 2004/03/30 02:05:40 marka Exp $ -->
+<!-- File: $Id: Bv9ARM-book.xml,v 1.243 2004/03/30 02:13:44 marka Exp $ -->
 
 <book>
 <title>BIND 9 Administrator Reference Manual</title>
@@ -2752,7 +2752,7 @@ statement in the <filename>named.conf</filename> file:</para>
     <optional> host-statistics <replaceable>yes_or_no</replaceable>; </optional>
     <optional> minimal-responses <replaceable>yes_or_no</replaceable>; </optional>
     <optional> multiple-cnames <replaceable>yes_or_no</replaceable>; </optional>
-    <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable>; </optional>
+    <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable>; </optional>
     <optional> recursion <replaceable>yes_or_no</replaceable>; </optional>
     <optional> rfc2308-type1 <replaceable>yes_or_no</replaceable>; </optional>
     <optional> use-id-pool <replaceable>yes_or_no</replaceable>; </optional>
@@ -3165,6 +3165,8 @@ servers listed in the zone's NS records (except the master server identified
 in the SOA MNAME field), and to any servers listed in the
 <command>also-notify</command> option.
 </para><para>
+If <userinput>master-only</userinput>, notifies are only sent
+for master zones.
 If <userinput>explicit</userinput>, notifies are sent only to
 servers explicitly listed using <command>also-notify</command>.
 If <userinput>no</userinput>, no notifies are sent.
@@ -4543,7 +4545,7 @@ Statement Grammar</title>
     <optional> max-transfer-idle-out <replaceable>number</replaceable> ; </optional>
     <optional> max-transfer-time-in <replaceable>number</replaceable> ; </optional>
     <optional> max-transfer-time-out <replaceable>number</replaceable> ; </optional>
-    <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> ; </optional>
+    <optional> notify <replaceable>yes_or_no</replaceable> | <replaceable>explicit</replaceable> | <replaceable>master-only</replaceable> ; </optional>
     <optional> pubkey <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>number</replaceable> <replaceable>string</replaceable> ; </optional>
     <optional> transfer-source (<replaceable>ip4_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
     <optional> transfer-source-v6 (<replaceable>ip6_addr</replaceable> | <constant>*</constant>) <optional>port <replaceable>ip_port</replaceable></optional> ; </optional>
index 1da751ae125ddbf01868a81996dd92d4a090001f..42e83142529b0402e7ac196392bb3ac04b519023 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: types.h,v 1.109 2004/03/05 05:09:47 marka Exp $ */
+/* $Id: types.h,v 1.110 2004/03/30 02:13:44 marka Exp $ */
 
 #ifndef DNS_TYPES_H
 #define DNS_TYPES_H 1
@@ -136,7 +136,8 @@ typedef enum {
 typedef enum {
        dns_notifytype_no = 0,
        dns_notifytype_yes = 1,
-       dns_notifytype_explicit = 2
+       dns_notifytype_explicit = 2,
+       dns_notifytype_masteronly = 3
 } dns_notifytype_t;
 
 typedef enum {
index 9f73101035e58acfa2d69f5c94b6720857818a87..cb914f125be41e455f50beaa824a581057e46f01 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.410 2004/03/18 02:58:03 marka Exp $ */
+/* $Id: zone.c,v 1.411 2004/03/30 02:13:44 marka Exp $ */
 
 #include <config.h>
 
@@ -2917,6 +2917,10 @@ zone_notify(dns_zone_t *zone) {
        if (notifytype == dns_notifytype_no)
                return;
 
+       if (notifytype == dns_notifytype_masteronly &&
+           zone->type != dns_zone_master)
+               return;
+
        origin = &zone->origin;
 
        /*
index 6c0f7de639839ffd101e0c1f81aa32abde2a1e57..3c7bdd88e486169cc67b12e518da68375cfd555f 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: namedconf.c,v 1.31 2004/03/30 02:05:40 marka Exp $ */
+/* $Id: namedconf.c,v 1.32 2004/03/30 02:13:45 marka Exp $ */
 
 #include <config.h>
 
@@ -1126,7 +1126,7 @@ static cfg_type_t cfg_type_dialuptype = {
        &cfg_rep_string, dialup_enums
 };
 
-static const char *notify_enums[] = { "explicit", NULL };
+static const char *notify_enums[] = { "explicit", "master-only", NULL };
 static isc_result_t
 parse_notify_type(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
        return (parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));