Source-Changes-HG archive

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

[src/netbsd-1-4]: src Apply patch (requested by he):



details:   https://anonhg.NetBSD.org/src/rev/8f866eb06c0e
branches:  netbsd-1-4
changeset: 471222:8f866eb06c0e
user:      he <he%NetBSD.org@localhost>
date:      Wed Dec 13 23:57:42 2000 +0000

description:
Apply patch (requested by he):
  Upgrade to BIND version 8.2.2-P7.

diffstat:

 dist/bind/README                 |   2 +-
 dist/bind/bin/named/ns_config.c  |   6 ++-
 dist/bind/bin/named/ns_ctl.c     |   5 +-
 dist/bind/bin/named/ns_defs.h    |   6 +-
 dist/bind/bin/named/ns_forw.c    |  11 +++---
 dist/bind/bin/named/ns_func.h    |   7 ++-
 dist/bind/bin/named/ns_main.c    |  18 ++++++++++-
 dist/bind/bin/named/ns_notify.c  |  23 ++++++++++++-
 dist/bind/bin/named/ns_req.c     |  65 ++++++++++++++++++++++-----------------
 dist/bind/bin/named/ns_resp.c    |  13 ++++---
 dist/bind/bind2netbsd            |  16 ++++++++-
 dist/bind/include/arpa/nameser.h |   7 +++-
 dist/bind/lib/irs/irs_data.c     |   3 +-
 dist/bind/lib/nameser/ns_name.c  |  21 +++++++++++-
 dist/bind/lib/resolv/res_debug.c |  33 ++++++++++++++++---
 dist/bind/man/dnskeygen.1        |   6 +-
 dist/bind/man/named.8            |  14 ++++----
 usr.sbin/bind/Makefile           |   4 +-
 usr.sbin/bind/named/Makefile     |   5 +-
 usr.sbin/bind/nslookup/Makefile  |   4 +-
 20 files changed, 187 insertions(+), 82 deletions(-)

diffs (truncated from 926 to 300 lines):

diff -r c4ce4ff8f2cc -r 8f866eb06c0e dist/bind/README
--- a/dist/bind/README  Wed Dec 13 23:56:41 2000 +0000
+++ b/dist/bind/README  Wed Dec 13 23:57:42 2000 +0000
@@ -1,4 +1,4 @@
-This is the source portion of BIND version 8.2.2, Patchlevel 5.  Its
+This is the source portion of BIND version 8.2.2, Patchlevel 7.  Its
 companions are "doc" and "contrib" so you are probably not missing anything.
 
 See the CHANGES file for a detailed listing of all changes.  See the INSTALL
diff -r c4ce4ff8f2cc -r 8f866eb06c0e dist/bind/bin/named/ns_config.c
--- a/dist/bind/bin/named/ns_config.c   Wed Dec 13 23:56:41 2000 +0000
+++ b/dist/bind/bin/named/ns_config.c   Wed Dec 13 23:57:42 2000 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: ns_config.c,v 1.2.2.2 1999/12/04 16:54:13 he Exp $     */
+/*     $NetBSD: ns_config.c,v 1.2.2.3 2000/12/13 23:57:42 he Exp $     */
 
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "Id: ns_config.c,v 8.104 1999/11/08 23:09:42 vixie Exp";
+static const char rcsid[] = "Id: ns_config.c,v 8.105 1999/11/16 06:01:37 vixie Exp";
 #endif /* not lint */
 
 /*
@@ -3059,4 +3059,6 @@
 
        initial_configuration = 0;
        loading = 0;
+       /* release queued notifies */
+       notify_afterload();
 }
diff -r c4ce4ff8f2cc -r 8f866eb06c0e dist/bind/bin/named/ns_ctl.c
--- a/dist/bind/bin/named/ns_ctl.c      Wed Dec 13 23:56:41 2000 +0000
+++ b/dist/bind/bin/named/ns_ctl.c      Wed Dec 13 23:57:42 2000 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: ns_ctl.c,v 1.1.1.1.2.3 2000/10/10 21:12:23 he Exp $    */
+/*     $NetBSD: ns_ctl.c,v 1.1.1.1.2.4 2000/12/13 23:57:42 he Exp $    */
 
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "Id: ns_ctl.c,v 8.28 1999/10/13 16:39:04 vixie Exp";
+static const char rcsid[] = "Id: ns_ctl.c,v 8.28.2.1 2000/11/09 23:15:28 vixie Exp";
 #endif /* not lint */
 
 /*
@@ -248,6 +248,7 @@
        /* Add any new controls which were found. */
        for (ctl = HEAD(*new); ctl != NULL; ctl = next) {
                next = NEXT(ctl, link);
+               UNLINK(*new, ctl, link);
                APPEND(server_controls, ctl, link);
                install(ctl);
                if (ctl->sctx == NULL)
diff -r c4ce4ff8f2cc -r 8f866eb06c0e dist/bind/bin/named/ns_defs.h
--- a/dist/bind/bin/named/ns_defs.h     Wed Dec 13 23:56:41 2000 +0000
+++ b/dist/bind/bin/named/ns_defs.h     Wed Dec 13 23:57:42 2000 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: ns_defs.h,v 1.1.1.1.2.2 1999/12/04 16:54:24 he Exp $   */
+/*     $NetBSD: ns_defs.h,v 1.1.1.1.2.3 2000/12/13 23:57:43 he Exp $   */
 
 /*
  *     from ns.h       4.33 (Berkeley) 8/23/90
- *     Id: ns_defs.h,v 8.89 1999/10/07 08:24:08 vixie Exp
+ *     Id: ns_defs.h,v 8.89.2.1 2000/11/09 04:01:21 marka Exp
  */
 
 /*
@@ -604,7 +604,7 @@
 #define STREAM_CONNECT_EV      0x08
 #define STREAM_DONE_CLOSE      0x10
 #define STREAM_AXFR            0x20
-#define STREAM_AXFRIXFR                0x22
+#define STREAM_AXFRIXFR                0x40
 
 #define ALLOW_NETS     0x0001
 #define        ALLOW_HOSTS     0x0002
diff -r c4ce4ff8f2cc -r 8f866eb06c0e dist/bind/bin/named/ns_forw.c
--- a/dist/bind/bin/named/ns_forw.c     Wed Dec 13 23:56:41 2000 +0000
+++ b/dist/bind/bin/named/ns_forw.c     Wed Dec 13 23:57:42 2000 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: ns_forw.c,v 1.1.1.1.2.3 2000/10/10 21:12:26 he Exp $   */
+/*     $NetBSD: ns_forw.c,v 1.1.1.1.2.4 2000/12/13 23:57:43 he Exp $   */
 
 #if !defined(lint) && !defined(SABER)
 static const char sccsid[] = "@(#)ns_forw.c    4.32 (Berkeley) 3/3/91";
-static const char rcsid[] = "Id: ns_forw.c,v 8.68 1999/10/13 16:39:07 vixie Exp";
+static const char rcsid[] = "Id: ns_forw.c,v 8.69 1999/11/16 06:01:38 vixie Exp";
 #endif /* not lint */
 
 /*
@@ -162,7 +162,7 @@
                }
        }
 
-       qp = qnew(dname, class, type);
+       qp = qnew(dname, class, type, 1);
        getname(np, tmpdomain, sizeof tmpdomain);
        qp->q_domain = savestr(tmpdomain, 1);
        qp->q_from = from;      /* nslookup wants to know this */
@@ -1142,7 +1142,7 @@
 }
 
 struct qinfo *
-qnew(const char *name, int class, int type) {
+qnew(const char *name, int class, int type, int forward) {
        struct qinfo *qp;
        const char *s;
        int escape = 0;
@@ -1162,7 +1162,8 @@
        qp->q_type = (u_int16_t)type;
        qp->q_flags = 0;
        s = name;
-       for (;;) {              /* find forwarding zone, if any */
+       qp->q_fzone = NULL;
+       for (;forward;) {               /* find forwarding zone, if any */
                if ((qp->q_fzone = find_zone(s, class)) != NULL &&
                    (qp->q_fzone->z_flags & Z_FORWARD_SET) != 0)
                        break;
diff -r c4ce4ff8f2cc -r 8f866eb06c0e dist/bind/bin/named/ns_func.h
--- a/dist/bind/bin/named/ns_func.h     Wed Dec 13 23:56:41 2000 +0000
+++ b/dist/bind/bin/named/ns_func.h     Wed Dec 13 23:57:42 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_func.h,v 1.2.2.3 2000/10/10 21:12:30 he Exp $       */
+/*     $NetBSD: ns_func.h,v 1.2.2.4 2000/12/13 23:57:43 he Exp $       */
 
 /*
  * Copyright (c) 1985, 1990
@@ -92,7 +92,7 @@
 
 /* ns_func.h - declarations for ns_*.c's externally visible functions
  *
- * Id: ns_func.h,v 8.90 1999/10/11 18:22:20 vixie Exp
+ * Id: ns_func.h,v 8.91 1999/11/16 06:01:38 vixie Exp
  */
 
 /* ++from ns_glue.c++ */
@@ -151,6 +151,7 @@
 /* ++from ns_notify.c++ */
 #ifdef BIND_NOTIFY
 void                   ns_notify(const char *, ns_class, ns_type);
+void                   notify_afterload(void);
 void                   ns_unnotify(void);
 #endif
 /* --from ns_notify.c-- */
@@ -259,7 +260,7 @@
                        freeComplaints(void),
                        nsfwdadd(struct qinfo *, struct fwdinfo *);
 extern struct qinfo    *qfindid(u_int16_t),
-                       *qnew(const char *, int, int);
+                       *qnew(const char *, int, int, int);
 /* --from ns_forw.c-- */
 
 /* ++from ns_main.c++ */
diff -r c4ce4ff8f2cc -r 8f866eb06c0e dist/bind/bin/named/ns_main.c
--- a/dist/bind/bin/named/ns_main.c     Wed Dec 13 23:56:41 2000 +0000
+++ b/dist/bind/bin/named/ns_main.c     Wed Dec 13 23:57:42 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_main.c,v 1.4.2.4 2000/10/10 21:12:52 he Exp $       */
+/*     $NetBSD: ns_main.c,v 1.4.2.5 2000/12/13 23:57:43 he Exp $       */
 
 #if !defined(lint) && !defined(SABER)
 static const char sccsid[] = "@(#)ns_main.c    4.55 (Berkeley) 7/1/91";
@@ -756,6 +756,10 @@
                sq_remove(sp);
                return (SERVFAIL);
        }
+       if (fcntl(sp->s_rfd, F_SETFD, 1) < 0) {
+               sq_remove(sp);
+               return (SERVFAIL);
+       }
        if (sq_openw(sp, qp->q_msglen + INT16SZ) == -1) {
                sq_remove(sp);
                return (SERVFAIL);
@@ -1433,6 +1437,11 @@
                ns_notice(ns_log_default, "fcntl(dfd, F_DUPFD, 20): %s",
                          strerror(errno));
 #endif
+       if (fcntl(ifp->dfd, F_SETFD, 1) < 0) {
+               ns_error(ns_log_default, "F_SETFD: %s", strerror(errno));
+               close(ifp->dfd);
+               return (-1);
+       }
        ns_debug(ns_log_default, 1, "ifp->addr %s d_dfd %d",
                 sin_ntoa(nsa), ifp->dfd);
        if (setsockopt(ifp->dfd, SOL_SOCKET, SO_REUSEADDR,
@@ -1518,6 +1527,11 @@
                ns_notice(ns_log_default, "fcntl(sfd, F_DUPFD, 20): %s",
                          strerror(errno));
 #endif
+       if (fcntl(ifp->sfd, F_SETFD, 1) < 0) {
+               ns_error(ns_log_default, "F_SETFD: %s", strerror(errno));
+               close(ifp->sfd);
+               return (-1);
+       }
        if (setsockopt(ifp->sfd, SOL_SOCKET, SO_REUSEADDR,
                       (char *)&on, sizeof on) != 0) {
                ns_notice(ns_log_default, "setsockopt(REUSEADDR): %s",
@@ -1619,6 +1633,8 @@
                         strerror(errno));
        if (ds > evHighestFD(ev))
                ns_panic(ns_log_default, 1, "socket too high: %d", ds);
+       if (fcntl(ds, F_SETFD, 1) < 0)
+               ns_panic(ns_log_default, 1, "F_SETFD: %s", strerror(errno));
        if (setsockopt(ds, SOL_SOCKET, SO_REUSEADDR,
            (char *)&on, sizeof on) != 0) {
                ns_notice(ns_log_default, "setsockopt(REUSEADDR): %s",
diff -r c4ce4ff8f2cc -r 8f866eb06c0e dist/bind/bin/named/ns_notify.c
--- a/dist/bind/bin/named/ns_notify.c   Wed Dec 13 23:56:41 2000 +0000
+++ b/dist/bind/bin/named/ns_notify.c   Wed Dec 13 23:57:42 2000 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: ns_notify.c,v 1.1.1.1.2.2 1999/12/04 16:55:23 he Exp $ */
+/*     $NetBSD: ns_notify.c,v 1.1.1.1.2.3 2000/12/13 23:57:43 he Exp $ */
 
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "Id: ns_notify.c,v 8.4 1999/10/15 19:49:04 vixie Exp";
+static const char rcsid[] = "Id: ns_notify.c,v 8.5 1999/11/16 06:01:39 vixie Exp";
 #endif /* not lint */
 
 /*
@@ -80,6 +80,7 @@
 /* Local. */
 
 static LIST(struct notify) pending_notifies;
+static LIST(struct notify) loading_notifies;
 
 /* Public. */
 
@@ -125,6 +126,11 @@
        ni->type = type;
        evInitID(&ni->timer);
 
+       if (loading != 0) {
+               APPEND(loading_notifies, ni, link);
+               return;
+       }
+
        /* Delay notification for from five seconds up to fifteen minutes. */
        max_delay = MIN(nzones/5, 895);
        max_delay = MAX(max_delay, 25);
@@ -148,6 +154,19 @@
                 ni, zp, delay);
 }
 
+void
+notify_afterload() {
+       struct notify *ni;
+
+       INSIST(loading == 0);
+       while ((ni = HEAD(loading_notifies)) != NULL) {
+               UNLINK(loading_notifies, ni, link);
+               ns_notify(ni->name, ni->class, ni->type);
+               freestr(ni->name);
+               memput(ni, sizeof *ni);
+       }
+}
+
 /*
  * ns_unnotify()
  *     call this when all pending notifies are now considered junque.
diff -r c4ce4ff8f2cc -r 8f866eb06c0e dist/bind/bin/named/ns_req.c
--- a/dist/bind/bin/named/ns_req.c      Wed Dec 13 23:56:41 2000 +0000
+++ b/dist/bind/bin/named/ns_req.c      Wed Dec 13 23:57:42 2000 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: ns_req.c,v 1.1.1.1.2.2 1999/12/04 16:55:46 he Exp $    */
+/*     $NetBSD: ns_req.c,v 1.1.1.1.2.3 2000/12/13 23:57:43 he Exp $    */
 
 #if !defined(lint) && !defined(SABER)
 static const char sccsid[] = "@(#)ns_req.c     4.47 (Berkeley) 7/1/91";
-static const char rcsid[] = "Id: ns_req.c,v 8.104 1999/10/15 19:49:04 vixie Exp";
+static const char rcsid[] = "Id: ns_req.c,v 8.104.2.2 2000/11/09 23:15:29 vixie Exp";
 #endif /* not lint */
 
 /*
@@ -1115,7 +1115,7 @@
                if (qsp == NULL)
                        return (Finish);
                else {
-                       if (!ixfr_found) {
+                       if (!ixfr_found && type == ns_t_ixfr) {
                                qsp->flags |= STREAM_AXFRIXFR;
                                hp->qdcount = htons(1);
                        }
@@ -1593,11 +1593,11 @@
        }
 #endif
        if ((n = dn_comp(name, buf, buflen, comp_ptrs, edp)) < 0)
-               return (-1);
+               goto cleanup;
        cp = buf + n;
        buflen -= n;
        if (buflen < 0)
-               return (-1);
+               goto cleanup;
        PUTSHORT((u_int16_t)type, cp);
        PUTSHORT((u_int16_t)dp->d_class, cp);
        PUTLONG(ttl, cp);
@@ -1610,7 +1610,7 @@
        case T_PTR:
                n = dn_comp((char *)dp->d_data, cp, buflen, comp_ptrs, edp);
                if (n < 0)
-                       return (-1);
+                       goto cleanup;
                PUTSHORT((u_int16_t)n, sp);



Home | Main Index | Thread Index | Old Index