2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 13:37:55 +00:00

[2270] DHCPv4 parser fixes. Tests now pass.

This commit is contained in:
Tomek Mrugalski
2012-10-12 13:52:36 +02:00
parent 650a6c1b4f
commit 552657fff4
2 changed files with 1 additions and 3 deletions

View File

@@ -399,7 +399,7 @@ public:
pos = txt.find("-"); pos = txt.find("-");
if (pos != string::npos) { if (pos != string::npos) {
// using min-max notation // using min-max notation
IOAddress min(txt.substr(0,pos - 1)); IOAddress min(txt.substr(0,pos));
IOAddress max(txt.substr(pos + 1)); IOAddress max(txt.substr(pos + 1));
Pool4Ptr pool(new Pool4(min, max)); Pool4Ptr pool(new Pool4(min, max));

View File

@@ -95,7 +95,6 @@ TEST_F(Dhcp4ParserTest, empty_subnet) {
EXPECT_NO_THROW(status = configureDhcp4Server(*srv_, EXPECT_NO_THROW(status = configureDhcp4Server(*srv_,
Element::fromJSON("{ \"interface\": [ \"all\" ]," Element::fromJSON("{ \"interface\": [ \"all\" ],"
"\"preferred-lifetime\": 3000,"
"\"rebind-timer\": 2000, " "\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, " "\"renew-timer\": 1000, "
"\"subnet4\": [ ], " "\"subnet4\": [ ], "
@@ -181,7 +180,6 @@ TEST_F(Dhcp4ParserTest, pool_out_of_subnet) {
ConstElementPtr status; ConstElementPtr status;
string config = "{ \"interface\": [ \"all\" ]," string config = "{ \"interface\": [ \"all\" ],"
"\"preferred-lifetime\": 3000,"
"\"rebind-timer\": 2000, " "\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, " "\"renew-timer\": 1000, "
"\"subnet4\": [ { " "\"subnet4\": [ { "