BIND 10 master, updated. 31b0982e2b3a7c2f4a3cd31712a996aa3519944e Merge branch 'master' of ssh://bind10.isc.org/var/bind10/git/bind10

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Mar 16 11:10:51 UTC 2011


The branch, master has been updated
       via  31b0982e2b3a7c2f4a3cd31712a996aa3519944e (commit)
       via  eab1ff6c4b905655feb4aa76966e48e6112e3f63 (commit)
       via  cd1a6e393c28200adc827298ab4776f37e077af7 (commit)
       via  1b24dfdd078a3eddf6198d9561ae8bb93803103d (commit)
       via  447c40bcee5edbd71ee1b3812fa71727b2fdc7a6 (commit)
      from  2754c99e705b7d45551aafe014fc2c11e6e4e6e3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 31b0982e2b3a7c2f4a3cd31712a996aa3519944e
Merge: eab1ff6c4b905655feb4aa76966e48e6112e3f63 2754c99e705b7d45551aafe014fc2c11e6e4e6e3
Author: Jelte Jansen <jelte at isc.org>
Date:   Wed Mar 16 12:07:04 2011 +0100

    Merge branch 'master' of ssh://bind10.isc.org/var/bind10/git/bind10

commit eab1ff6c4b905655feb4aa76966e48e6112e3f63
Merge: cd1a6e393c28200adc827298ab4776f37e077af7 32e4aaa9bdc0dc4e618960e0f6aa6c25105547c3
Author: Jelte Jansen <jelte at isc.org>
Date:   Wed Mar 16 11:52:53 2011 +0100

    Merge branch 'master' of ssh://bind10.isc.org/var/bind10/git/bind10

commit cd1a6e393c28200adc827298ab4776f37e077af7
Merge: 18ea57dd5bdcdd3e4e0dffef3f656597e4f06713 1b24dfdd078a3eddf6198d9561ae8bb93803103d
Author: Jelte Jansen <jelte at isc.org>
Date:   Wed Mar 16 11:51:15 2011 +0100

    [master] Merge branch 'trac488'
    
    Conflicts:
    	src/lib/resolve/recursive_query.cc

-----------------------------------------------------------------------

Summary of changes:
 src/lib/nsas/glue_hints.cc         |    2 +-
 src/lib/resolve/recursive_query.cc |   37 +++++++++++++++++++----------------
 2 files changed, 21 insertions(+), 18 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/nsas/glue_hints.cc b/src/lib/nsas/glue_hints.cc
index 297eea7..d4c653a 100644
--- a/src/lib/nsas/glue_hints.cc
+++ b/src/lib/nsas/glue_hints.cc
@@ -112,7 +112,7 @@ GlueHints::getGlue(AddressFamily family) const {
     long int selection = random() % max;
 
     if (family == ANY_OK) {
-        if (selection <= v4s) {
+        if (selection < v4s) {
             return addresses_v4[selection];
         } else {
             return addresses_v6[selection-v4s];
diff --git a/src/lib/resolve/recursive_query.cc b/src/lib/resolve/recursive_query.cc
index 485e607..b68d80f 100644
--- a/src/lib/resolve/recursive_query.cc
+++ b/src/lib/resolve/recursive_query.cc
@@ -226,6 +226,7 @@ private:
     // if we have a response for our query stored already. if
     // so, call handlerecursiveresponse(), if not, we call send()
     void doLookup() {
+        cur_zone_ = ".";
         dlog("doLookup: try cache");
         Message cached_message(Message::RENDER);
         isc::resolve::initResponseMessage(question_, cached_message);
@@ -241,7 +242,6 @@ private:
                 stop();
             }
         } else {
-            cur_zone_ = ".";
             send();
         }
         
@@ -260,13 +260,13 @@ private:
                 test_server_.second, buffer_, this,
                 query_timeout_);
             io_.get_io_service().post(query);
-		} else {
-	        IOFetch query(protocol_, io_, question_,
-	            current_ns_address.getAddress(),
-	            53, buffer_, this,
-	            query_timeout_);
-	        io_.get_io_service().post(query);
-		}
+        } else {
+            IOFetch query(protocol_, io_, question_,
+                current_ns_address.getAddress(),
+                53, buffer_, this,
+                query_timeout_);
+            io_.get_io_service().post(query);
+        }
     }
     
     // 'general' send; if we are in forwarder mode, send a query to
@@ -389,20 +389,22 @@ private:
 
             // auth section should have at least one RRset
             // and one of them should be an NS (otherwise
-            // classifier should have error'd)
-            // TODO: should we check if it really is subzone?
+            // classifier should have error'd) to a subdomain
             for (RRsetIterator rrsi = incoming.beginSection(Message::SECTION_AUTHORITY);
                  rrsi != incoming.endSection(Message::SECTION_AUTHORITY) && !found_ns;
                  ++rrsi) {
                 ConstRRsetPtr rrs = *rrsi;
                 if (rrs->getType() == RRType::NS()) {
-                    // TODO: make cur_zone_ a Name instead of a string
-                    // (this requires a few API changes in related
-                    // libraries, so as not to need many conversions)
-                    cur_zone_ = rrs->getName().toText();
-                    dlog("Referred to zone " + cur_zone_);
-                    found_ns = true;
-                    break;
+                    NameComparisonResult compare(Name(cur_zone_).compare(rrs->getName()));
+                    if (compare.getRelation() == NameComparisonResult::SUPERDOMAIN) {
+                        // TODO: make cur_zone_ a Name instead of a string
+                        // (this requires a few API changes in related
+                        // libraries, so as not to need many conversions)
+                        cur_zone_ = rrs->getName().toText();
+                        dlog("Referred to zone " + cur_zone_);
+                        found_ns = true;
+                        break;
+                    }
                 }
             }
 
@@ -494,6 +496,7 @@ public:
         callback_called_(false),
         nsas_(nsas),
         cache_(cache),
+        cur_zone_("."),
         nsas_callback_(new ResolverNSASCallback(this)),
         nsas_callback_out_(false),
         outstanding_events_(0)




More information about the bind10-changes mailing list