Source-Changes-HG archive

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

[src/netbsd-1-6]: src/dist/bind/bin/named Pull up revision 1.4 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/a166274f3aec
branches:  netbsd-1-6
changeset: 528127:a166274f3aec
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Jun 28 11:29:29 2002 +0000

description:
Pull up revision 1.4 (requested by itojun in ticket #387):
Update to BIND 8.3.3.  Fixes buffer overrun in resolver code.

diffstat:

 dist/bind/bin/named/db_defs.h |  27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

diffs (89 lines):

diff -r 3736fb17a7df -r a166274f3aec dist/bind/bin/named/db_defs.h
--- a/dist/bind/bin/named/db_defs.h     Fri Jun 28 11:29:19 2002 +0000
+++ b/dist/bind/bin/named/db_defs.h     Fri Jun 28 11:29:29 2002 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: db_defs.h,v 1.3 2001/05/17 22:59:38 itojun Exp $       */
+/*     $NetBSD: db_defs.h,v 1.3.2.1 2002/06/28 11:29:29 lukem Exp $    */
 
 /*
  *     from db.h       4.16 (Berkeley) 6/1/90
- *     Id: db_defs.h,v 8.41 2001/02/08 02:05:50 marka Exp
+ *     Id: db_defs.h,v 8.47 2002/05/18 01:02:53 marka Exp
  */
 
 /*
@@ -113,7 +113,14 @@
  * indicate what the union is being used for.  This should require less
  * memory than making d_addr a union of struct in6_addr and struct in_addr.
  */
+#ifdef CHECK_MAGIC
+#define DATABUF_MAGIC (('D'<<24)|('A'<<16)|('T'<<8)|'A')
+#endif
+
 struct databuf {
+#ifdef CHECK_MAGIC
+       u_int32_t       d_magic;        /* magic number */
+#endif
        struct databuf  *d_next;        /* linked list */
        struct in_addr  d_addr;         /* NS from whence this came */
        u_int32_t       d_ttl;          /* time to live */
@@ -132,6 +139,7 @@
        unsigned        d_clev :6;
        unsigned        d_rcode :4;     /* rcode for negative caching */
        unsigned        d_mark :3;      /* place to mark data */
+       unsigned        d_noedns :1;    /* this server does not support edns */
        int16_t         d_type;         /* type number */
        int16_t         d_size;         /* size of data area */
        u_int32_t       d_rcnt;
@@ -141,7 +149,7 @@
        u_int16_t       d_nstime;       /* NS response time, milliseconds */
        u_char          d_data[sizeof(void*)]; /* dynamic (padded) */
 };
-#define DATASIZE(n) (sizeof(struct databuf) - sizeof(void*) + n)
+#define BIND_DATASIZE(n) (sizeof(struct databuf) - sizeof(void*) + n)
 
 #ifdef HITCOUNTS
 extern u_int32_t       db_total_hits;
@@ -186,11 +194,14 @@
        struct databuf  *n_data;        /* data records */
        struct namebuf  *n_parent;      /* parent domain */
        struct hashbuf  *n_hash;        /* hash table for children */
-       char            _n_name[sizeof(void*)]; /* Counted str (dynamic). */
+       union {
+               char            _n_name[sizeof(void*)];
+               unsigned char   _n_len[sizeof(void*)];
+       } _n;                           /* Counted str (dynamic). */
 };
 #define        NAMESIZE(n)     (sizeof(struct namebuf) - sizeof(void*) + 1 + n + 1)
-#define        NAMELEN(nb)     (((u_char *)((nb)._n_name))[0])
-#define        NAME(nb)        ((nb)._n_name + 1)
+#define        NAMELEN(nb)     ((((nb)._n._n_len))[0])
+#define        NAME(nb)        ((nb)._n._n_name + 1)
 
 struct hashbuf {
        int             h_size;         /* size of hash table */
@@ -213,6 +224,7 @@
        u_int8_t        sig[TSIG_SIG_SIZE];
        struct dst_key  *key;
        int             siglen;
+       int             tsig_size;
 };
 
 struct sig_record {
@@ -229,7 +241,7 @@
        struct databuf  *dp;
        struct dnode    *dn_next;
        int             line;
-       char            *file;
+       const char      *file;
 };
 
 typedef struct dnode * dlist;
@@ -282,6 +294,7 @@
 #endif
 #define CNAMEANDOTHER  (-12)
 #define DNSSECFAIL     (-13)   /* db_set_update */
+#define NONGLUE                (-14)
 
 /*
  * getnum() options



Home | Main Index | Thread Index | Old Index