Source-Changes-HG archive

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

[src/trunk]: src synchronize with BIND 8.2.2-P7.



details:   https://anonhg.NetBSD.org/src/rev/1ec9e13297a4
branches:  trunk
changeset: 499073:1ec9e13297a4
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Nov 10 09:56:56 2000 +0000

description:
synchronize with BIND 8.2.2-P7.
- resolve conflicts (there are many conflicts with $NetBSD$ tags -
  dunno why they happen).
- type pedant (couple of typecasts).

correct yacc-generated file handling.  remove bin/named/ns_parser.h,
use the header yacc generates at compilation time.

diffstat:

 dist/bind/bin/named/ns_config.c  |    6 +-
 dist/bind/bin/named/ns_ctl.c     |    5 +-
 dist/bind/bin/named/ns_defs.h    |    2 +-
 dist/bind/bin/named/ns_forw.c    |   11 +-
 dist/bind/bin/named/ns_func.h    |    7 +-
 dist/bind/bin/named/ns_main.c    |   20 ++++-
 dist/bind/bin/named/ns_notify.c  |    2 +-
 dist/bind/bin/named/ns_parser.h  |  150 ---------------------------------------
 dist/bind/bin/named/ns_req.c     |    8 +-
 dist/bind/bin/named/ns_resp.c    |   13 ++-
 dist/bind/include/arpa/nameser.h |    2 +-
 dist/bind/lib/nameser/ns_name.c  |    2 +-
 dist/bind/lib/resolv/res_debug.c |    2 +-
 usr.sbin/bind/named/Makefile     |    3 +-
 14 files changed, 55 insertions(+), 178 deletions(-)

diffs (truncated from 465 to 300 lines):

diff -r c93651261fa1 -r 1ec9e13297a4 dist/bind/bin/named/ns_config.c
--- a/dist/bind/bin/named/ns_config.c   Fri Nov 10 09:51:03 2000 +0000
+++ b/dist/bind/bin/named/ns_config.c   Fri Nov 10 09:56:56 2000 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: ns_config.c,v 1.2 1999/11/20 19:13:29 veego Exp $      */
+/*     $NetBSD: ns_config.c,v 1.3 2000/11/10 09:56:57 itojun 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 c93651261fa1 -r 1ec9e13297a4 dist/bind/bin/named/ns_ctl.c
--- a/dist/bind/bin/named/ns_ctl.c      Fri Nov 10 09:51:03 2000 +0000
+++ b/dist/bind/bin/named/ns_ctl.c      Fri Nov 10 09:56:56 2000 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: ns_ctl.c,v 1.2 2000/10/08 19:41:17 is Exp $    */
+/*     $NetBSD: ns_ctl.c,v 1.3 2000/11/10 09:56:57 itojun 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 c93651261fa1 -r 1ec9e13297a4 dist/bind/bin/named/ns_defs.h
--- a/dist/bind/bin/named/ns_defs.h     Fri Nov 10 09:51:03 2000 +0000
+++ b/dist/bind/bin/named/ns_defs.h     Fri Nov 10 09:56:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_defs.h,v 1.1.1.2 2000/11/10 09:34:13 itojun Exp $   */
+/*     $NetBSD: ns_defs.h,v 1.2 2000/11/10 09:56:57 itojun Exp $       */
 
 /*
  *     from ns.h       4.33 (Berkeley) 8/23/90
diff -r c93651261fa1 -r 1ec9e13297a4 dist/bind/bin/named/ns_forw.c
--- a/dist/bind/bin/named/ns_forw.c     Fri Nov 10 09:51:03 2000 +0000
+++ b/dist/bind/bin/named/ns_forw.c     Fri Nov 10 09:56:56 2000 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: ns_forw.c,v 1.2 2000/10/08 19:41:17 is Exp $   */
+/*     $NetBSD: ns_forw.c,v 1.3 2000/11/10 09:56:57 itojun 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 c93651261fa1 -r 1ec9e13297a4 dist/bind/bin/named/ns_func.h
--- a/dist/bind/bin/named/ns_func.h     Fri Nov 10 09:51:03 2000 +0000
+++ b/dist/bind/bin/named/ns_func.h     Fri Nov 10 09:56:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_func.h,v 1.3 2000/10/08 19:41:18 is Exp $   */
+/*     $NetBSD: ns_func.h,v 1.4 2000/11/10 09:56:57 itojun 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 c93651261fa1 -r 1ec9e13297a4 dist/bind/bin/named/ns_main.c
--- a/dist/bind/bin/named/ns_main.c     Fri Nov 10 09:51:03 2000 +0000
+++ b/dist/bind/bin/named/ns_main.c     Fri Nov 10 09:56:56 2000 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: ns_main.c,v 1.6 2000/10/08 19:41:18 is Exp $   */
+/*     $NetBSD: ns_main.c,v 1.7 2000/11/10 09:56:57 itojun Exp $       */
 
 #if !defined(lint) && !defined(SABER)
 static const char sccsid[] = "@(#)ns_main.c    4.55 (Berkeley) 7/1/91";
-static const char rcsid[] = "Id: ns_main.c,v 8.117 1999/11/08 23:01:38 vixie Exp";
+static const char rcsid[] = "Id: ns_main.c,v 8.118 1999/11/16 05:32:18 vixie Exp";
 #endif /* not lint */
 
 /*
@@ -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 c93651261fa1 -r 1ec9e13297a4 dist/bind/bin/named/ns_notify.c
--- a/dist/bind/bin/named/ns_notify.c   Fri Nov 10 09:51:03 2000 +0000
+++ b/dist/bind/bin/named/ns_notify.c   Fri Nov 10 09:56:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_notify.c,v 1.1.1.2 2000/11/10 09:34:19 itojun Exp $ */
+/*     $NetBSD: ns_notify.c,v 1.2 2000/11/10 09:56:57 itojun Exp $     */
 
 #if !defined(lint) && !defined(SABER)
 static const char rcsid[] = "Id: ns_notify.c,v 8.5 1999/11/16 06:01:39 vixie Exp";
diff -r c93651261fa1 -r 1ec9e13297a4 dist/bind/bin/named/ns_parser.h
--- a/dist/bind/bin/named/ns_parser.h   Fri Nov 10 09:51:03 2000 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/*     $NetBSD: ns_parser.h,v 1.1.1.2 2000/11/10 09:34:27 itojun Exp $ */
-
-#ifndef YYERRCODE
-#define YYERRCODE 256
-#endif
-
-#define L_EOS 257
-#define L_IPADDR 258
-#define L_NUMBER 259
-#define L_STRING 260
-#define L_QSTRING 261
-#define L_END_INCLUDE 262
-#define T_INCLUDE 263
-#define T_OPTIONS 264
-#define T_DIRECTORY 265
-#define T_PIDFILE 266
-#define T_NAMED_XFER 267
-#define T_DUMP_FILE 268
-#define T_STATS_FILE 269
-#define T_MEMSTATS_FILE 270
-#define T_FAKE_IQUERY 271
-#define T_RECURSION 272
-#define T_FETCH_GLUE 273
-#define T_QUERY_SOURCE 274
-#define T_LISTEN_ON 275
-#define T_PORT 276
-#define T_ADDRESS 277
-#define T_RRSET_ORDER 278
-#define T_ORDER 279
-#define T_NAME 280
-#define T_CLASS 281
-#define T_CONTROLS 282
-#define T_INET 283
-#define T_UNIX 284
-#define T_PERM 285
-#define T_OWNER 286
-#define T_GROUP 287
-#define T_ALLOW 288
-#define T_DATASIZE 289
-#define T_STACKSIZE 290
-#define T_CORESIZE 291
-#define T_DEFAULT 292
-#define T_UNLIMITED 293
-#define T_FILES 294
-#define T_VERSION 295
-#define T_HOSTSTATS 296
-#define T_DEALLOC_ON_EXIT 297
-#define T_TRANSFERS_IN 298
-#define T_TRANSFERS_OUT 299
-#define T_TRANSFERS_PER_NS 300
-#define T_TRANSFER_FORMAT 301
-#define T_MAX_TRANSFER_TIME_IN 302
-#define T_SERIAL_QUERIES 303
-#define T_ONE_ANSWER 304
-#define T_MANY_ANSWERS 305
-#define T_NOTIFY 306
-#define T_AUTH_NXDOMAIN 307
-#define T_MULTIPLE_CNAMES 308
-#define T_USE_IXFR 309
-#define T_MAINTAIN_IXFR_BASE 310
-#define T_CLEAN_INTERVAL 311
-#define T_INTERFACE_INTERVAL 312
-#define T_STATS_INTERVAL 313
-#define T_MAX_LOG_SIZE_IXFR 314
-#define T_HEARTBEAT 315
-#define T_USE_ID_POOL 316
-#define T_MAX_NCACHE_TTL 317
-#define T_HAS_OLD_CLIENTS 318
-#define T_RFC2308_TYPE1 319
-#define T_LAME_TTL 320
-#define T_MIN_ROOTS 321
-#define T_TREAT_CR_AS_SPACE 322
-#define T_LOGGING 323
-#define T_CATEGORY 324
-#define T_CHANNEL 325
-#define T_SEVERITY 326
-#define T_DYNAMIC 327
-#define T_FILE 328
-#define T_VERSIONS 329
-#define T_SIZE 330
-#define T_SYSLOG 331
-#define T_DEBUG 332
-#define T_NULL_OUTPUT 333
-#define T_PRINT_TIME 334
-#define T_PRINT_CATEGORY 335
-#define T_PRINT_SEVERITY 336
-#define T_SORTLIST 337
-#define T_TOPOLOGY 338
-#define T_SERVER 339
-#define T_LONG_AXFR 340
-#define T_BOGUS 341
-#define T_TRANSFERS 342
-#define T_KEYS 343
-#define T_SUPPORT_IXFR 344
-#define T_ZONE 345
-#define T_IN 346
-#define T_CHAOS 347
-#define T_HESIOD 348
-#define T_TYPE 349
-#define T_MASTER 350
-#define T_SLAVE 351
-#define T_STUB 352



Home | Main Index | Thread Index | Old Index