Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src Bring BIND up to 8.3.6 (requested by itojun in ticket #...



details:   https://anonhg.NetBSD.org/src/rev/1beeb2a0d8a8
branches:  netbsd-1-6
changeset: 530984:1beeb2a0d8a8
user:      jmc <jmc%NetBSD.org@localhost>
date:      Mon Oct 27 04:40:20 2003 +0000

description:
Bring BIND up to 8.3.6 (requested by itojun in ticket #1536)

diffstat:

 dist/bind/README                        |    6 +
 dist/bind/Version                       |    2 +-
 dist/bind/bin/dig/dig.c                 |  108 ++---
 dist/bind/bin/dnsquery/dnsquery.c       |    6 +-
 dist/bind/bin/host/host.c               |   48 +-
 dist/bind/bin/named-xfer/named-xfer.c   |   87 ++--
 dist/bind/bin/named/db_defs.h           |    4 +-
 dist/bind/bin/named/db_ixfr.c           |    9 +-
 dist/bind/bin/named/db_load.c           |   18 +-
 dist/bind/bin/named/db_sec.c            |    4 +-
 dist/bind/bin/named/ns_config.c         |   10 +-
 dist/bind/bin/named/ns_ctl.c            |    6 +-
 dist/bind/bin/named/ns_defs.h           |    9 +-
 dist/bind/bin/named/ns_forw.c           |   59 ++-
 dist/bind/bin/named/ns_func.h           |   16 +-
 dist/bind/bin/named/ns_glob.h           |    5 +-
 dist/bind/bin/named/ns_init.c           |   29 +-
 dist/bind/bin/named/ns_ixfr.c           |   29 +-
 dist/bind/bin/named/ns_lexer.c          |    5 +-
 dist/bind/bin/named/ns_main.c           |   95 +++-
 dist/bind/bin/named/ns_maint.c          |  113 +++--
 dist/bind/bin/named/ns_ncache.c         |    4 +-
 dist/bind/bin/named/ns_parser.y         |   22 +-
 dist/bind/bin/named/ns_req.c            |   75 ++-
 dist/bind/bin/named/ns_resp.c           |  123 +++---
 dist/bind/bin/named/ns_update.c         |   10 +-
 dist/bind/bin/ndc/ndc.c                 |   13 +-
 dist/bind/bin/nslookup/getinfo.c        |   33 +-
 dist/bind/bin/nslookup/main.c           |    6 +-
 dist/bind/bin/nslookup/send.c           |    6 +-
 dist/bind/bin/nsupdate/nsupdate.c       |   11 +-
 dist/bind/bin/probe_ipv6                |   17 +-
 dist/bind/include/arpa/nameser.h        |   10 +-
 dist/bind/include/arpa/nameser_compat.h |    5 +-
 dist/bind/include/hesiod.h              |   20 +-
 dist/bind/include/irp.h                 |   30 +-
 dist/bind/include/irs.h                 |  197 +++++----
 dist/bind/include/isc/ctl.h             |   10 +-
 dist/bind/include/isc/dst.h             |  136 ++++--
 dist/bind/include/isc/eventlib.h        |   85 ++--
 dist/bind/include/isc/irpmarshall.h     |   39 +-
 dist/bind/include/isc/logging.h         |    6 +-
 dist/bind/include/isc/misc.h            |    6 +-
 dist/bind/include/isc/tree.h            |   14 +-
 dist/bind/include/netgroup.h            |   22 +-
 dist/bind/include/port_after.h          |    3 +-
 dist/bind/include/resolv.h              |  101 ++--
 dist/bind/lib/bsd/strerror.c            |   20 +-
 dist/bind/lib/bsd/strtoul.c             |    8 +-
 dist/bind/lib/bsd/writev.c              |    5 +-
 dist/bind/lib/dst/bsafe_link.c          |    6 +-
 dist/bind/lib/dst/cylink_link.c         |    6 +-
 dist/bind/lib/dst/dst_api.c             |    7 +-
 dist/bind/lib/dst/hmac_link.c           |   13 +-
 dist/bind/lib/inet/inet_lnaof.c         |    4 +-
 dist/bind/lib/inet/inet_makeaddr.c      |    6 +-
 dist/bind/lib/inet/inet_netof.c         |    4 +-
 dist/bind/lib/inet/inet_network.c       |    4 +-
 dist/bind/lib/irs/dns_gr.c              |    6 +-
 dist/bind/lib/irs/dns_ho.c              |  600 ++-----------------------------
 dist/bind/lib/irs/dns_nw.c              |    9 +-
 dist/bind/lib/irs/gen_gr.c              |   19 +-
 dist/bind/lib/irs/getaddrinfo.c         |   65 ++-
 dist/bind/lib/irs/gethostent.c          |   61 ++-
 dist/bind/lib/irs/getnameinfo.c         |    3 +-
 dist/bind/lib/irs/getnetgrent.c         |   29 +-
 dist/bind/lib/irs/getnetgrent_r.c       |   16 +-
 dist/bind/lib/irs/hesiod.c              |   28 +-
 dist/bind/lib/irs/irp_p.h               |    6 +-
 dist/bind/lib/irs/irs_data.c            |   27 +-
 dist/bind/lib/irs/nis_gr.c              |    6 +-
 dist/bind/lib/irs/nis_ho.c              |  109 ++++-
 dist/bind/lib/isc/ctl_clnt.c            |    4 +-
 dist/bind/lib/isc/ctl_srvr.c            |    4 +-
 dist/bind/lib/isc/ev_files.c            |    4 +-
 dist/bind/lib/isc/ev_timers.c           |   16 +-
 dist/bind/lib/isc/ev_waits.c            |    4 +-
 dist/bind/lib/isc/eventlib.c            |    8 +-
 dist/bind/lib/isc/eventlib_p.h          |    6 +-
 dist/bind/lib/isc/logging.c             |   13 +-
 dist/bind/lib/nameser/ns_name.c         |   34 +-
 dist/bind/lib/nameser/ns_parse.c        |    4 +-
 dist/bind/lib/nameser/ns_print.c        |   16 +-
 dist/bind/lib/nameser/ns_samedomain.c   |   16 +-
 dist/bind/lib/nameser/ns_sign.c         |   29 +-
 dist/bind/lib/resolv/res_comp.c         |   10 +-
 dist/bind/lib/resolv/res_debug.c        |   40 +-
 dist/bind/lib/resolv/res_findzonecut.c  |  115 ++++--
 dist/bind/lib/resolv/res_init.c         |   53 +-
 dist/bind/lib/resolv/res_mkquery.c      |   76 +--
 dist/bind/lib/resolv/res_mkupdate.c     |   70 +++-
 dist/bind/lib/resolv/res_private.h      |    3 +-
 dist/bind/lib/resolv/res_query.c        |   11 +-
 dist/bind/lib/resolv/res_send.c         |   11 +-
 dist/bind/lib/resolv/res_update.c       |   15 +-
 dist/bind/man/dig.1                     |   15 +-
 dist/bind/man/dnskeygen.1               |    4 +-
 dist/bind/man/dnsquery.1                |    4 +-
 dist/bind/man/host.1                    |    6 +-
 dist/bind/man/named-xfer.8              |   31 +-
 dist/bind/man/named.8                   |   12 +-
 dist/bind/man/named.conf.5              |   35 +-
 dist/bind/man/nslookup.8                |    6 +-
 dist/bind/man/nsupdate.8                |    4 +-
 include/arpa/inet.h                     |   12 +-
 lib/libc/net/inet_lnaof.c               |   11 +-
 lib/libc/net/inet_makeaddr.c            |   22 +-
 lib/libc/net/inet_netof.c               |   11 +-
 lib/libc/net/inet_network.c             |   18 +-
 lib/libc/net/inet_pton.c                |   35 +-
 share/man/man5/resolv.conf.5            |    4 +-
 111 files changed, 1788 insertions(+), 1743 deletions(-)

diffs (truncated from 8233 to 300 lines):

diff -r f04ce7c128f9 -r 1beeb2a0d8a8 dist/bind/README
--- a/dist/bind/README  Sun Oct 26 18:39:41 2003 +0000
+++ b/dist/bind/README  Mon Oct 27 04:40:20 2003 +0000
@@ -10,6 +10,12 @@
 Note that BIND 8 is in "end-of-life", having been replaced by BIND 9.  See
 http://www.isc.org/ for more details.
 
+BIND 8.3.6 Highlights
+       Maintenance release.
+
+BIND 8.3.5 Highlights
+       Maintenance release.
+
 BIND 8.3.4 Highlights
        Security Fix DoS and buffer overrun.
 
diff -r f04ce7c128f9 -r 1beeb2a0d8a8 dist/bind/Version
--- a/dist/bind/Version Sun Oct 26 18:39:41 2003 +0000
+++ b/dist/bind/Version Mon Oct 27 04:40:20 2003 +0000
@@ -1,1 +1,1 @@
-8.3.4-REL
+8.3.6-REL
diff -r f04ce7c128f9 -r 1beeb2a0d8a8 dist/bind/bin/dig/dig.c
--- a/dist/bind/bin/dig/dig.c   Sun Oct 26 18:39:41 2003 +0000
+++ b/dist/bind/bin/dig/dig.c   Mon Oct 27 04:40:20 2003 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: dig.c,v 1.4.2.2 2002/09/06 06:05:22 lukem Exp $        */
+/*     $NetBSD: dig.c,v 1.4.2.3 2003/10/27 04:40:20 jmc Exp $  */
 
 #ifndef lint
-static const char rcsid[] = "Id: dig.c,v 8.57 2002/06/18 02:26:49 marka Exp";
+static const char rcsid[] = "Id: dig.c,v 8.62.6.3 2003/06/02 10:06:30 marka Exp";
 #endif
 
 /*
@@ -179,6 +179,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <time.h>      /* time(2), ctime(3) */
 
 #include "port_after.h"
 
@@ -208,15 +209,23 @@
 #define SAVEENV "DiG.env"
 #define DIG_MAXARGS 30
 
+#ifndef DIG_PING
+#define DIG_PING "ping"
+#endif
+#ifndef DIG_TAIL
+#define DIG_TAIL "tail"
+#endif
+#ifndef DIG_PINGFMT
+#define DIG_PINGFMT "%s -s %s 56 3 | %s -3"
+#endif
+
 static int             eecode = 0;
 static FILE *          qfp;
-static char            *defsrv, *srvmsg;
-static char            defbuf[40] = "default -- ";
-static char            srvbuf[1024];
 static char            myhostname[MAXHOSTNAMELEN];
 static struct sockaddr_in myaddress;
 static struct sockaddr_in6 myaddress6;
 static u_int32_t       ixfr_serial;
+static char            ubuf[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:123.123.123.123")];
 
 /* stuff for nslookup modules */
 struct __res_state  res;
@@ -262,7 +271,7 @@
        } packet_;
 #define header (packet_.header_)
 #define        packet (packet_.packet_)
-       u_char answer[64*1024];
+       u_char answer[NS_MAXMSG];
        int n;
        char doping[90];
        char pingstr[50];
@@ -297,6 +306,7 @@
 
        ns_tsig_key key;
        char *keyfile = NULL, *keyname = NULL;
+       const char *pingfmt = NULL;
 
        res_ninit(&res);
        res.pfcode = PRF_DEF;
@@ -317,7 +327,6 @@
        myaddress6.sin6_addr = in6addr_any;
        myaddress6.sin6_port = 0; /*INPORT_ANY*/;
 
-       defsrv = strcat(defbuf, inet_ntoa(res.nsaddr.sin_addr));
        res_x = res;
 
 /*
@@ -365,7 +374,6 @@
                vtmp++;
        }
 
-       res.id = 1;
        gettimeofday(&tv1, NULL);
 
 /*
@@ -410,6 +418,11 @@
  * deal with ....
  */
                while (*(++argv) != NULL && **argv != '\0') { 
+                       if (strlen(cmd) + strlen(*argv) + 2 > sizeof (cmd)) {
+                               fprintf(stderr,
+                                  "Argument too large for input buffer\n");
+                               exit(1);
+                       }
                        strcat(cmd, *argv);
                        strcat(cmd, " ");
                        if (**argv == '@') {
@@ -525,10 +538,14 @@
                                                port = htons(atoi(*argv));
                                        break;
                                case 'P':
-                                       if (argv[0][2] != '\0')
+                                       if (argv[0][2] != '\0') {
                                                strcpy(pingstr, argv[0]+2);
-                                       else
-                                               strcpy(pingstr, "ping -s");
+                                               pingfmt =
+                                                       "%s %s 56 3 | %s -3";
+                                       } else {
+                                               strcpy(pingstr, DIG_PING);
+                                               pingfmt = DIG_PINGFMT;
+                                       }
                                        break;
                                case 'n':
                                        if (argv[0][2] != '\0')
@@ -771,8 +788,6 @@
  * able to "put the resolver to work".
  */
 
-               srvbuf[0] = 0;
-               srvmsg = defsrv;
                if (srv != NULL) {
                        int nscount = 0;
                        union res_sockaddr_union u[MAXNS];
@@ -805,31 +820,13 @@
                                        case AF_INET:
                                                u[nscount].sin =
                                           *(struct sockaddr_in*)cur->ai_addr;
-                                               u[nscount++].sin6.sin6_port =
+                                               u[nscount++].sin.sin_port =
                                                        port;
                                                break;
                                        }
                                }
-                               if (nscount != 0) {
-                                       char buf[80];
+                               if (nscount != 0)
                                        res_setservers(&res, u, nscount);
-                                       srvmsg = strcat(srvbuf, srv);
-                                       strcat(srvbuf, "  ");
-                                       buf[0] = '\0';
-                                       switch (u[0].sin.sin_family) {
-                                       case AF_INET:
-                                               inet_ntop(AF_INET,
-                                                         &u[0].sin.sin_addr,
-                                                         buf, sizeof(buf));
-                                               break;
-                                       case AF_INET6:
-                                               inet_ntop(AF_INET6,
-                                                         &u[0].sin6.sin6_addr,
-                                                         buf, sizeof(buf));
-                                               break;
-                                       }
-                                       strcat(srvbuf, buf);
-                               }
                                freeaddrinfo(answer);
                        } else {
                                res = res_t;
@@ -838,7 +835,6 @@
                "; Bad server: %s -- using default server and timer opts\n",
                                                srv);
                                fflush(stderr);
-                               srvmsg = defsrv;
                                srv = NULL;
                        }
                        printf("; (%d server%s found)\n",
@@ -851,7 +847,7 @@
                        int nscount;
                        union res_sockaddr_union u[MAXNS];
                        nscount = res_getservers(&res, u, MAXNS);
-                       for (i = 0; i < res.nscount; i++) {
+                       for (i = 0; i < nscount; i++) {
                                int x;
 
                                if (keyfile)
@@ -863,24 +859,11 @@
                                                      &u[i].sin,
                                                      NULL);
                                if (res.pfcode & RES_PRF_STATS) {
-                                       char buf[80];
                                        exectime = time(NULL);
-                                       buf[0] = '\0';
-                                       switch (u[i].sin.sin_family) {
-                                       case AF_INET:
-                                               inet_ntop(AF_INET,
-                                                         &u[i].sin.sin_addr,
-                                                         buf, sizeof(buf));
-                                               break;
-                                       case AF_INET6:
-                                               inet_ntop(AF_INET6,
-                                                         &u[i].sin6.sin6_addr,
-                                                         buf, sizeof(buf));
-                                               break;
-                                       }
                                        printf(";; FROM: %s to SERVER: %s\n",
                                               myhostname,
-                                              buf);
+                                              p_sockun(u[RES_GETLAST(res)],
+                                                       ubuf, sizeof(ubuf)));
                                        printf(";; WHEN: %s", ctime(&exectime));
                                }
                                if (!x)
@@ -946,12 +929,10 @@
                if ((bytes_in = n) < 0) {
                        fflush(stdout);
                        n = 0 - n;
-                       msg[0]=0;
                        if (keyfile)
-                               strcat(msg,";; res_nsendsigned to server ");
+                               strcpy(msg, ";; res_nsendsigned");
                        else
-                               strcat(msg,";; res_nsend to server ");
-                       strcat(msg,srvmsg);
+                               strcat(msg, ";; res_nsend");
                        perror(msg);
                        fflush(stderr);
 
@@ -965,13 +946,17 @@
                (void) gettimeofday(&end_time, NULL);
 
                if (res.pfcode & RES_PRF_STATS) {
+                       union res_sockaddr_union u[MAXNS];
+
+                       (void) res_getservers(&res, u, MAXNS);
                        query_time = difftv(start_time, end_time);
                        printf(";; Total query time: ");
                        prnttime(query_time);
                        putchar('\n');
                        exectime = time(NULL);
-                       printf(";; FROM: %s to SERVER: %s\n",
-                              myhostname, srvmsg);
+                       printf(";; FROM: %s to SERVER: %s\n", myhostname,
+                              p_sockun(u[RES_GETLAST(res)],
+                                       ubuf, sizeof(ubuf)));
                        printf(";; WHEN: %s", ctime(&exectime));
                        printf(";; MSG SIZE  sent: %d  rcvd: %d\n",
                               bytes_out, bytes_in);
@@ -982,9 +967,8 @@
  *   Argh ... not particularly elegant. Should put in *real* ping code.
  *   Would necessitate root priviledges for icmp port though!
  */
-               if (*pingstr) {
-                       sprintf(doping,"%s %s 56 3 | tail -3",pingstr,
-                               (srv==NULL)?(defsrv+10):srv);
+               if (*pingstr && srv != NULL) {
+                       sprintf(doping, pingfmt, pingstr, srv, DIG_TAIL);
                        system(doping);
                }
                putchar('\n');
@@ -1040,7 +1024,7 @@
        fputs("\
 notes: defname and search don't work; use fully-qualified names.\n\
        this is DiG version " VSTRING "\n\
-       Id: dig.c,v 8.57 2002/06/18 02:26:49 marka Exp\n\
+       Id: dig.c,v 8.62.6.3 2003/06/02 10:06:30 marka Exp\n\
 ", stderr);
 }
 
@@ -1385,7 +1369,7 @@
                         sizeof myaddress) < 0){
                        int e = errno;
 
-                       fprintf(stderr, ";; bind(%s:%u): %s\n",
+                       fprintf(stderr, ";; bind(%s port %u): %s\n",
                                inet_ntoa(myaddress.sin_addr),
                                ntohs(myaddress.sin_port),
                                strerror(e));
@@ -1409,7 +1393,7 @@
                        int e = errno;
                        char buf[80];
 
-                       fprintf(stderr, ";; bind(%s:%u): %s\n",
+                       fprintf(stderr, ";; bind(%s port %u): %s\n",
                                inet_ntop(AF_INET6, &myaddress6.sin6_addr,
                                          buf, sizeof(buf)),
                                ntohs(myaddress6.sin6_port),
diff -r f04ce7c128f9 -r 1beeb2a0d8a8 dist/bind/bin/dnsquery/dnsquery.c
--- a/dist/bind/bin/dnsquery/dnsquery.c Sun Oct 26 18:39:41 2003 +0000
+++ b/dist/bind/bin/dnsquery/dnsquery.c Mon Oct 27 04:40:20 2003 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: dnsquery.c,v 1.3.2.1 2002/06/28 11:28:11 lukem Exp $   */
+/*     $NetBSD: dnsquery.c,v 1.3.2.2 2003/10/27 04:40:20 jmc Exp $     */



Home | Main Index | Thread Index | Old Index