diff --git a/usr.sbin/named/db_glue.c b/usr.sbin/named/db_glue.c index 310c49506ae0..ff9c06dd83cd 100644 --- a/usr.sbin/named/db_glue.c +++ b/usr.sbin/named/db_glue.c @@ -1,6 +1,6 @@ #if !defined(lint) && !defined(SABER) static char sccsid[] = "@(#)db_glue.c 4.4 (Berkeley) 6/1/90"; -static char rcsid[] = "$Id: db_glue.c,v 8.7 1995/06/29 09:26:17 vixie Exp $"; +static char rcsid[] = "$Id: db_glue.c,v 1.1.1.3 1995/10/23 09:26:04 peter Exp $"; #endif /* not lint */ /* @@ -1179,14 +1179,17 @@ ctimel(l) /* * This is nec'y for systems that croak when deref'ing unaligned pointers. - * SPARC is an example. + * SPARC is an example. Note that in_addr.s_addr needn't be a 32-bit int, + * so we want to avoid bcopy and let the compiler do the casting for us. */ struct in_addr data_inaddr(data) const u_char *data; { struct in_addr ret; + u_int32_t tmp; - bcopy((char *)data, (char *)&ret, INADDRSZ); + bcopy((char *)data, (char *)&tmp, INADDRSZ); + ret.s_addr = tmp; return (ret); } diff --git a/usr.sbin/named/named.8 b/usr.sbin/named/named.8 index 9ab4e498c0ff..bd9628c18be4 100644 --- a/usr.sbin/named/named.8 +++ b/usr.sbin/named/named.8 @@ -53,18 +53,18 @@ .\" .\" @(#)named.8 6.6 (Berkeley) 2/14/89 .\" -.TH @INDOT_U@NAMED @SYS_OPS_EXT_U@ "April 17, 1993" +.TH NAMED 8 "June 20, 1995" .UC 4 .SH NAME -@INDOT@named \- Internet domain name server +named \- Internet domain name server .SH SYNOPSIS -.B @INDOT@named +.B named [ .B \-d .I debuglevel ] [ .B \-p -.I port# +.IR port# [\fB/\fP\fIlocalport#\fP] ] [{\-b} .I bootfile ] [ @@ -90,8 +90,13 @@ A number after the ``d'' determines the level of messages printed. .TP .B \-p -Use a different port number. The default is the standard port number -as returned by getservbyname(@LIB_NETWORK_EXT@) for service ``domain''. +Use nonstandard port numbers. The default is the standard port number +as returned by getservbyname(3) for service ``domain''. +The argument can specify two port numbers separated by a slash (``\fB/\fP'') +in which case the first port is that used when contacting remote servers, +and the second one is the service port bound by the local instance of +.IR named . +This is used mostly for debugging purposes. .TP .B \-b Use an alternate boot file. This is optional and allows you to @@ -99,11 +104,14 @@ specify a file with a leading dash. .TP .B \-q Trace all incoming queries if \fInamed\fP has been compiled with -\fIQRYLOG\fP defined. +\fIQRYLOG\fP defined. \fINOTE:\fP this option is deprecated in favour +of the boot file directive ``options query-log''. .TP .B \-r Turns recursion off in the server. Answers can come only from local (primary or secondary) zones. This can be used on root servers. +\fINOTE:\fP this option is deprecated in favour +of the boot file directive ``options no-recursion''. .PP Any additional argument is taken as the name of the boot file. If multiple boot files are specified, only the last is used. @@ -130,7 +138,9 @@ secondary CC.Berkeley.EDU 128.32.137.8 128.32.137.3 cc.zone.bak secondary 6.32.128.IN-ADDR.ARPA 128.32.137.8 128.32.137.3 cc.rev.bak primary 0.0.127.IN-ADDR.ARPA localhost.rev forwarders 10.0.0.78 10.2.0.78 -; slave +limit max-xfers 10 +limit datasize 64M +options forward-only query-log fake-iquery .DT .fi @@ -151,7 +161,7 @@ root servers, and this list changes periodically. The first example ``primary'' line states that the file ``berkeley.edu.zone'' contains authoritative data for the ``Berkeley.EDU'' zone. The file ``berkeley.edu.zone'' contains data in the master file -format described in RFC883. All domain names are relative to the origin, in +format described in RFC 883. All domain names are relative to the origin, in this case, ``Berkeley.EDU'' (see below for a more detailed description). The second ``primary'' line states that the file ``ucbhosts.rev'' contains authoritative data for the domain ``32.128.IN-ADDR.ARPA,'' which is used to @@ -180,29 +190,26 @@ specifies one or more forwarders, then the server will send all queries for data not in the cache to the forwarders first. Each forwarder will be asked in turn until an answer is returned or the list is exhausted. If no answer is forthcoming from a forwarder, the server will continue as it would have -without the forwarders line unless it is in ``slave'' mode. The forwarding -facility is useful to cause a large sitewide cache to be generated on a -master, and to reduce traffic over links to outside servers. It can also be -used to allow servers to run that do not have access directly to the -Internet, but wish to act as though they do. +without the forwarders line unless it is in ``forward-only'' mode. The +forwarding facility is useful to cause a large sitewide cache to be +generated on a master, and to reduce traffic over links to outside servers. +It can also be used to allow servers to run that do not have direct access +to the Internet, but wish to look up exterior names anyway. .LP -The ``slave'' line (shown commented out) is used to put the server in slave -mode. In this mode, the server will only make queries to forwarders. This -option is normally used on machine that wish to run a server but for -physical or administrative reasons cannot be given access to the Internet, -but have access to a host that does have access. +The ``slave'' line (deprecated) is allowed for backward compatibility. Its +meaning is identical to ``options forward-only''. .LP The ``sortlist'' line can be used to indicate networks that are to be -preferred over other networks Queries for host addresses from hosts on the +preferred over other networks. Queries for host addresses from hosts on the same network as the server will receive responses with local network addresses listed first, then addresses on the sort list, then other addresses. .LP -The ``xfrnets'' directive (not shown) can be used to implement primative +The ``xfrnets'' directive (not shown) can be used to implement primitive access control. If this directive is given, then your name server will only answer zone transfer requests from hosts which are on networks listed in your ``xfrnets'' directives. This directive may also be given as -``tcplist'' for compatibility with older, interrim servers. +``tcplist'' for compatibility with older, interim servers. .LP The ``include'' directive (not shown) can be used to process the contents of some other file as though they appeared in place of the ``include'' @@ -218,9 +225,38 @@ as dotted quads, not as domain names). This is useful when you know that some popular server has bad data in a zone or cache, and you want to avoid contamination while the problem is being fixed. .LP -The ``max-fetch'' directive (not shown) can be used to override the default -limit (which is 10) to the number of named-xfer subprocesses which \s-1BIND\s+1 -can spawn at any one time. +The ``limit'' directive can be used to change \s-1BIND\s+1's internal limits, +some of which (\fBdatasize\fP, for example) are implemented by the system and +others (like \fBtransfers-in\fP) by \s-1BIND\s+1 itself. The number following +the limit name can be scaled by postfixing a ``k,'' ``m,'' or ``g'' for +kilobytes, megabytes, and gigabytes respectively. +\fBdatasize\fP's argument sets the process data size enforced by the kernel. +\fINote:\fP not all systems provide a call to implement this -- on such +systems, the use of the \fBdatasize\fP parameter of ``limit'' will result in +a warning message. +\fBtransfers-in\fP's argument is the number of \fInamed-xfer\fP subprocesses +which \s-1BIND\s+1 will spawn at any one time. +\fBtransfers-per-ns\fP's argument is the maximum number of zone transfers to +be simultaneously initiated to any given remote name server. +.LP +The ``options'' directive introduces a boolean specifier that changes the +behaviour of \s-1BIND\s+1. More than one option can be specified in a single +directive. The currently defined options are as follows: +\fBno-recursion\fP, which will cause \s-1BIND\s+1 to answer with a referral +rather than actual data whenever it receives a query for a name it is not +authoritative for -- don't set this on a server that is listed in any host's +\fIresolv.conf\fP file; +\fBquery-log\fP, which causes all queries to be logged via +syslog(8) -- this is a lot of data, don't turn it on lightly; +\fBforward-only\fP, which causes the server to query only its forwarders -- +this option is normally used on machine that wishes to run a server but for +physical or administrative reasons cannot be given access to the Internet; +and \fBfake-iquery\fP, which tells \s-1BIND\s+1 to send back a useless and +bogus reply to ``inverse queries'' rather than responding with an error -- +this is helpful if you have a lot of microcomputers or SunOS hosts or both. +.LP +The ``max-fetch'' directive (not shown) is allowed for backward compatibility; +its meaning is identical to ``limit transfers-in''. .PP The master file consists of control information and a list of resource records for objects in the zone of the forms: @@ -278,7 +314,7 @@ the canonical name for an alias (domain) .IP SOA marks the start of a zone of authority (domain of originating host, domain address of maintainer, a serial number and the following -parameters in seconds: refresh, retry, expire and minimum TTL (see RFC883)). +parameters in seconds: refresh, retry, expire and minimum TTL (see RFC 883)). .IP NULL a null resource record (no format or data) .IP RP @@ -334,18 +370,19 @@ nameserver did not have complete information. .sp The following signals have the specified effect when sent to the server process using the -.IR kill (@CMD_EXT@) +.IR kill (1) command. .IP SIGHUP -Causes server to read named.boot and reload database. If the server +Causes server to read named.boot and reload the database. If the server is built with the FORCED_RELOAD compile-time option, then SIGHUP will also cause the server to check the serial number on all secondary zones. Normally the serial numbers are only checked at the SOA-specified intervals. .IP SIGINT -Dumps current data base and cache to /var/tmp/named_dump.db +Dumps the current data base and cache to /var/tmp/named_dump.db .IP SIGIOT Dumps statistics data into /var/tmp/named.stats if the server is -compiled -DSTATS. Statistics data is appended to the file. +compiled with -DSTATS. Statistics data is appended to the file. Some +systems use SIGABRT rather than SIGIOT for this. .IP SIGSYS Dumps the profiling data in /var/tmp if the server is compiled with profiling (server forks, chdirs and exits). @@ -360,7 +397,7 @@ Turns on debugging; each SIGUSR1 increments debug level. Turns off debugging completely. (SIGFPE on older systems without SIGUSR2) .IP SIGWINCH -Toggles logging of all incoming queries via syslog(@SYS_OPS_EXT@) +Toggles logging of all incoming queries via syslog(8) (requires server to have been built with the QRYLOG option). .SH FILES .nf @@ -372,7 +409,7 @@ Toggles logging of all incoming queries via syslog(@SYS_OPS_EXT@) /var/tmp/named.stats nameserver statistics data .fi .SH "SEE ALSO" -kill(@CMD_EXT@), gethostbyname(@LIB_NETWORK_EXT@), signal(@SYSCALL_EXT@), -resolver(@LIB_NETWORK_EXT@), resolver(@FORMAT_EXT@), hostname(@DESC_EXT@), +kill(1), gethostbyname(3), signal(2), +resolver(3), resolver(5), hostname(7), RFC 882, RFC 883, RFC 973, RFC 974, RFC 1033, RFC 1034, RFC 1035, RFC 1123, \fIName Server Operations Guide for \s-1BIND\s+1\fR diff --git a/usr.sbin/named/ns_forw.c b/usr.sbin/named/ns_forw.c index 02848ca3b9ce..4bb7202e5c45 100644 --- a/usr.sbin/named/ns_forw.c +++ b/usr.sbin/named/ns_forw.c @@ -1,6 +1,6 @@ #if !defined(lint) && !defined(SABER) static char sccsid[] = "@(#)ns_forw.c 4.32 (Berkeley) 3/3/91"; -static char rcsid[] = "$Id: ns_forw.c,v 8.5 1995/06/29 09:26:17 vixie Exp $"; +static char rcsid[] = "$Id: ns_forw.c,v 1.1.1.3 1995/10/23 09:26:14 peter Exp $"; #endif /* not lint */ /* @@ -374,6 +374,29 @@ nslookup(nsp, qp, syslogdname, sysloginfo) dname); continue; } +#ifdef INADDR_LOOPBACK + if (ntohl(data_inaddr(dp->d_data).s_addr) == + INADDR_LOOPBACK) { + syslog(LOG_INFO, "Bogus LOOPBACK A RR for %s", + dname); + continue; + } +#endif +#ifdef INADDR_BROADCAST + if (ntohl(data_inaddr(dp->d_data).s_addr) == + INADDR_BROADCAST) { + syslog(LOG_INFO, "Bogus BROADCAST A RR for %s", + dname); + continue; + } +#endif +#ifdef IN_MULTICAST + if (IN_MULTICAST(ntohl(data_inaddr(dp->d_data).s_addr))) { + syslog(LOG_INFO, "Bogus MULTICAST A RR for %s", + dname); + continue; + } +#endif /* * Don't use records that may become invalid to * reference later when we do the rtt computation. diff --git a/usr.sbin/named/ns_glob.h b/usr.sbin/named/ns_glob.h index b404e7e7607c..f37a85a14298 100644 --- a/usr.sbin/named/ns_glob.h +++ b/usr.sbin/named/ns_glob.h @@ -1,6 +1,6 @@ /* * from ns.h 4.33 (Berkeley) 8/23/90 - * $Id: ns_glob.h,v 8.3 1995/06/19 20:55:40 vixie Exp $ + * $Id: ns_glob.h,v 1.1.1.3 1995/10/23 09:26:16 peter Exp $ */ /* @@ -177,9 +177,6 @@ DECL u_int16_t ns_port; /* Source addr of last packet */ DECL struct sockaddr_in from_addr; - /* Source addr size of last packet */ -DECL int from_len; - /* Used by ns_stats */ DECL time_t boottime, resettime; diff --git a/usr.sbin/named/ns_init.c b/usr.sbin/named/ns_init.c index 944b9ef2cd87..adf5d011db23 100644 --- a/usr.sbin/named/ns_init.c +++ b/usr.sbin/named/ns_init.c @@ -1,6 +1,6 @@ #if !defined(lint) && !defined(SABER) static char sccsid[] = "@(#)ns_init.c 4.38 (Berkeley) 3/21/91"; -static char rcsid[] = "$Id: ns_init.c,v 8.7 1995/06/29 09:26:17 vixie Exp $"; +static char rcsid[] = "$Id: ns_init.c,v 1.1.1.3 1995/10/23 09:26:17 peter Exp $"; #endif /* not lint */ /* @@ -65,7 +65,6 @@ static char rcsid[] = "$Id: ns_init.c,v 8.7 1995/06/29 09:26:17 vixie Exp $"; #include #include #include -#include #include #include #include @@ -80,7 +79,7 @@ enum limit { Datasize }; static void zoneinit __P((struct zoneinfo *)), get_forwarders __P((FILE *)), - boot_read __P((char *)), + boot_read __P((const char *filename, int includefile)), #ifdef DEBUG content_zone __P((int)), #endif @@ -175,7 +174,7 @@ ns_init(bootfile) content_zone(nzones - 1); } #endif - boot_read(bootfile); + boot_read(bootfile, 0); /* erase all old zones that were not found */ for (zp = &zones[1]; zp < &zones[nzones]; zp++) { @@ -217,8 +216,9 @@ ns_init(bootfile) * Set up to recurse. */ static void -boot_read(bootfile) - char *bootfile; +boot_read(filename, includefile) + const char *filename; + int includefile; { register struct zoneinfo *zp; char buf[BUFSIZ], obuf[BUFSIZ], *source; @@ -236,8 +236,8 @@ boot_read(bootfile) int slineno; /* Saved global line number. */ int i; - if ((fp = fopen(bootfile, "r")) == NULL) { - syslog(LOG_ERR, "%s: %m", bootfile); + if ((fp = fopen(filename, "r")) == NULL) { + syslog(LOG_ERR, "%s: %m", filename); exit(1); } @@ -265,11 +265,11 @@ boot_read(bootfile) get_netlist(fp, enettab, ALLOW_NETS, buf); continue; } else if (strcasecmp(buf, "max-fetch") == 0) { - max_xfers_running = getnum(fp, bootfile, GETNUM_NONE); + max_xfers_running = getnum(fp, filename, GETNUM_NONE); continue; } else if (strcasecmp(buf, "limit") == 0) { (void) getword(buf, sizeof(buf), fp); - ns_limit(buf, getnum(fp, bootfile, GETNUM_SCALED)); + ns_limit(buf, getnum(fp, filename, GETNUM_SCALED)); continue; } else if (strcasecmp(buf, "options") == 0) { while (getword(buf, sizeof(buf), fp)) @@ -300,7 +300,7 @@ boot_read(bootfile) #endif } else if (strcasecmp(buf, "include") == 0) { if (getword(buf, sizeof(buf), fp)) - boot_read(buf); + boot_read(buf, 1); continue; } else if (strncasecmp(buf, "cache", 5) == 0) { type = Z_CACHE; @@ -343,7 +343,7 @@ boot_read(bootfile) } else { syslog(LOG_NOTICE, "%s: line %d: unknown directive '%s'\n", - bootfile, lineno, buf); + filename, lineno, buf); endline(fp); continue; } @@ -353,14 +353,14 @@ boot_read(bootfile) */ if (!getword(obuf, sizeof(obuf), fp)) { syslog(LOG_NOTICE, "%s: line %d: missing origin\n", - bootfile, lineno); + filename, lineno); continue; } i = strlen(obuf); if ((obuf[i-1] == '.') && (i != 1)) syslog(LOG_INFO, "%s: line %d: zone \"%s\" has trailing dot\n", - bootfile, lineno, obuf); + filename, lineno, obuf); while ((--i >= 0) && (obuf[i] == '.')) obuf[i] = '\0'; dprintf(1, (ddt, "zone origin %s", obuf[0]?obuf:".")); @@ -369,7 +369,7 @@ boot_read(bootfile) */ if (!getword(buf, sizeof(buf), fp)) { syslog(LOG_NOTICE, "%s: line %d: missing %s\n", - bootfile, lineno, + filename, lineno, #ifdef STUBS (type == Z_SECONDARY || type == Z_STUB) #else @@ -437,14 +437,14 @@ boot_read(bootfile) if (zp->z_refresh <= 0) { syslog(LOG_NOTICE, "%s: line %d: bad refresh time '%s', ignored\n", - bootfile, lineno, buf); + filename, lineno, buf); zp->z_refresh = 0; } else if (cache_file == NULL) cache_file = source; #else syslog(LOG_NOTICE, "%s: line %d: cache refresh ignored\n", - bootfile, lineno); + filename, lineno); #endif endline(fp); } @@ -495,7 +495,7 @@ boot_read(bootfile) else { syslog(LOG_NOTICE, "%s: line %d: bad flag '%s'\n", - bootfile, lineno, flag); + filename, lineno, flag); } flag = cp; } @@ -571,7 +571,7 @@ boot_read(bootfile) * We will always transfer this zone again * after a reload. */ - sprintf(buf, "/%s/NsTmp%ld.%d", _PATH_TMPDIR, + sprintf(buf, "%s/NsTmp%ld.%d", _PATH_TMPDIR, (long)getpid(), tmpnum++); source = savestr(buf); zp->z_flags |= Z_TMP_FILE; @@ -930,8 +930,10 @@ ns_option(name) { if (!strcasecmp(name, "no-recursion")) { NoRecurse = 1; +#ifdef QRYLOG } else if (!strcasecmp(name, "query-log")) { qrylog = 1; +#endif } else if (!strcasecmp(name, "forward-only")) { forward_only = 1; #ifndef INVQ diff --git a/usr.sbin/named/ns_main.c b/usr.sbin/named/ns_main.c index 597f3de44b0a..954bc139bbf5 100644 --- a/usr.sbin/named/ns_main.c +++ b/usr.sbin/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.8 1995/06/29 09:26:17 vixie Exp $"; +static char rcsid[] = "$Id: ns_main.c,v 1.1.1.3 1995/10/23 09:26:19 peter Exp $"; #endif /* not lint */ /* @@ -169,8 +169,7 @@ main(argc, argv, envp) struct qstream *nextsp; int nfds; const int on = 1; - int len; - int rfd, size; + int rfd, size, len; time_t lasttime, maxctime; u_char buf[BUFSIZ]; #ifdef POSIX_SIGNALS @@ -179,6 +178,9 @@ main(argc, argv, envp) #ifndef SYSV struct sigvec vec; #endif +#endif +#ifdef NeXT + int old_sigmask; #endif fd_set tmpmask; struct timeval t, *tp; @@ -374,10 +376,10 @@ main(argc, argv, envp) } #endif /*WANT_PIDFILE && PID_FIX*/ exit(1); - } else { /* Retry opening the socket a few times */ - my_close(vs); - sleep(1); } + /* Retry opening the socket a few times */ + my_close(vs); + sleep(3); } if (listen(vs, 5) != 0) { syslog(LOG_ERR, "listen(vs, 5): %m"); @@ -385,7 +387,7 @@ main(argc, argv, envp) } /* - * named would be terminated if one of these is sent and no handler + * named would be terminated if one of these is sent and no handler. */ (void) signal(SIGINT, setdumpflg); (void) signal(SIGQUIT, setchkptflg); @@ -405,6 +407,8 @@ main(argc, argv, envp) /* * Get list of local addresses and set up datagram sockets. */ + FD_ZERO(&mask); + FD_SET(vs, &mask); getnetconf(); /* @@ -572,10 +576,9 @@ main(argc, argv, envp) nfds = FD_SETSIZE; /* Bulletproofing */ syslog(LOG_NOTICE, "Return from getdtablesize() > FD_SETSIZE"); } - FD_ZERO(&mask); - FD_SET(vs, &mask); - for (dqp = datagramq; dqp != QDATAGRAM_NULL; dqp = dqp->dq_next) - FD_SET(dqp->dq_dfd, &mask); +#ifdef NeXT + old_sigmask = sigblock(sigmask(SIGCHLD)); +#endif for (;;) { #ifdef DEBUG if (ddt && debug == 0) { @@ -648,7 +651,13 @@ main(argc, argv, envp) } else tp = NULL; tmpmask = mask; +#ifdef NeXT + sigsetmask(old_sigmask); /* Let queued signals run. */ +#endif n = select(nfds, &tmpmask, (fd_set *)NULL, (fd_set *)NULL, tp); +#ifdef NeXT + old_sigmask = sigblock(sigmask(SIGCHLD)); +#endif if (n < 0 && errno != EINTR) { syslog(LOG_ERR, "select: %m"); sleep(60); @@ -661,7 +670,8 @@ main(argc, argv, envp) dqp = dqp->dq_next) { if (FD_ISSET(dqp->dq_dfd, &tmpmask)) for (udpcnt = 0; udpcnt < 42; udpcnt++) { /*XXX*/ - from_len = sizeof(from_addr); + int from_len = sizeof(from_addr); + if ((n = recvfrom(dqp->dq_dfd, (char *)buf, sizeof(buf), 0, (struct sockaddr *)&from_addr, &from_len)) < 0) { @@ -702,7 +712,8 @@ main(argc, argv, envp) ** which, if our accept() failed, will bring us back here. */ if (FD_ISSET(vs, &tmpmask)) { - from_len = sizeof(from_addr); + int from_len = sizeof(from_addr); + rfd = accept(vs, (struct sockaddr *)&from_addr, &from_len); @@ -1173,7 +1184,7 @@ static void opensocket(dqp) register struct qdatagram *dqp; { - int n, m; + int m, n; int on = 1; /* @@ -1223,6 +1234,7 @@ opensocket(dqp) exit(1); #endif } + FD_SET(dqp->dq_dfd, &mask); } /* @@ -1527,34 +1539,38 @@ sqflush(allbut) /* void * dqflush(gen) * close/deallocate all the udp sockets, unless `gen' != (time_t)0 - * in which case all those not matching this generation will - * be deleted except the 0.0.0.0 element, and syslog() will - * be called whenever something is deleted. + * in which case all those not from this generation (except 0.0.0.0) + * will be deleted, and syslog() will be called. + * known bugs: + * the above text is impenetrable. * side effects: - * global list `datagramq' is modified + * global list `datagramq' is modified. */ void dqflush(gen) register time_t gen; { - register struct qdatagram *dqp, *pqp, *nqp; + register struct qdatagram *this, *prev, *next; - for (pqp = NULL, dqp = datagramq; - dqp != NULL; - pqp = dqp, dqp = nqp) { - nqp = dqp->dq_next; + prev = NULL; + for (this = datagramq; this != NULL; this = next) { + next = this->dq_next; if (gen != (time_t)0) { - if (dqp->dq_addr.s_addr == INADDR_ANY || - dqp->dq_gen == gen) + if (this->dq_addr.s_addr == INADDR_ANY || + this->dq_gen == gen) { + prev = this; continue; + } syslog(LOG_NOTICE, "interface [%s] missing; deleting", - inet_ntoa(dqp->dq_addr)); + inet_ntoa(this->dq_addr)); } - if (pqp != NULL) - pqp->dq_next = dqp->dq_next; + FD_CLR(this->dq_dfd, &mask); + my_close(this->dq_dfd); + free(this); + if (prev == NULL) + datagramq = next; else - datagramq = dqp->dq_next; - free(dqp); + prev->dq_next = next; } } diff --git a/usr.sbin/named/ns_maint.c b/usr.sbin/named/ns_maint.c index 541ac85c0375..920b8d474459 100644 --- a/usr.sbin/named/ns_maint.c +++ b/usr.sbin/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.8 1995/06/29 09:26:17 vixie Exp $"; +static char rcsid[] = "$Id: ns_maint.c,v 1.1.1.3 1995/10/23 09:26:20 peter Exp $"; #endif /* not lint */ /* @@ -362,6 +362,9 @@ startxfer(zp) #ifdef GEN_AXFR char class_str[10]; #endif +#ifdef POSIX_SIGNALS + sigset_t sset; +#endif dprintf(1, (ddt, "startxfer() %s\n", zp->z_origin)); @@ -441,12 +444,22 @@ startxfer(zp) gettime(&tt); #ifndef SYSV +#if defined(POSIX_SIGNALS) + sigemptyset(&sset); + sigaddset(&sset,SIGCHLD); + sigprocmask(SIG_BLOCK,&sset,NULL); +#else omask = sigblock(sigmask(SIGCHLD)); +#endif #endif if ((pid = vfork()) == -1) { syslog(LOG_ERR, "xfer vfork: %m"); #ifndef SYSV +#if defined(POSIX_SIGNALS) + sigprocmask(SIG_UNBLOCK,&sset,NULL); +#else (void) sigsetmask(omask); +#endif #endif zp->z_time = tt.tv_sec + 10; return; @@ -466,8 +479,12 @@ startxfer(zp) xfers_running++; zp->z_time = tt.tv_sec + MAX_XFER_TIME; #ifndef SYSV +#if defined(POSIX_SIGNALS) + sigprocmask(SIG_UNBLOCK,&sset,NULL); +#else (void) sigsetmask(omask); #endif +#endif } const char * diff --git a/usr.sbin/named/ns_req.c b/usr.sbin/named/ns_req.c index 1cfbef9f86f9..3de62130d2ca 100644 --- a/usr.sbin/named/ns_req.c +++ b/usr.sbin/named/ns_req.c @@ -1,6 +1,6 @@ #if !defined(lint) && !defined(SABER) static char sccsid[] = "@(#)ns_req.c 4.47 (Berkeley) 7/1/91"; -static char rcsid[] = "$Id: ns_req.c,v 8.8 1995/06/29 09:26:17 vixie Exp $"; +static char rcsid[] = "$Id: ns_req.c,v 1.1.1.3 1995/10/23 09:26:22 peter Exp $"; #endif /* not lint */ /* @@ -922,10 +922,32 @@ req_query(hp, cpp, eom, qsp, buflenp, msglenp, msg, dfd, from) */ delete_all(np, class, T_NS); #endif + for (dp = np->n_data; dp ; dp = dp->d_next) + if (dp->d_zone && match(dp, class, T_NS)) + break; + if (dp) { + /* + * we know the child zone exists but are + * missing glue. + * + * nslookup has called sysquery() to get the + * missing glue. + * + * for UDP, drop the response and let the + * client retry. for TCP, we should probably + * (XXX) hold open the TCP connection for a + * while in case the sysquery() comes back + * soon. meanwhile we SERVFAIL. + */ + if (qsp) + goto do_servfail; + break; + } np = np->n_parent; } goto fetchns; /* Try again. */ case FW_SERVFAIL: + do_servfail: hp->rcode = SERVFAIL; #ifdef DATUMREFCNT free_nsp(nsp); diff --git a/usr.sbin/named/ns_resp.c b/usr.sbin/named/ns_resp.c index 012b699feb34..208cc7581cfa 100644 --- a/usr.sbin/named/ns_resp.c +++ b/usr.sbin/named/ns_resp.c @@ -1,6 +1,6 @@ #if !defined(lint) && !defined(SABER) static char sccsid[] = "@(#)ns_resp.c 4.65 (Berkeley) 3/3/91"; -static char rcsid[] = "$Id: ns_resp.c,v 8.8 1995/07/07 07:33:52 vixie Exp $"; +static char rcsid[] = "$Id: ns_resp.c,v 1.1.1.3 1995/10/23 09:26:24 peter Exp $"; #endif /* not lint */ /* @@ -270,10 +270,10 @@ ns_resp(msg, msglen) * Here we handle bad responses from servers. * Several possibilities come to mind: * The server is sick and returns SERVFAIL - * The server returns some garbage opcode (its sick) + * The server returns some garbage opcode (it's sick) * The server can't understand our query and return FORMERR - * In all these cases, we simply drop the packet and force - * a retry. This will make him look bad due to unresponsiveness. + * In all these cases, we drop the packet, disable retries on + * this server and immediately force a retry. */ if ((hp->rcode != NOERROR && hp->rcode != NXDOMAIN) #ifndef NCACHE @@ -299,6 +299,19 @@ ns_resp(msg, msglen) nameserIncr(from_addr.sin_addr, nssRcvdErr); break; } + /* mark server as bad */ + if (!qp->q_fwd) + for (i = 0; i < (int)qp->q_naddr; i++) + if (qp->q_addr[i].ns_addr.sin_addr.s_addr + == from_addr.sin_addr.s_addr) + qp->q_addr[i].nretry = MAXRETRY; + /* XXX - doesn't handle responses sent from the wrong + * interface on a multihomed server + */ + if (qp->q_fwd || + qp->q_addr[qp->q_curaddr].ns_addr.sin_addr.s_addr + == from_addr.sin_addr.s_addr) + retry(qp); return; } @@ -357,9 +370,15 @@ ns_resp(msg, msglen) if (type == T_NS && samedomain(qp->q_domain, name)) { nameserIncr(from_addr.sin_addr, nssRcvdLDel); + /* mark server as bad */ + if (!qp->q_fwd) + for (i = 0; i < (int)qp->q_naddr; i++) + if (qp->q_addr[i].ns_addr.sin_addr.s_addr + == from_addr.sin_addr.s_addr) + qp->q_addr[i].nretry = MAXRETRY; #ifdef LAME_LOGGING if (class == C_IN && - !haveComplained((char*)nhash(name), + !haveComplained((char*)nhash(inet_etoa(&from_addr)), (char*)nhash(qp->q_domain))) syslog(LAME_LOGGING, "Lame server on '%s' (in '%s'?): %s%s\n", @@ -369,6 +388,13 @@ ns_resp(msg, msglen) ); #endif /* LAME_LOGGING */ + /* XXX - doesn't handle responses sent from the wrong + * interface on a multihomed server + */ + if (qp->q_fwd || + qp->q_addr[qp->q_curaddr].ns_addr.sin_addr.s_addr + == from_addr.sin_addr.s_addr) + retry(qp); return; } } @@ -1002,16 +1028,16 @@ ns_resp(msg, msglen) const char *result; if (qp->q_addr[i].ns != NULL) { + dprintf(1, (ddt, "ns_resp: ns %s rcnt %d (%s)\n", + qp->q_addr[i].ns->d_data, + qp->q_addr[i].ns->d_rcnt, + result)); if ((--(qp->q_addr[i].ns->d_rcnt))) result = busy; else { free((char*)qp->q_addr[i].ns); result = freed; } - dprintf(1, (ddt, "ns_resp: ns %s rcnt %d (%s)\n", - qp->q_addr[i].ns->d_data, - qp->q_addr[i].ns->d_rcnt, - result)); } if (qp->q_addr[i].nsdata != NULL) { if ((--(qp->q_addr[i].nsdata->d_rcnt))) diff --git a/usr.sbin/named/options.h b/usr.sbin/named/options.h index 84613899545f..27c223b745ab 100644 --- a/usr.sbin/named/options.h +++ b/usr.sbin/named/options.h @@ -1,7 +1,7 @@ /* options.h - specify the conditionally-compiled features * vix 28mar92 [moved out of the Makefile because they were getting too big] * - * $Id: options.h,v 4.9.1.16 1994/07/22 08:42:30 vixie Exp $ + * $Id: options.h,v 1.1.1.1 1995/10/23 09:26:10 peter Exp $ */ /* @@ -70,11 +70,14 @@ * mpa = Mark Andrews of CSIRO - DMS * rossc = Ross Cartlidge of The Univeritsy of Sydney * mtr = Marshall Rose of TPC.INT + * bg = Benoit Grange of INRIA + * ckd = Christopher Davis of Kapor Enterprises + * gns = Greg Shapiro of WPI */ #define DEBUG /* enable -d flag and SIGUSR[12] support (ucb) */ /*#define ALLOW_T_UNSPEC /* enable the "unspec" RR type for old athena (ucb) */ -#define INVQ /* enable inverse queries (nslookup) (ucb/vix) */ +/*#define INVQ /* enable inverse queries (nslookup) (ucb/vix) */ /*#define DSTORAGE /* debug malloc overruns using storage.o (ucb/vix) */ /*#define DMALLOC /* trace malloc orphans using dmalloc.o (vix) */ #define XFRNETS /* enable "xfrnets" command in named.boot (vix) */ @@ -92,13 +95,14 @@ #define DOTTED_SERIAL /* if you want to be able to specify dotted serial#s */ /*#define SENSIBLE_DOTS /* if you want dotted serial#s to make numeric sense */ #define NCACHE /* negative caching (anant@isi.edu) */ -#define VALIDATE /* validation procedure (anant@isi.edu) */ +/*#define VALIDATE /* validation procedure (anant@isi.edu) (DO NOT USE!)*/ /*#define SHORT_FNAMES /* file names used in named-xfer need to be short */ #define RESOLVSORT /* allow sorting of addresses in gethostbyname (mpa) */ -#define STUBS /* allow transfers of NS only for a zone (mpa) (EXP) */ -/*#define SUNSECURITY /* obscure fix for sunos (see below) */ +#define STUBS /* allow transfers of NS only for a zone (mpa) */ +#ifndef LOGFAC #define LOGFAC LOG_DAEMON /* what syslog facility should named use? */ -/*#define SECURE_ZONES /* if you want to inhibit world access to zone(s) */ +#endif +#define SECURE_ZONES /* if you want to inhibit world access to zones (gns)*/ #define ROUND_ROBIN /* rotate databuf list after each access (mtr) */ #define ADDAUTH /* return NS and glue w/ authorative answers (mpa) */ #define RFC1535 /* use RFC 1535 default for "search" list (vix) */ @@ -109,8 +113,12 @@ #define GETSER_LOGGING LOG_INFO /* log errors/timeouts getting serial number */ /*#define RETURNSOA /* good code that the world isn't ready for yet */ #define CLEANCACHE /* useful and necessary in the face of NCACHE */ +#define PURGE_ZONE /* remove all traces of a zone when reloading (mpa) */ #define STATS /* keep nameserver statistics; uses more memory */ -/*#define RENICE /* named-xfer should run at normal priority */ +#define RENICE /* named-xfer should run at normal priority */ +#define XSTATS /* extended statistics, syslogged periodically (bg) */ +/*#define BIND_NOTIFY /* experimental - do not enable in customer products */ +/*#define LOC_RR /* support for (draft) LOC record parsing (ckd) */ /*--------------------------------------------* * no user-servicable parts beyond this point * @@ -149,12 +157,10 @@ # endif #endif -#if defined(SUNOS4) || (defined(sun) && defined(SYSV)) -# ifndef SUNSECURITY -# define SUNSECURITY /* mandatory on suns and rlogin etc. depend on this */ -# endif -#endif - #ifdef LAME_LOGGING # define LAME_DELEGATION #endif + +#if defined(XSTATS) && !defined(STATS) +# define STATS +#endif diff --git a/usr.sbin/named/portability.h b/usr.sbin/named/portability.h index 1aeb233c387a..aff50d4992c1 100644 --- a/usr.sbin/named/portability.h +++ b/usr.sbin/named/portability.h @@ -1,7 +1,7 @@ -/* defs.h - include or define things that aren't present on all systems +/* portability.h - include or define things that aren't present on all systems * vixie@decwrl 26dec92 [new] * - * $Id: portability.h,v 4.9.1.24 1994/07/22 08:42:30 vixie Exp $ + * $Id: portability.h,v 1.1.1.1 1995/10/23 09:26:09 peter Exp $ */ /* @@ -69,6 +69,22 @@ # define TIME_H_INCLUDED #endif +#ifdef ISC +# ifndef _POSIX_SOURCE +# define _POSIX_SOURCE +# endif +# define SYSV +# define SVR3 +# define _SYSV3 +# define NEED_STRTOUL +# define NEED_FTRUNCATE +# define USE_POSIX +# include +# include +# include +# include +#endif + #if defined(__convex__) # if !defined(_POSIX_SOURCE) # define _POSIX_SOURCE @@ -85,6 +101,14 @@ # define setitimer(a,b,c) __setitimer(a,b,c) #endif +/* This is defined in the Makefile for ISC compiles. */ +#if defined(ISC) +# define ftruncate(a,b) __ftruncate(a,b) +# define USE_MEMCPY +# define USE_UTIME +# define HAVE_FCHMOD 0 +#endif + /* SCO UNIX defines only this unique symbol, apparently. */ #if defined(M_UNIX) /* XXX - why is this POSIX_SOURCE instead of _POSIX_SOURCE? */ @@ -109,13 +133,26 @@ # define BSD 43 #endif -#if defined(_POSIX_SOURCE) || defined(__sgi) || defined(ultrix) || \ +#if defined(_AUX_SOURCE) +# define vfork fork +# define NEED_STRERROR +# define NEED_STRTOUL +# define SIG_FN void +# define USE_MEMCPY +#endif + + +#if defined(SVR4) && !defined(SYSV) +# define SYSV +#endif + +#if defined(_POSIX_SOURCE) || defined(__sgi) || defined(__ultrix) || \ defined(__hpux) || (defined(BSD) && (BSD >= 199103)) || \ (defined(sun) && defined(SYSV)) # define USE_POSIX #endif -#if defined(ultrix) && !defined(BSD) +#if defined(__ultrix) && !defined(BSD) # define BSD 42 #endif @@ -123,28 +160,50 @@ # define RISCOS_BSD #endif -#if defined(SVR4) && !defined(SYSV) -# define SYSV +#if defined(SYSV) || defined(__ultrix) || defined(__osf__) \ + || (defined(BSD) && BSD >= 199306) || defined(linux) +# define USE_UTIME +# define HAVE_SETVBUF #endif -#if defined(SYSV) || defined(ultrix) || (defined(BSD) && BSD >= 199306) -# define USE_UTIME +#if defined(SYSV) && !defined(SVR4) +# define vfork fork +#endif + +#if defined(sun) || defined(SVR4) +# define NETREAD_BROKEN #endif #if defined(BSD) && BSD >= 199006 && !defined(i386) && !defined(RISCOS_BSD) # define HAVE_DAEMON #endif +#if !defined(BSD) || (BSD <= 199006) +# if !defined(NeXT) +# define NEED_INETADDR +# endif +# define NEED_INETATON +#endif + #if defined(__hpux) # if defined(__STDC__) # define select(a,b,c,d,e) select(a, (int *)b, (int *)c, (int *)d, e) # define ctime(x) ctime((const time_t *)x) # endif /*__STDC__*/ -# ifndef SYSV -# define USE_UTIME -# define setlinebuf(x) setvbuf(x, NULL, _IOLBF, BUFSIZ) -# define SIGWINCH SIGWINDOW +# if !defined(SYSV) +# define USE_UTIME +# define setlinebuf(x) setvbuf(x, NULL, _IOLBF, BUFSIZ) +# if !defined(SIGWINCH) /*pre 9.0*/ +# define SIGWINCH SIGWINDOW +# endif # endif /*SYSV*/ +/* XXX: better autodetection of the need for "struct linger" would be nice */ +# if 0 +struct linger { + int l_onoff; /* option on/off */ + int l_linger; /* linger time */ +}; +# endif #endif /*__hpux*/ #if defined(_SEQUENT_) @@ -219,6 +278,10 @@ extern long pathconf __P((const char *path, int name)); # define INT_MAX 2147483647 /* max decimal value of an "int" */ #endif +#ifndef RAND_MAX +# define RAND_MAX 0x7fffffff +#endif + #ifndef IN_LOOPBACKNET # define IN_LOOPBACKNET 127 #endif @@ -245,8 +308,10 @@ int strcasecmp __P((const char *, const char *)); !defined(NeXT) && \ !defined(__convex__) && \ !defined(USE_POSIX) -extern void syslog(); -extern char *ctime __P((const time_t *clock)); +# if !defined(NCR) +extern void syslog(); +# endif +extern char *ctime __P((const time_t *clock)); extern int close(), setitimer(), recv(), sendto(), sigsetmask(), atoi(), getpid(), fork(), read(), ioctl(), setsockopt(), socket(), bind(); @@ -260,7 +325,11 @@ extern int close(), setitimer(), recv(), sendto(), sigsetmask(), * define them in terms of bcopy et al if !defined(__STDC__) * but that's more work. */ +#if defined(USE_MEMCPY) +# define bcopy(a,b,c) memcpy(b,a,c) +#else # define bcopy(a,b,c) memmove(b,a,c) +#endif # define bzero(a,b) memset(a,0,b) # define bcmp(a,b,c) memcmp(a,b,c) # else @@ -274,19 +343,27 @@ extern int bcmp(); && !defined(USE_POSIX) && !defined(apollo) && !defined(sequent) \ && !defined(M_UNIX) # define NEED_STRERROR +#if !defined(ultrix) && !defined(NCR) # define NEED_PUTENV #endif +#endif #if defined(SUNOS4) # define NEED_STRERROR +# if defined(sun386) +# define pid_t int +# define NEED_STRCASECMP +# endif #endif #if (!defined(BSD) || (BSD < 43)) # define NEED_MKSTEMP -# if !defined(ultrix) && !defined(apollo) +# if !defined(__ultrix) && !defined(apollo) # define NEED_STRCASECMP # define NEED_MKTEMP -# define NEED_STRPBRK +# if !defined(SVR4) +# define NEED_STRPBRK +# endif # endif #endif @@ -302,7 +379,7 @@ extern int bcmp(); #ifndef SIG_FN # ifdef BSD # if (BSD >= 199006) || defined(NeXT) || defined(__osf__) || defined(sun) \ - || defined(ultrix) || defined(apollo) || defined(POSIX_SIGNALS) + || defined(__ultrix) || defined(apollo) || defined(POSIX_SIGNALS) # define SIG_FN void /* signal-catching functions return void */ # else # define SIG_FN int /* signal-catching functions return int */ @@ -319,7 +396,7 @@ extern u_long htonl(), ntohl(); #endif #if defined(USE_POSIX) && !defined(sun) && !defined(__sgi) \ - && !defined(__convex__) && !defined(ultrix) + && !defined(__convex__) && !defined(__ultrix) && !defined(_AUX_SOURCE) # define PORT_NONBLOCK O_NONBLOCK # define PORT_WOULDBLK EAGAIN #else @@ -339,7 +416,7 @@ extern u_long htonl(), ntohl(); #define waitpid(x,y,z) (wait3(y,z,(struct rusage *)NULL)) #endif -#if defined(NeXT) || defined(_AIX) +#if defined(NeXT) || defined(_AIX) || defined(sun386) # undef WIFEXITED # undef WEXITSTATUS # undef WIFSIGNALED @@ -352,13 +429,13 @@ extern u_long htonl(), ntohl(); #endif /* sequent */ #if !defined(WIFEXITED) -# define WIFEXITED(x) (!(x & 0200)) +# define WIFEXITED(x) (!(x & 0177)) #endif #if !defined(WEXITSTATUS) # define WEXITSTATUS(x) (x >> 8) #endif #if !defined(WIFSIGNALED) -# define WIFSIGNALED(x) ((x & 0200) && ((x & 0200) != 0177)) +# define WIFSIGNALED(x) ((x & 0177) && ((x & 0377) != 0177)) #endif #if !defined(WTERMSIG) # define WTERMSIG(x) (x & 0177) @@ -394,11 +471,12 @@ extern u_long htonl(), ntohl(); # define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO) #endif -#if (defined(ultrix) || defined(__osf__)) && defined(NEED_STRTOUL) +#if defined(NEED_STRTOUL) && \ + (defined(__ultrix) || defined(__osf__) || defined(NeXT)) # undef NEED_STRTOUL #endif -#if defined(ultrix) || defined(__osf__) +#if defined(__ultrix) || defined(__osf__) # define MAYBE_HESIOD #endif @@ -428,6 +506,15 @@ extern u_long htonl(), ntohl(); # endif #endif +#if defined(BSD) || defined(__osf__) || defined(__convex__) +# define HAVE_GETRUSAGE +#endif + +/* May be set in the Makefile. */ +#if defined(HAVE_GETRUSAGE) +# include +#endif + /* * Because Convex has true library function feof() which is * patently wrong (it test bit _IOREAD) we need feof() as @@ -437,6 +524,10 @@ extern u_long htonl(), ntohl(); # define feof(p) ((p)->_flag&_IOEOF) #endif +#if defined(M_UNIX) || defined(linux) +# define SPURIOUS_ECONNREFUSED +#endif + /* * Assume that a system has fchmod() unless something above says otherwise. */ diff --git a/usr.sbin/named/tools/named.reload/named.reload.8 b/usr.sbin/named/tools/named.reload/named.reload.8 index b838ea04b339..81cc84de108b 100644 --- a/usr.sbin/named/tools/named.reload/named.reload.8 +++ b/usr.sbin/named/tools/named.reload/named.reload.8 @@ -53,17 +53,17 @@ .\" .\" from hostname.7 6.4 (Berkeley) 1/16/90 .\" -.TH @INDOT_U@NAMED.RELOAD @SYS_OPS_EXT_U@ "June 26, 1993" +.TH NAMED.RELOAD 8 "June 26, 1993" .UC 5 .SH NAME -@INDOT@named.reload \- cause the name server to synchronize its database +named.reload \- cause the name server to synchronize its database .SH DESCRIPTION This command sends a \s-1SIGHUP\s+1 to the running name server. This signal is documented in -.IR named (@SYS_OPS_EXT@). +.IR named (8). .SH BUGS Does not check to see if the name server is actually running, and could use a stale PID cache file which may result in the death of an unrelated process. .SH SEE ALSO -@INDOT@named(@SYS_OPS_EXT@), @INDOT@named.restart(@SYS_OPS_EXT@) +named(8), named.restart(8) diff --git a/usr.sbin/named/tools/named.restart/named.restart.8 b/usr.sbin/named/tools/named.restart/named.restart.8 index 034bebdaec6a..8b11b64c129f 100644 --- a/usr.sbin/named/tools/named.restart/named.restart.8 +++ b/usr.sbin/named/tools/named.restart/named.restart.8 @@ -53,10 +53,10 @@ .\" .\" from hostname.7 6.4 (Berkeley) 1/16/90 .\" -.TH @INDOT_U@NAMED.RESTART @SYS_OPS_EXT_U@ "June 26, 1993" +.TH NAMED.RESTART 8 "June 26, 1993" .UC 5 .SH NAME -@INDOT@named.restart \- stop and restart the name server +named.restart \- stop and restart the name server .SH DESCRIPTION This command sends a \s-1SIGKILL\s+1 to the running name server and then starts a new one. @@ -70,4 +70,4 @@ the server could take some time to die and the new one will experience a fatal error if the old one isn't gone by the time it starts, you can be left in a situation where you have no name server at all. .SH SEE ALSO -@INDOT@named(@SYS_OPS_EXT@), @INDOT@named.reload(@SYS_OPS_EXT@) +named(8), named.reload(8) diff --git a/usr.sbin/named/xfer/named-xfer.8 b/usr.sbin/named/xfer/named-xfer.8 index 54ae2be1a5e1..6c8018567e12 100644 --- a/usr.sbin/named/xfer/named-xfer.8 +++ b/usr.sbin/named/xfer/named-xfer.8 @@ -53,10 +53,10 @@ .\" .\" from named.8 6.6 (Berkeley) 2/14/89 .\" -.TH @XFER_INDOT_U@NAMED-XFER @SYS_OPS_EXT_U@ "June 26, 1993" +.TH NAMED-XFER 8 "June 26, 1993" .UC 4 .SH NAME -@XFER_INDOT@named-xfer \- ancillary agent for inbound zone transfers +named-xfer \- ancillary agent for inbound zone transfers .SH SYNOPSIS .B named-xfer .B \-z @@ -85,7 +85,7 @@ .SH DESCRIPTION .I Named-xfer is an ancillary program executed by -.IR @INDOT@named (@SYS_OPS_EXT@) +.IR named (8) to perform an inbound zone transfer. It is rarely executed directly, and only by system administrators who are trying to debug a zone transfer problem. See RFC's 1033, 1034, and 1035 for more information on the Internet @@ -127,13 +127,13 @@ server itself. .TP .B \-p Use a different port number. The default is the standard port number -as returned by getservbyname(@LIB_NETWORK_EXT@) for service ``domain''. +as returned by getservbyname(3) for service ``domain''. .TP .B \-S Perform a restricted transfer of only the SOA, NS records and glue A records for the zone. The SOA record will not be loaded by named but will be used to determine when to verify the NS records. See the ``stubs'' directive in -.IR @INDOT@named (@SYS_OPS_EXT@) +.IR named (8) for more information. .PP Additional arguments are taken as name server addresses in so-called @@ -141,6 +141,6 @@ Additional arguments are taken as name server addresses in so-called one address must be specified. Any additional addresses will be tried in order if the first one fails to transfer to us successfully. .SH "SEE ALSO" -@INDOT@named(@SYS_OPS_EXT@), resolver(@LIB_NETWORK_EXT@), resolver(@FORMAT_EXT@), hostname(@DESC_EXT@), +named(8), resolver(3), resolver(5), hostname(7), RFC 882, RFC 883, RFC 973, RFC 974, RFC 1033, RFC 1034, RFC 1035, RFC 1123, \fIName Server Operations Guide for \s-1BIND\s+1\fR