]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Backing out changes that should have been held for 9.3.6
authorEvan Hunt <each@isc.org>
Thu, 3 Apr 2008 00:17:08 +0000 (00:17 +0000)
committerEvan Hunt <each@isc.org>
Thu, 3 Apr 2008 00:17:08 +0000 (00:17 +0000)
CHANGES
lib/dns/adb.c
lib/dns/rbt.c
util/copyrights

diff --git a/CHANGES b/CHANGES
index 85d8033b5bf6a73e00d9e8f4a55e7b3861ef55e8..d997c46c22ff75a2089dc070e122a65eec23302f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,3 @@
-2347.  [bug]           Delete now traverses the RB tree in the canonical
-                       order. [RT #17451]
-
-2343.  [bug]           (Seemingly) duplicate IPv6 entries could be
-                       created in ADB. [RT #17837]
-
        --- 9.3.5rc2 released ---
 
 2338.  [bug]           check_ds() could be called with a non DS rdataset.
index 0d90e5497d67c3e0e59cbcf567f773d4574c88d7..ae241dfa134e7d0962d7a704098a07fc8929afa3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004-2008  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 1999-2003  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: adb.c,v 1.181.2.11.2.32 2008/03/20 23:45:32 tbox Exp $ */
+/* $Id: adb.c,v 1.181.2.11.2.33 2008/04/03 00:17:07 each Exp $ */
 
 /*
  * Implementation notes
@@ -488,7 +488,6 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
        isc_boolean_t new_addresses_added;
        dns_rdatatype_t rdtype;
        unsigned int findoptions;
-       dns_adbnamehooklist_t *hookhead;
 
        INSIST(DNS_ADBNAME_VALID(adbname));
        adb = adbname->adb;
@@ -513,12 +512,10 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
                        INSIST(rdata.length == 4);
                        memcpy(&ina.s_addr, rdata.data, 4);
                        isc_sockaddr_fromin(&sockaddr, &ina, 0);
-                       hookhead = &adbname->v4;
                } else {
                        INSIST(rdata.length == 16);
                        memcpy(in6a.s6_addr, rdata.data, 16);
                        isc_sockaddr_fromin6(&sockaddr, &in6a, 0);
-                       hookhead = &adbname->v6;
                }
 
                INSIST(nh == NULL);
@@ -547,7 +544,7 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
 
                        link_entry(adb, addr_bucket, entry);
                } else {
-                       for (anh = ISC_LIST_HEAD(*hookhead);
+                       for (anh = ISC_LIST_HEAD(adbname->v4);
                             anh != NULL;
                             anh = ISC_LIST_NEXT(anh, plink))
                                if (anh->entry == foundentry)
@@ -560,8 +557,12 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
                }
 
                new_addresses_added = ISC_TRUE;
-               if (nh != NULL)
-                       ISC_LIST_APPEND(*hookhead, nh, plink);
+               if (nh != NULL) {
+                       if (rdtype == dns_rdatatype_a)
+                               ISC_LIST_APPEND(adbname->v4, nh, plink);
+                       else
+                               ISC_LIST_APPEND(adbname->v6, nh, plink);
+               }
                nh = NULL;
                result = dns_rdataset_next(rdataset);
        }
index e54916725c142160e3794d05ab45ed127a81bb2e..46c317d262bceedc533f108018432930e37507bb 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rbt.c,v 1.115.2.2.2.16 2008/03/31 13:37:44 fdupont Exp $ */
+/* $Id: rbt.c,v 1.115.2.2.2.17 2008/04/03 00:17:07 each Exp $ */
 
 /* Principal Authors: DCL */
 
@@ -2048,6 +2048,10 @@ dns_rbt_deletetreeflat(dns_rbt_t *rbt, unsigned int quantum,
                node = LEFT(node);
                goto traverse;
        }
+       if (RIGHT(node) != NULL) {
+               node = RIGHT(node);
+               goto traverse;
+       }
        if (DOWN(node) != NULL) {
                node = DOWN(node);
                goto traverse;
@@ -2064,15 +2068,14 @@ dns_rbt_deletetreeflat(dns_rbt_t *rbt, unsigned int quantum,
        node->magic = 0;
 #endif
        parent = PARENT(node);
-       if (RIGHT(node) != NULL)
-               PARENT(RIGHT(node)) = parent;
        if (parent != NULL) {
                if (LEFT(parent) == node)
-                       LEFT(parent) = RIGHT(node);
+                       LEFT(parent) = NULL;
                else if (DOWN(parent) == node)
-                       DOWN(parent) = RIGHT(node);
-       } else
-               parent = RIGHT(node);
+                       DOWN(parent) = NULL;
+               else if (RIGHT(parent) == node)
+                       RIGHT(parent) = NULL;
+       }
        isc_mem_put(rbt->mctx, node, NODE_SIZE(node));
        rbt->nodecount--;
        node = parent;
index e577d55815fef441f6af9efebe594da4dcde1128..b0d7986ba8af4aec37253c43c9f4805547fc77ff 100644 (file)
 ./lib/dns/.cvsignore                           X       1998,1999,2000,2001
 ./lib/dns/Makefile.in                          MAKE    1998,1999,2000,2001,2002,2003,2004,2006
 ./lib/dns/acl.c                                        C       1999,2000,2001,2002,2003,2004,2006,2007
-./lib/dns/adb.c                                        C       1999,2000,2001,2002,2003,2004,2005,2006,2007,2008
+./lib/dns/adb.c                                        C       1999,2000,2001,2002,2003,2004,2005,2006,2007
 ./lib/dns/api                                  X       1999,2000,2001,2002,2003,2004,2005,2006,2007,2008
 ./lib/dns/byaddr.c                             C       2000,2001,2002,2003,2004
 ./lib/dns/cache.c                              C       1999,2000,2001,2002,2003,2004,2005,2006