Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/dist/bind/bin/named Pull up revisions 1.5-1.7 (requeste...
details: https://anonhg.NetBSD.org/src/rev/a934831ae94f
branches: netbsd-1-5
changeset: 493183:a934831ae94f
user: he <he%NetBSD.org@localhost>
date: Mon Jul 01 17:15:26 2002 +0000
description:
Pull up revisions 1.5-1.7 (requested by itojun):
Update BIND to version 8.3.3.
diffstat:
dist/bind/bin/named/ns_config.c | 264 +++++++++++++--------
dist/bind/bin/named/ns_resp.c | 476 +++++++++++++++++++++++++--------------
2 files changed, 462 insertions(+), 278 deletions(-)
diffs (truncated from 1903 to 300 lines):
diff -r 589d2d5d9721 -r a934831ae94f dist/bind/bin/named/ns_config.c
--- a/dist/bind/bin/named/ns_config.c Mon Jul 01 17:15:10 2002 +0000
+++ b/dist/bind/bin/named/ns_config.c Mon Jul 01 17:15:26 2002 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: ns_config.c,v 1.2.8.2 2001/01/28 15:52:47 he Exp $ */
+/* $NetBSD: ns_config.c,v 1.2.8.3 2002/07/01 17:15:26 he Exp $ */
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "Id: ns_config.c,v 8.118 2000/12/23 08:14:37 vixie Exp";
+static const char rcsid[] = "Id: ns_config.c,v 8.135 2002/05/24 03:04:59 marka Exp";
#endif /* not lint */
/*
@@ -91,7 +91,6 @@
static int options_installed = 0;
static int logging_installed = 0;
static int default_options_installed;
-static int initial_configuration = 1;
static char **logging_categories;
static char *current_pid_filename = NULL;
@@ -104,7 +103,7 @@
void
free_zone_timerinfo(struct zoneinfo *zp) {
if (zp->z_timerinfo != NULL) {
- freestr(zp->z_timerinfo->name);
+ zp->z_timerinfo->name = freestr(zp->z_timerinfo->name);
memput(zp->z_timerinfo, sizeof *zp->z_timerinfo);
zp->z_timerinfo = NULL;
} else
@@ -127,17 +126,13 @@
strerror(errno));
}
if (zp->z_origin != NULL)
- freestr(zp->z_origin);
- zp->z_origin = NULL;
+ zp->z_origin = freestr(zp->z_origin);
if (zp->z_source != NULL)
- freestr(zp->z_source);
- zp->z_source = NULL;
+ zp->z_source = freestr(zp->z_source);
if (zp->z_ixfr_base != NULL)
- freestr(zp->z_ixfr_base);
- zp->z_ixfr_base = NULL;
+ zp->z_ixfr_base = freestr(zp->z_ixfr_base);
if (zp->z_ixfr_tmp != NULL)
- freestr(zp->z_ixfr_tmp);
- zp->z_ixfr_tmp = NULL;
+ zp->z_ixfr_tmp = freestr(zp->z_ixfr_tmp);
if (zp->z_update_acl != NULL)
free_ip_match_list(zp->z_update_acl);
zp->z_update_acl = NULL;
@@ -149,8 +144,7 @@
zp->z_transfer_acl = NULL;
#ifdef BIND_UPDATE
if (zp->z_updatelog != NULL)
- freestr(zp->z_updatelog);
- zp->z_updatelog = NULL;
+ zp->z_updatelog = freestr(zp->z_updatelog);
#endif /* BIND_UPDATE */
#ifdef BIND_NOTIFY
if (zp->z_also_notify != NULL)
@@ -158,6 +152,9 @@
zp->z_notify_count * sizeof *zp->z_also_notify);
zp->z_also_notify = NULL;
#endif
+ if (zp->z_fwdtab != NULL)
+ free_forwarders(zp->z_fwdtab);
+ zp->z_fwdtab = NULL;
block_signals();
if (LINKED(zp, z_reloadlink))
UNLINK(reloadingzones, zp, z_reloadlink);
@@ -191,7 +188,7 @@
}
static struct zoneinfo *
-new_zone(int class, int type) {
+new_zone(void) {
struct zoneinfo *zp;
if (EMPTY(freezones))
@@ -305,9 +302,16 @@
if (zp->z_query_acl) {
if (zp->z_type != z_master &&
zp->z_type != z_slave &&
+#ifdef FORWARD_ALLOWS
+ zp->z_type != z_forward &&
+#endif
zp->z_type != z_stub) {
ns_error(ns_log_config,
+#ifdef FORWARD_ALLOWS
+ "'allow-query' option for hint zone '%s'",
+#else
"'allow-query' option for non-{master,slave,stub} zone '%s'",
+#endif
zp->z_origin);
return (0);
}
@@ -315,7 +319,7 @@
#ifdef BIND_NOTIFY
/* Check notify */
- if (zp->z_notify != znotify_use_default) {
+ if (zp->z_notify != notify_use_default) {
if (zp->z_type != z_master && zp->z_type != z_slave) {
ns_error(ns_log_config,
"'notify' given for non-master, non-slave zone '%s'",
@@ -474,7 +478,7 @@
* any data that was dynamically allocated.
*/
if (zp->z_origin != NULL)
- freestr(zp->z_origin);
+ (void)freestr(zp->z_origin);
zp->z_origin = new_zp->z_origin;
new_zp->z_origin = NULL;
zp->z_maintain_ixfr_base = new_zp->z_maintain_ixfr_base;
@@ -482,8 +486,10 @@
zp->z_class = new_zp->z_class;
zp->z_type = new_zp->z_type;
zp->z_checknames = new_zp->z_checknames;
- for (i = 0; i < new_zp->z_addrcnt; i++)
+ for (i = 0; i < new_zp->z_addrcnt; i++) {
zp->z_addr[i] = new_zp->z_addr[i];
+ zp->z_keys[i] = new_zp->z_keys[i];
+ }
zp->z_addrcnt = new_zp->z_addrcnt;
if (zp->z_update_acl)
free_ip_match_list(zp->z_update_acl);
@@ -531,7 +537,7 @@
zp->z_dumpintvl = new_zp->z_dumpintvl;
zp->z_deferupdcnt = new_zp->z_deferupdcnt;
if (zp->z_updatelog)
- freestr(zp->z_updatelog);
+ (void)freestr(zp->z_updatelog);
zp->z_updatelog = new_zp->z_updatelog;
new_zp->z_updatelog = NULL;
#endif /* BIND_UPDATE */
@@ -556,7 +562,7 @@
/* File has changed, or hasn't been loaded yet. */
if (zp->z_source) {
- freestr(zp->z_source);
+ zp->z_source = freestr(zp->z_source);
ns_stopxfrs(zp);
purge_zone(zp->z_origin, fcachetab, zp->z_class);
}
@@ -564,12 +570,12 @@
new_zp->z_source = NULL;
if (zp->z_ixfr_base)
- freestr(zp->z_ixfr_base);
+ (void)freestr(zp->z_ixfr_base);
zp->z_ixfr_base = new_zp->z_ixfr_base;
new_zp->z_ixfr_base = NULL;
if (zp->z_ixfr_tmp)
- freestr(zp->z_ixfr_tmp);
+ (void)freestr(zp->z_ixfr_tmp);
zp->z_ixfr_tmp = new_zp->z_ixfr_tmp;
new_zp->z_ixfr_tmp = NULL;
@@ -599,17 +605,17 @@
primary_reload:
#endif /* BIND_UPDATE */
if (zp->z_source != NULL)
- freestr(zp->z_source);
+ (void)freestr(zp->z_source);
zp->z_source = new_zp->z_source;
new_zp->z_source = NULL;
if (zp->z_ixfr_base != NULL)
- freestr(zp->z_ixfr_base);
+ (void)freestr(zp->z_ixfr_base);
zp->z_ixfr_base = new_zp->z_ixfr_base;
new_zp->z_ixfr_base = NULL;
if (zp->z_ixfr_tmp != NULL)
- freestr(zp->z_ixfr_tmp);
+ (void)freestr(zp->z_ixfr_tmp);
zp->z_ixfr_tmp = new_zp->z_ixfr_tmp;
new_zp->z_ixfr_tmp = NULL;
@@ -651,8 +657,7 @@
((!reconfiging) && zonefile_changed_p(zp)))) {
ns_debug(ns_log_config, 1,
"backup file changed or missing");
- freestr(zp->z_source);
- zp->z_source = NULL;
+ zp->z_source = freestr(zp->z_source);
zp->z_serial = 0; /* force xfer */
ns_stopxfrs(zp);
/*
@@ -676,7 +681,7 @@
}
if (zp->z_ixfr_base != NULL)
- freestr(zp->z_ixfr_base);
+ (void)freestr(zp->z_ixfr_base);
zp->z_ixfr_base = new_zp->z_ixfr_base;
new_zp->z_ixfr_base = NULL;
@@ -690,8 +695,7 @@
zoneinit(zp);
else {
/*
- ** Force secondary to try transfer soon
- ** after SIGHUP.
+ ** Force slave to try transfer soon after SIGHUP.
*/
if ((zp->z_flags & (Z_QSERIAL|Z_XFER_RUNNING)) == 0 &&
reloading && !reconfiging) {
@@ -730,7 +734,7 @@
void
end_zone(zone_config zh, int should_install) {
struct zoneinfo *zp, *new_zp;
- char *zname;
+ const char *zname;
symbol_value value;
new_zp = zh.opaque;
@@ -756,11 +760,11 @@
zp = NULL;
}
if (zp == NULL) {
- zp = new_zone(new_zp->z_class, new_zp->z_type);
+ zp = new_zone();
INSIST(zp != NULL);
value.integer = (zp - zones);
- define_symbol(zone_symbol_table, savestr(new_zp->z_origin, 1),
- new_zp->z_class, value, SYMBOL_FREE_KEY);
+ define_symbol(zone_symbol_table, new_zp->z_origin,
+ new_zp->z_class, value, 0);
}
ns_debug(ns_log_config, 5, "zone '%s', type = %d, class = %d", zname,
new_zp->z_type, new_zp->z_class);
@@ -870,7 +874,7 @@
if (value) {
zp->z_dialup = zdialup_yes;
#ifdef BIND_NOTIFY
- zp->z_notify = znotify_yes;
+ zp->z_notify = notify_yes;
#endif
} else
zp->z_dialup = zdialup_no;
@@ -879,17 +883,14 @@
}
int
-set_zone_notify(zone_config zh, int value) {
+set_zone_notify(zone_config zh, enum notify value) {
#ifdef BIND_NOTIFY
struct zoneinfo *zp;
zp = zh.opaque;
INSIST(zp != NULL);
- if (value)
- zp->z_notify = znotify_yes;
- else
- zp->z_notify = znotify_no;
+ zp->z_notify = value;
#endif
return (1);
}
@@ -933,7 +934,7 @@
zp = zh.opaque;
INSIST(zp != NULL);
- /* Fail if checknames already set for this zone */
+ /* Fail if allow-query acl already set for this zone */
if (zp->z_query_acl != NULL)
return (0);
zp->z_query_acl = iml;
@@ -963,7 +964,7 @@
zp = zh.opaque;
INSIST(zp != NULL);
- /* Fail if checknames already set for this zone */
+ /* Fail if allow-transfer acl already set for this zone */
if (zp->z_transfer_acl != NULL)
return (0);
zp->z_transfer_acl = iml;
@@ -977,7 +978,7 @@
zp = zh.opaque;
INSIST(zp != NULL);
- /* Fail if checknames already set for this zone */
+ /* Fail if max-transfer-time-in already set for this zone */
if (zp->z_max_transfer_time_in)
return (0);
zp->z_max_transfer_time_in = max_time;
@@ -1016,13 +1017,14 @@
}
int
-add_zone_master(zone_config zh, struct in_addr address) {
+add_zone_master(zone_config zh, struct in_addr address, struct dst_key * key) {
struct zoneinfo *zp;
zp = zh.opaque;
Home |
Main Index |
Thread Index |
Old Index