mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-28 09:37:10 -04:00
1595. [func] New notify type 'master-only'. Enable notify for
master zones only.
This commit is contained in:
parent
33ef81bd13
commit
bc94d297e5
6 changed files with 20 additions and 10 deletions
3
CHANGES
3
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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.110.18.1 2004/03/30 02:12:14 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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.241.18.1 2004/03/30 02:04:46 marka Exp $ -->
|
||||
<!-- File: $Id: Bv9ARM-book.xml,v 1.241.18.2 2004/03/30 02:12:14 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>
|
||||
|
|
|
|||
|
|
@ -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.109.18.1 2004/03/30 02:12:15 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 {
|
||||
|
|
|
|||
|
|
@ -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.410.18.1 2004/03/30 02:12:15 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;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: namedconf.c,v 1.30.18.1 2004/03/30 02:04:47 marka Exp $ */
|
||||
/* $Id: namedconf.c,v 1.30.18.2 2004/03/30 02:12:16 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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue