summaryrefslogtreecommitdiffstats
path: root/contrib/bind/bin/named
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-06-11 05:01:49 +0000
committerpeter <peter@FreeBSD.org>1998-06-11 05:01:49 +0000
commit67e0f3ce71726dc4058c2f80a813341a59244dbd (patch)
tree5c20e716e4e6350a1a86438bee7bc2b84513180b /contrib/bind/bin/named
parent0666320b4eda500556d2c671c9527c9000057492 (diff)
downloadFreeBSD-src-67e0f3ce71726dc4058c2f80a813341a59244dbd.zip
FreeBSD-src-67e0f3ce71726dc4058c2f80a813341a59244dbd.tar.gz
Import final bind-8.1.2 release.
Obtained from: ftp.isc.org
Diffstat (limited to 'contrib/bind/bin/named')
-rw-r--r--contrib/bind/bin/named/named.conf9
-rw-r--r--contrib/bind/bin/named/ns_config.c5
-rw-r--r--contrib/bind/bin/named/ns_defs.h4
-rw-r--r--contrib/bind/bin/named/ns_glob.h4
-rw-r--r--contrib/bind/bin/named/ns_main.c40
-rw-r--r--contrib/bind/bin/named/ns_maint.c3
-rw-r--r--contrib/bind/bin/named/ns_update.c10
7 files changed, 52 insertions, 23 deletions
diff --git a/contrib/bind/bin/named/named.conf b/contrib/bind/bin/named/named.conf
index 8df9bc1..ab96666 100644
--- a/contrib/bind/bin/named/named.conf
+++ b/contrib/bind/bin/named/named.conf
@@ -24,7 +24,7 @@ options {
check-names master fail;
check-names slave warn;
check-names response ignore;
- host-statistics yes;
+ host-statistics no;
deallocate-on-exit no; // Painstakingly deallocate all
// objects when exiting instead of
// letting the OS clean up for us.
@@ -285,12 +285,15 @@ logging {
* };
*
* channel default_debug {
- * file "named.run";
+ * file "named.run"; // note: stderr is used instead
+ * // of "named.run" if the server
+ * // is started with the "-f"
+ * // option.
* severity dynamic; // this means log debugging
* // at whatever debugging level
* // the server is at, and don't
* // log anything if not
- * // debugging
+ * // debugging.
* };
*
* channel null { // this is the bit bucket;
diff --git a/contrib/bind/bin/named/ns_config.c b/contrib/bind/bin/named/ns_config.c
index ff26156..4f95410 100644
--- a/contrib/bind/bin/named/ns_config.c
+++ b/contrib/bind/bin/named/ns_config.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static char rcsid[] = "$Id: ns_config.c,v 8.34 1998/03/27 00:19:47 halley Exp $";
+static char rcsid[] = "$Id: ns_config.c,v 8.35 1998/05/05 19:44:48 halley Exp $";
#endif /* not lint */
/*
@@ -2322,6 +2322,8 @@ load_configuration(const char *filename) {
ns_debug(ns_log_config, 3, "load configuration %s", filename);
+ loading = 1;
+
/*
* Clean up any previous configuration and initialize
* global data structures we'll be updating.
@@ -2363,4 +2365,5 @@ load_configuration(const char *filename) {
opensocket_f();
initial_configuration = 0;
+ loading = 0;
}
diff --git a/contrib/bind/bin/named/ns_defs.h b/contrib/bind/bin/named/ns_defs.h
index f81a383..8d4bba7 100644
--- a/contrib/bind/bin/named/ns_defs.h
+++ b/contrib/bind/bin/named/ns_defs.h
@@ -1,6 +1,6 @@
/*
* from ns.h 4.33 (Berkeley) 8/23/90
- * $Id: ns_defs.h,v 8.38 1998/03/17 03:22:27 halley Exp $
+ * $Id: ns_defs.h,v 8.39 1998/04/14 00:35:09 halley Exp $
*/
/*
@@ -145,7 +145,7 @@
#define OPTION_HOSTSTATS 0x0080 /* Maintain per-host statistics? */
#define OPTION_DEALLOC_ON_EXIT 0x0100 /* Deallocate everything on exit? */
-#define DEFAULT_OPTION_FLAGS (OPTION_HOSTSTATS)
+#define DEFAULT_OPTION_FLAGS 0
#ifdef BIND_UPDATE
#define SOAINCRINTVL 300 /* default value for the time after which
diff --git a/contrib/bind/bin/named/ns_glob.h b/contrib/bind/bin/named/ns_glob.h
index 35f3041..8f39c84 100644
--- a/contrib/bind/bin/named/ns_glob.h
+++ b/contrib/bind/bin/named/ns_glob.h
@@ -1,6 +1,6 @@
/*
* from ns.h 4.33 (Berkeley) 8/23/90
- * $Id: ns_glob.h,v 8.34 1998/03/20 01:18:07 halley Exp $
+ * $Id: ns_glob.h,v 8.35 1998/05/05 19:44:20 halley Exp $
*/
/* Copyright (c) 1986
@@ -315,3 +315,5 @@ DECL char * user_name INIT(NULL);
DECL gid_t group_id;
DECL char * group_name INIT(NULL);
DECL char * chroot_dir INIT(NULL);
+
+DECL int loading INIT(0);
diff --git a/contrib/bind/bin/named/ns_main.c b/contrib/bind/bin/named/ns_main.c
index a4b4360..194d368 100644
--- a/contrib/bind/bin/named/ns_main.c
+++ b/contrib/bind/bin/named/ns_main.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)ns_main.c 4.55 (Berkeley) 7/1/91";
-static char rcsid[] = "$Id: ns_main.c,v 8.65 1998/04/06 23:45:32 halley Exp $";
+static char rcsid[] = "$Id: ns_main.c,v 8.67 1998/04/28 19:17:46 halley Exp $";
#endif /* not lint */
/*
@@ -140,10 +140,10 @@ char copyright[] =
static LIST(struct _interface) iflist;
static int iflist_initialized = 0;
- /* UDP receive, TCP send buffer size */
-static const int rbufsize = 8 * 1024,
- /* TCP send window size */
- sbufsize = 16 * 1024;
+
+static const int drbufsize = 8 * 1024, /* UDP rcv buf size */
+ dsbufsize = 16 * 1024, /* UDP snd buf size */
+ sbufsize = 16 * 1024; /* TCP snd buf size */
static u_int16_t nsid_state;
static int needs;
@@ -1040,7 +1040,16 @@ getnetconf(int periodic_scan) {
if (ifreq.ifr_addr.sa_len == 0)
ifreq.ifr_addr.sa_len = 16;
#endif
+#ifdef HAVE_MINIMUM_IFREQ
+ ns_debug(ns_log_default, 2, "%s sa_len = %d",
+ ifreq.ifr_name, (int)ifreq.ifr_addr.sa_len);
+ cpsize = sizeof ifreq;
+ if (ifreq.ifr_addr.sa_len > sizeof (struct sockaddr))
+ cpsize += (int)ifreq.ifr_addr.sa_len -
+ (int)(sizeof (struct sockaddr));
+#else
cpsize = sizeof ifreq.ifr_name + ifreq.ifr_addr.sa_len;
+#endif /* HAVE_MINIMUM_IFREQ */
#elif defined SIOCGIFCONF_ADDR
cpsize = sizeof ifreq;
#else
@@ -1052,14 +1061,14 @@ getnetconf(int periodic_scan) {
continue;
}
#endif
- ina = ina_get((u_char *)&((struct sockaddr_in *)
- &ifreq.ifr_addr)->sin_addr);
if (ifreq.ifr_addr.sa_family != AF_INET) {
ns_debug(ns_log_default, 2,
- "getnetconf: af %d != INET",
- ifreq.ifr_addr.sa_family);
+ "getnetconf: %s AF %d != INET",
+ ifreq.ifr_name, ifreq.ifr_addr.sa_family);
continue;
}
+ ina = ina_get((u_char *)&((struct sockaddr_in *)
+ &ifreq.ifr_addr)->sin_addr);
ns_debug(ns_log_default, 1,
"getnetconf: considering %s [%s]",
ifreq.ifr_name, inet_ntoa(ina));
@@ -1284,11 +1293,20 @@ opensocket_d(interface *ifp) {
m = sizeof n;
if ((getsockopt(ifp->dfd, SOL_SOCKET, SO_RCVBUF, (char*)&n, &m) >= 0)
&& (m == sizeof n)
- && (n < rbufsize)) {
+ && (n < drbufsize)) {
(void) setsockopt(ifp->dfd, SOL_SOCKET, SO_RCVBUF,
- (char *)&rbufsize, sizeof(rbufsize));
+ (char *)&drbufsize, sizeof drbufsize);
}
#endif /* SO_RCVBUF */
+#ifndef CANNOT_SET_SNDBUF
+ if (setsockopt(ifp->dfd, SOL_SOCKET, SO_SNDBUF,
+ (char*)&dsbufsize, sizeof dsbufsize) < 0) {
+ ns_info(ns_log_default,
+ "setsockopt(dfd=%d, SO_SNDBUF, %d): %s",
+ ifp->dfd, dsbufsize, strerror(errno));
+ /* XXX press on regardless, this is not too serious. */
+ }
+#endif
if (bind(ifp->dfd, (struct sockaddr *)&nsa, sizeof nsa)) {
ns_error(ns_log_default, "bind(dfd=%d, %s): %s",
ifp->dfd, sin_ntoa(nsa), strerror(errno));
diff --git a/contrib/bind/bin/named/ns_maint.c b/contrib/bind/bin/named/ns_maint.c
index ad6e7f8..75568ff 100644
--- a/contrib/bind/bin/named/ns_maint.c
+++ b/contrib/bind/bin/named/ns_maint.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)ns_maint.c 4.39 (Berkeley) 3/2/91";
-static char rcsid[] = "$Id: ns_maint.c,v 8.38 1998/03/16 19:40:25 halley Exp $";
+static char rcsid[] = "$Id: ns_maint.c,v 8.39 1998/04/14 00:34:39 halley Exp $";
#endif /* not lint */
/*
@@ -174,6 +174,7 @@ zone_maint(struct zoneinfo *zp) {
if (zp->z_serial != 0 &&
((zp->z_lastupdate+zp->z_expire) < (u_int32_t)tt.tv_sec)) {
zp->z_serial = 0;
+ /* XXX should we clear Z_AUTH here? */
}
if (zp->z_flags & (Z_NEED_RELOAD|Z_NEED_XFER|Z_QSERIAL)) {
ns_retrytime(zp, tt.tv_sec);
diff --git a/contrib/bind/bin/named/ns_update.c b/contrib/bind/bin/named/ns_update.c
index e6fdd8d..48db076 100644
--- a/contrib/bind/bin/named/ns_update.c
+++ b/contrib/bind/bin/named/ns_update.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static char rcsid[] = "$Id: ns_update.c,v 8.24 1998/03/20 00:49:16 halley Exp $";
+static char rcsid[] = "$Id: ns_update.c,v 8.26 1998/05/05 19:45:10 halley Exp $";
#endif /* not lint */
/*
@@ -770,7 +770,8 @@ class=%s, type=%s, ttl=%d, dp=0x%0x",
cancel_soa_update(zp);
schedmaint = 1;
#ifdef BIND_NOTIFY
- sysnotify(zp->z_origin, zp->z_class, T_SOA);
+ if (!loading)
+ sysnotify(zp->z_origin, zp->z_class, T_SOA);
#endif
} else {
if (schedule_soa_update(zp, numupdated))
@@ -837,7 +838,6 @@ req_update_private(HEADER *hp, u_char *cp, u_char *eom, u_char *msg,
if (matches == 1) {
zonenum = zonelist[0];
zp = &zones[zonenum];
- old_serial = get_serial(zp);
if (zp->z_class != (int)class ||
(zp->z_type != z_master && zp->z_type != z_slave))
matches = 0;
@@ -916,6 +916,7 @@ req_update_private(HEADER *hp, u_char *cp, u_char *eom, u_char *msg,
dname);
return (Refuse);
}
+ old_serial = get_serial(zp);
ns_debug(ns_log_update, 3,
"req_update: update request for zone %s, class %s",
zp->z_origin, p_class(class));
@@ -2330,7 +2331,8 @@ set_serial(struct zoneinfo *zp, u_int32_t serial) {
zp->z_soaincrtime = 0;
zp->z_updatecnt = 0;
#ifdef BIND_NOTIFY
- sysnotify(zp->z_origin, zp->z_class, T_SOA);
+ if (!loading)
+ sysnotify(zp->z_origin, zp->z_class, T_SOA);
#endif
/*
* Note: caller is responsible for scheduling a dump
OpenPOWER on IntegriCloud