BIND 10 trac2270, updated. d2c2edbfa7d78ebeae4c79eef532814ac7072556 [2270] DHCPv6 pool parser fix.

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Oct 12 11:53:33 UTC 2012


The branch, trac2270 has been updated
       via  d2c2edbfa7d78ebeae4c79eef532814ac7072556 (commit)
       via  552657fff4e4538628e7d2b98c4fbe93a07d307c (commit)
      from  650a6c1b4f315e6e89de673502d5a82359f424d8 (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 d2c2edbfa7d78ebeae4c79eef532814ac7072556
Author: Tomek Mrugalski <tomasz at isc.org>
Date:   Fri Oct 12 13:53:10 2012 +0200

    [2270] DHCPv6 pool parser fix.

commit 552657fff4e4538628e7d2b98c4fbe93a07d307c
Author: Tomek Mrugalski <tomasz at isc.org>
Date:   Fri Oct 12 13:52:36 2012 +0200

    [2270] DHCPv4 parser fixes. Tests now pass.

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

Summary of changes:
 src/bin/dhcp4/config_parser.cc                |    2 +-
 src/bin/dhcp4/tests/config_parser_unittest.cc |    2 --
 src/bin/dhcp6/config_parser.cc                |    2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/dhcp4/config_parser.cc b/src/bin/dhcp4/config_parser.cc
index b7bc7de..f4e85f5 100644
--- a/src/bin/dhcp4/config_parser.cc
+++ b/src/bin/dhcp4/config_parser.cc
@@ -399,7 +399,7 @@ public:
             pos = txt.find("-");
             if (pos != string::npos) {
                 // using min-max notation
-                IOAddress min(txt.substr(0,pos - 1));
+                IOAddress min(txt.substr(0,pos));
                 IOAddress max(txt.substr(pos + 1));
 
                 Pool4Ptr pool(new Pool4(min, max));
diff --git a/src/bin/dhcp4/tests/config_parser_unittest.cc b/src/bin/dhcp4/tests/config_parser_unittest.cc
index d732a71..8a8873f 100644
--- a/src/bin/dhcp4/tests/config_parser_unittest.cc
+++ b/src/bin/dhcp4/tests/config_parser_unittest.cc
@@ -95,7 +95,6 @@ TEST_F(Dhcp4ParserTest, empty_subnet) {
 
     EXPECT_NO_THROW(status = configureDhcp4Server(*srv_,
                     Element::fromJSON("{ \"interface\": [ \"all\" ],"
-                                      "\"preferred-lifetime\": 3000,"
                                       "\"rebind-timer\": 2000, "
                                       "\"renew-timer\": 1000, "
                                       "\"subnet4\": [  ], "
@@ -181,7 +180,6 @@ TEST_F(Dhcp4ParserTest, pool_out_of_subnet) {
     ConstElementPtr status;
 
     string config = "{ \"interface\": [ \"all\" ],"
-        "\"preferred-lifetime\": 3000,"
         "\"rebind-timer\": 2000, "
         "\"renew-timer\": 1000, "
         "\"subnet4\": [ { "
diff --git a/src/bin/dhcp6/config_parser.cc b/src/bin/dhcp6/config_parser.cc
index dbffc40..91310f0 100644
--- a/src/bin/dhcp6/config_parser.cc
+++ b/src/bin/dhcp6/config_parser.cc
@@ -399,7 +399,7 @@ public:
             pos = txt.find("-");
             if (pos != string::npos) {
                 // using min-max notation
-                IOAddress min(txt.substr(0,pos - 1));
+                IOAddress min(txt.substr(0,pos));
                 IOAddress max(txt.substr(pos + 1));
 
                 Pool6Ptr pool(new Pool6(Pool6::TYPE_IA, min, max));



More information about the bind10-changes mailing list