BIND 10 trac2430, updated. 4df951747393f5e59babd70ecba190b6dcb2fd74 [2430] Rename variables to match BIND 9 ARM documentation

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Feb 14 13:37:02 UTC 2014


The branch, trac2430 has been updated
       via  4df951747393f5e59babd70ecba190b6dcb2fd74 (commit)
       via  a0d7b9f1bcd89644e4eeb256c2083809273e40c6 (commit)
       via  98a54e274774cb7b8f1d2d3673fa39f3ef14beb8 (commit)
       via  23911dbc9aafb2f8b00755a74284ac82dba19bee (commit)
       via  1cc088ff06c72fa566dde903f972450f4a78ce1b (commit)
      from  f6d053c16792e0a511af21ca758b14fcf26ae032 (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 4df951747393f5e59babd70ecba190b6dcb2fd74
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri Feb 14 19:05:01 2014 +0530

    [2430] Rename variables to match BIND 9 ARM documentation

commit a0d7b9f1bcd89644e4eeb256c2083809273e40c6
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri Feb 14 19:01:20 2014 +0530

    [2430] Check NS records too in lettuce test

commit 98a54e274774cb7b8f1d2d3673fa39f3ef14beb8
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri Feb 14 18:55:24 2014 +0530

    [2430] Update test comment

commit 23911dbc9aafb2f8b00755a74284ac82dba19bee
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri Feb 14 18:53:26 2014 +0530

    [2430] Fix separator spelling

commit 1cc088ff06c72fa566dde903f972450f4a78ce1b
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri Feb 14 18:52:46 2014 +0530

    [2430] Update copyright year

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

Summary of changes:
 src/lib/dns/master_loader.cc                 |   24 ++++++++++++------------
 src/lib/dns/tests/master_loader_unittest.cc  |    5 +++--
 tests/lettuce/features/master_loader.feature |    7 +++++++
 tests/lettuce/features/terrain/terrain.py    |    3 +--
 4 files changed, 23 insertions(+), 16 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/master_loader.cc b/src/lib/dns/master_loader.cc
index 9a8d688..6073125 100644
--- a/src/lib/dns/master_loader.cc
+++ b/src/lib/dns/master_loader.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2014  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -460,9 +460,9 @@ genNibbles(int i, unsigned int width, bool uppercase) {
             --width;
         }
 
-        // If width is non zero then we need to add a label seperator.
+        // If width is non zero then we need to add a label separator.
         // If value is non zero then we need to add another label and
-        // that requires a label seperator.
+        // that requires a label separator.
         if (width > 0 || i != 0) {
             rstr.push_back('.');
 
@@ -498,30 +498,30 @@ MasterLoader::MasterLoaderImpl::generateForIter(const std::string& str,
           } else {
               const char* scan_str =
                   str.c_str() + std::distance(str.begin(), it);
-              int delta = 0;
+              int offset = 0;
               unsigned int width;
-              char mode[2] = {'d', 0}; // char plus null byte
+              char base[2] = {'d', 0}; // char plus null byte
               const int n = sscanf(scan_str, "{%d,%u,%1[doxXnN]}",
-                                   &delta, &width, mode);
+                                   &offset, &width, base);
               switch (n) {
               case 1:
-                  rstr += boost::str(boost::format("%d") % (i + delta));
+                  rstr += boost::str(boost::format("%d") % (i + offset));
                   break;
 
               case 2: {
                   const std::string fmt =
                       boost::str(boost::format("%%0%ud") % width);
-                  rstr += boost::str(boost::format(fmt) % (i + delta));
+                  rstr += boost::str(boost::format(fmt) % (i + offset));
                   break;
               }
 
               case 3:
-                  if ((mode[0] == 'n') || (mode[0] == 'N')) {
-                      rstr += genNibbles(i + delta, width, (mode[0] == 'N'));
+                  if ((base[0] == 'n') || (base[0] == 'N')) {
+                      rstr += genNibbles(i + offset, width, (base[0] == 'N'));
                   } else {
                       const std::string fmt =
-                          boost::str(boost::format("%%0%u%c") % width % mode[0]);
-                      rstr += boost::str(boost::format(fmt) % (i + delta));
+                          boost::str(boost::format("%%0%u%c") % width % base[0]);
+                      rstr += boost::str(boost::format(fmt) % (i + offset));
                   }
                   break;
 
diff --git a/src/lib/dns/tests/master_loader_unittest.cc b/src/lib/dns/tests/master_loader_unittest.cc
index b12034f..3bfd9f9 100644
--- a/src/lib/dns/tests/master_loader_unittest.cc
+++ b/src/lib/dns/tests/master_loader_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2014  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -538,7 +538,8 @@ TEST_F(MasterLoaderTest, generateWithModifiers) {
         "$GENERATE 106-107 host$ TXT \"Value ${0,9,n}\"\n"
         "$GENERATE 109-110 host$ TXT \"Value ${0,9,N}\"\n"
 
-        // Junk type will not parse and 'd' is assumed.
+        // Junk type will not parse and 'd' is assumed. No error is
+        // generated (this is to match BIND 9 behavior).
         "$GENERATE 200-201 host${0,4,j} A 192.0.2.$\n";
     stringstream ss(input);
     setLoader(ss, Name("example.org."), RRClass::IN(),
diff --git a/tests/lettuce/features/master_loader.feature b/tests/lettuce/features/master_loader.feature
index 8271074..4706b32 100644
--- a/tests/lettuce/features/master_loader.feature
+++ b/tests/lettuce/features/master_loader.feature
@@ -41,3 +41,10 @@ Feature: Master loader feature
         host4.example.org.        3600    IN      A       192.0.2.4
         """
         A query for host5.example.org should have rcode NXDOMAIN
+
+        A query for example.org type NS should have rcode NOERROR
+        The answer section of the last query response should be
+        """
+        example.org.              3600    IN      NS      ns1.example.org.
+        example.org.              3600    IN      NS      ns2.example.org.
+        """
diff --git a/tests/lettuce/features/terrain/terrain.py b/tests/lettuce/features/terrain/terrain.py
index f20dfc8..e59a289 100644
--- a/tests/lettuce/features/terrain/terrain.py
+++ b/tests/lettuce/features/terrain/terrain.py
@@ -1,5 +1,4 @@
-
-# Copyright (C) 2011  Internet Systems Consortium.
+# Copyright (C) 2011-2014  Internet Systems Consortium.
 #
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above



More information about the bind10-changes mailing list