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 Pull up revision 1.4 (requested by itojun):



details:   https://anonhg.NetBSD.org/src/rev/589d2d5d9721
branches:  netbsd-1-5
changeset: 493182:589d2d5d9721
user:      he <he%NetBSD.org@localhost>
date:      Mon Jul 01 17:15:10 2002 +0000

description:
Pull up revision 1.4 (requested by itojun):
  Update BIND to version 8.3.3.

diffstat:

 dist/bind/bin/named/db_glue.c          |   75 +++----
 dist/bind/bin/named/named.conf         |   32 +-
 dist/bind/bin/named/ns_glob.h          |    6 +-
 dist/bind/bin/named/ns_lexer.c         |   26 +-
 dist/bind/bin/named/ns_lexer.h         |    8 +-
 dist/bind/bin/named/ns_sort.c          |   11 +-
 dist/bind/bin/named/ns_stats.c         |    9 +-
 dist/bind/bin/nslookup/debug.c         |   42 ++--
 dist/bind/bin/nslookup/nslookup.help   |    4 +-
 dist/bind/bin/nslookup/send.c          |   41 ++--
 dist/bind/bin/probe_ipv6               |    3 +-
 dist/bind/include/arpa/nameser.h       |   27 ++-
 dist/bind/include/isc/logging.h        |   14 +-
 dist/bind/include/netdb.h              |   32 ++-
 dist/bind/lib/dst/md5.h                |    4 +-
 dist/bind/lib/dst/md5_dgst.c           |   10 +-
 dist/bind/lib/isc/ctl_clnt.c           |   41 +++-
 dist/bind/lib/isc/ctl_srvr.c           |   70 ++++--
 dist/bind/lib/isc/eventlib.c           |   12 +-
 dist/bind/lib/isc/eventlib_p.h         |   12 +-
 dist/bind/lib/nameser/ns_name.c        |  325 ++++++++++++++++++++++++++++++--
 dist/bind/lib/resolv/res_findzonecut.c |  171 ++++++++++++----
 22 files changed, 723 insertions(+), 252 deletions(-)

diffs (truncated from 2393 to 300 lines):

diff -r 1dc57714420f -r 589d2d5d9721 dist/bind/bin/named/db_glue.c
--- a/dist/bind/bin/named/db_glue.c     Mon Jul 01 17:14:59 2002 +0000
+++ b/dist/bind/bin/named/db_glue.c     Mon Jul 01 17:15:10 2002 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: db_glue.c,v 1.1.1.1.8.3 2001/01/28 15:52:37 he Exp $   */
+/*     $NetBSD: db_glue.c,v 1.1.1.1.8.4 2002/07/01 17:15:10 he Exp $   */
 
 #if !defined(lint) && !defined(SABER)
 static const char sccsid[] = "@(#)db_glue.c    4.4 (Berkeley) 6/1/90";
-static const char rcsid[] = "Id: db_glue.c,v 8.42 2000/12/23 08:14:35 vixie Exp";
+static const char rcsid[] = "Id: db_glue.c,v 8.47 2002/05/18 01:02:54 marka Exp";
 #endif /* not lint */
 
 /*
@@ -147,8 +147,8 @@
 
        for (slp = servicelist; slp != NULL; slp = slp_next) {
                slp_next = slp->next;
-               freestr(slp->name);
-               freestr(slp->proto);
+               slp->name = freestr(slp->name);
+               slp->proto = freestr(slp->proto);
                memput(slp, sizeof *slp);
        }
        servicelist = NULL;
@@ -185,7 +185,7 @@
 
        for (plp = protolist; plp != NULL; plp = plp_next) {
                plp_next = plp->next;
-               freestr(plp->name);
+               plp->name = freestr(plp->name);
                memput(plp, sizeof *plp);
        }
        protolist = NULL;
@@ -356,31 +356,7 @@
        } else
                dp->d_next = NULL;
        dp->d_flags &= ~DB_F_ACTIVE;
-       DRCNTDEC(dp);
-       if (dp->d_rcnt) {
-#ifdef DEBUG
-               int32_t ii;
-#endif
-
-               switch(dp->d_type) {
-               case T_NS:
-                       ns_debug(ns_log_db, 3, "rm_datum: %s rcnt = %d",
-                                dp->d_data, dp->d_rcnt);
-                       break;
-#ifdef DEBUG
-               case T_A:
-                       memcpy(&ii, dp->d_data, sizeof ii);
-                       ns_debug(ns_log_db, 3,
-                                "rm_datum: %08.8X rcnt = %d",
-                                ii, dp->d_rcnt);
-                       break;
-#endif
-               default:
-                       ns_debug(ns_log_db, 3,
-                                "rm_datum: rcnt = %d", dp->d_rcnt);
-               }
-       } else
-               db_freedata(dp);
+       db_detach(&dp);
        return (ndp);
 }
 
@@ -395,8 +371,8 @@
        const char *msg;
 
        /* verify */
-       if ( (np->n_data && (msg = "data"))
-         || (np->n_hash && (msg = "hash"))
+       if ( (np->n_data != NULL && (msg = "data") != NULL)
+         || (np->n_hash != NULL && (msg = "hash") != NULL)
            ) {
                ns_panic(ns_log_db, 1, "rm_name(%p(%s)): non-nil %s pointer",
                         np, NAME(*np), msg);
@@ -465,9 +441,9 @@
        return (hval);
 }
 
-void
+static void
 db_freedata(struct databuf *dp) {
-       int bytes = DATASIZE(dp->d_size);
+       int bytes = BIND_DATASIZE(dp->d_size);
 
        if (dp->d_rcnt != 0)
                panic("db_freedata: d_rcnt != 0", NULL);
@@ -478,9 +454,28 @@
        if (dp->d_next != NULL)
                panic("db_free: d_next != NULL", NULL);
        dp->d_flags |= DB_F_FREE;
+#ifdef CHECK_MAGIC
+       dp->d_magic = 0;
+#endif
        memput(dp, bytes);
 }
 
+void
+db_detach(struct databuf **dpp) {
+       struct databuf *dp;
+
+       INSIST(dpp != NULL && *dpp != NULL);
+       dp = *dpp;
+#ifdef CHECK_MAGIC
+       INSIST(dp->d_magic == DATABUF_MAGIC);
+#endif
+
+       DRCNTDEC(dp);
+       if (dp->d_rcnt == 0)
+               db_freedata(dp);
+       *dpp = NULL;
+}
+
 struct lame_hash {
        struct lame_hash        *next;
        char                    *zone;
@@ -552,9 +547,9 @@
        this->zone = savestr(zone, 0);
        if (this->server == NULL || this->zone == NULL) {
                if (this->server != NULL)
-                       freestr(this->server);
+                       this->server = freestr(this->server);
                if (this->zone != NULL)
-                       freestr(this->zone);
+                       this->zone = freestr(this->zone);
                memput(this, sizeof *this);
                return;
        }
@@ -604,8 +599,8 @@
                this = lame_hash[i];
                while (this != NULL) {
                        if (this->when < tt.tv_sec) {
-                               freestr(this->zone);
-                               freestr(this->server);
+                               this->zone = freestr(this->zone);
+                               this->server = freestr(this->server);
                                if (last != NULL) {
                                        last->next = this->next;
                                        memput(this, sizeof *this);
@@ -637,8 +632,8 @@
                while (this != NULL) {
                        last = this;
                        this = this->next;
-                       freestr(last->zone);
-                       freestr(last->server);
+                       last->zone = freestr(last->zone);
+                       last->server = freestr(last->server);
                        memput(last, sizeof *this);
                }
        }
diff -r 1dc57714420f -r 589d2d5d9721 dist/bind/bin/named/named.conf
--- a/dist/bind/bin/named/named.conf    Mon Jul 01 17:14:59 2002 +0000
+++ b/dist/bind/bin/named/named.conf    Mon Jul 01 17:15:10 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: named.conf,v 1.2.8.1 2001/01/28 15:52:38 he Exp $      */
+/*     $NetBSD: named.conf,v 1.2.8.2 2002/07/01 17:15:10 he Exp $      */
 
 /*
  * This is a worthless, nonrunnable example of a named.conf file that has
@@ -16,6 +16,16 @@
 
 // watch out for ";" -- it's important!
 
+key sample_key {                       // for TSIG
+       algorithm hmac-md5;             // hmac-md5 is the supported algorithm
+       secret "abcdefgh";              // base 64 encoded secret
+};
+
+key key2 {
+       algorithm hmac-md5;
+       secret "87654321";
+};
+
 options {
        directory ".";                  // use current directory
        named-xfer "/usr/libexec/named-xfer";   // _PATH_XFER
@@ -44,7 +54,9 @@
                                        // notify on a zone-by-zone
                                        // basis in the "zone" statement
                                        // see (below)
-       max-serial-queries 4;           // number of parallel SOA queries
+       // notify explicit;             // only sent the notifies to the
+                                       // also-notify list
+       serial-queries 4;               // number of parallel SOA queries
                                        // we can have outstanding for master
                                        // zone change testing purposes
        auth-nxdomain yes;              // always set AA on NXDOMAIN.
@@ -185,6 +197,8 @@
                                        // zone?  The global option is used
                                        // if "notify" is not specified
                                        // here.
+       // notify explicit;             // only sent the notifies to the
+                                       // also-notify list
        also-notify { };                // don't notify any nameservers other
                                        // than those on the NS list for this
                                        // zone
@@ -196,7 +210,7 @@
        ixfr-base  "slave.demo.zone.ixfr";  // File name for IXFR transaction log file
        masters {
                1.2.3.4;                // where to zone transfer from
-               5.6.7.8;
+               5.6.7.8 key key2;
        };
        transfer-source 10.0.0.53;      // fixes multihoming problems
        check-names warn;
@@ -252,19 +266,11 @@
        };
 };
 
-key sample_key {                       // for TSIG
-       algorithm hmac-md5;             // hmac-md5 is the supported algorithm
-       secret "abcdefgh";              // base 64 encoded secret
-};
-
-key key2 {
-       algorithm hmac-md5;
-       secret "87654321";
-};
-
 acl key_acl { key sample_key; };       // a request signed with sample_key
 
 server 1.2.3.4 {
+       edns no;                        // if no, we won't send ends queries
+                                       // to this server
        bogus no;                       // if yes, we won't query or listen
                                        // to this server
        transfer-format one-answer;     // set transfer format for this
diff -r 1dc57714420f -r 589d2d5d9721 dist/bind/bin/named/ns_glob.h
--- a/dist/bind/bin/named/ns_glob.h     Mon Jul 01 17:14:59 2002 +0000
+++ b/dist/bind/bin/named/ns_glob.h     Mon Jul 01 17:15:10 2002 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: ns_glob.h,v 1.1.1.1.8.3 2001/01/28 15:52:38 he Exp $   */
+/*     $NetBSD: ns_glob.h,v 1.1.1.1.8.4 2002/07/01 17:15:11 he Exp $   */
 
 /*
  *     from ns.h       4.33 (Berkeley) 8/23/90
- *     Id: ns_glob.h,v 8.56 2000/12/02 18:39:25 vixie Exp
+ *     Id: ns_glob.h,v 8.58 2002/06/05 04:53:50 marka Exp
  */
 
 /*
@@ -333,9 +333,11 @@
 DECL   gid_t                   group_id;
 DECL   char *                  group_name              INIT(NULL);
 DECL   char *                  chroot_dir              INIT(NULL);
+DECL   char *                  working_dir             INIT(NULL);
 
 DECL   int                     loading                 INIT(0);
 
 DECL   int                     xfers_running           INIT(0);
 DECL   int                     xfers_deferred          INIT(0);
 DECL   int                     qserials_running        INIT(0);
+DECL   int                     initial_configuration   INIT(1);
diff -r 1dc57714420f -r 589d2d5d9721 dist/bind/bin/named/ns_lexer.c
--- a/dist/bind/bin/named/ns_lexer.c    Mon Jul 01 17:14:59 2002 +0000
+++ b/dist/bind/bin/named/ns_lexer.c    Mon Jul 01 17:15:10 2002 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: ns_lexer.c,v 1.1.1.1.8.3 2001/01/28 15:52:38 he Exp $  */
+/*     $NetBSD: ns_lexer.c,v 1.1.1.1.8.4 2002/07/01 17:15:11 he Exp $  */
 
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "Id: ns_lexer.c,v 8.22 2000/11/29 06:55:58 marka Exp";
+static const char rcsid[] = "Id: ns_lexer.c,v 8.31 2002/05/24 03:05:03 marka Exp";
 #endif /* not lint */
 
 /*
@@ -59,7 +59,7 @@
 #define LEXER_MAX_PUSHBACK     2
 
 typedef struct lexer_file_context {
-       const char *    name;
+       char *  name;
        FILE *          stream;
        int             line_number;
        LexerState      state;
@@ -149,6 +149,10 @@
 
 static void
 parser_complain(int is_warning, int print_last_token, const char *format,
+               va_list args) ISC_FORMAT_PRINTF(3, 0);
+
+static void
+parser_complain(int is_warning, int print_last_token, const char *format,
                va_list args)
 {
        LexerFileContext lf;
@@ -214,7 +218,7 @@
  */
 
 struct keyword {
-        char *name;
+        const char *name;
        int token;
 };
 
@@ -254,6 +258,8 @@
        {"directory", T_DIRECTORY}, 



Home | Main Index | Thread Index | Old Index