Commit f73452e8 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[master] Merge branch 'trac3464' (pool definitions are now structures)

Conflicts:
	ChangeLog
	doc/examples/kea4/several-subnets.json
	doc/examples/kea4/single-subnet.json
	doc/examples/kea6/several-subnets.json
	doc/guide/dhcp4-srv.xml
parents 64350f69 4bd0c0ed
815. [func] tomek
Pool definitions in DHCPv4 and DHCPv6 are now lists of
structures. This makes adding new per-pool parameters easier in
the future.
(Trac #3464, git 4bd0c0eda9d86608f8802d28bd360239fe88e905)
814. [func,doc] tomek
It is now possible to specify logging parameters in a
configuration file for DHCPv4, DHCPv6 and DHCP-DDNS components.
......
......@@ -26,12 +26,12 @@
# The following list defines subnets. Each subnet consists of at
# least subnet and pool entries.
"subnet4": [
{ "pool": [ "192.0.2.1 - 192.0.2.200" ],
"subnet4": [
{ "pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
"subnet": "192.0.2.0/24" },
{ "pool": [ "192.0.3.100 - 192.0.3.200" ],
{ "pools": [ { "pool": "192.0.3.100 - 192.0.3.200" } ],
"subnet": "192.0.3.0/24" },
{ "pool": [ "192.0.4.1 - 192.0.4.254" ],
{ "pools": [ { "pool": "192.0.4.1 - 192.0.4.254" } ],
"subnet": "192.0.4.0/24" } ]
},
......
......@@ -32,9 +32,12 @@
# The following list defines subnets. We have only one subnet
# here. We tell Kea that it is directly available over local interface.
"subnet4": [
{ "pool": [ "192.0.2.1 - 192.0.2.200" ],
{
"pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
"subnet": "192.0.2.0/24",
"interface": "eth0" } ]
"interface": "eth0"
}
]
},
# The following configures logging. It assumes that messages with at least
......
......@@ -28,14 +28,14 @@
# The following list defines subnets. Each subnet consists of at
# least subnet and pool entries.
"subnet6": [
{ "pool": [ "2001:db8:1::/80" ],
"subnet6": [
{ "pools": [ { "pool": "2001:db8:1::/80" } ],
"subnet": "2001:db8:1::/64" },
{ "pool": [ "2001:db8:2::/80" ],
"subnet": "2001:db8:2::/64" },
{ "pool": [ "2001:db8:3::/80" ],
{ "pools": [ { "pool": "2001:db8:2::/80" } ],
"subnet": "2001:db8:2::/64" },
{ "pools": [ { "pool": "2001:db8:3::/80" } ],
"subnet": "2001:db8:3::/64" },
{ "pool": [ "2001:db8:4::/80" ],
{ "pools": [ { "pool": "2001:db8:4::/80" } ],
"subnet": "2001:db8:4::/64" } ]
},
......
......@@ -97,7 +97,9 @@
"subnet4": [
{
"subnet": "192.0.2.0/24",
"pool": [ "192.0.2.1 - 192.0.2.200" ]
"pools": [
{ "pool": "192.0.2.1 - 192.0.2.200" }
]
}
]
......@@ -183,7 +185,7 @@ so it starts and ends with square brackets. Each subnet definition in
the list has several attributes associated with it, so is a structure
and is opened and closed with braces. At minimum, a subnet definition
has to have at least two parameters: <command>subnet</command> (that
defines the whole subnet) and <command>pool</command> (which is a list of
defines the whole subnet) and <command>pools</command> (which is a list of
dynamically allocated pools that are governed by the DHCP server).</para>
<para>The example contains a single subnet. Had more than one been defined,
......@@ -194,15 +196,15 @@ syntax would be used:
<screen>
"subnet4": [
{
"pool": [ "192.0.2.1 - 192.0.2.200" ],
"pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
"subnet": "192.0.2.0/24"
},
{
"pool": [ "192.0.3.100 - 192.0.3.200" ],
"pools": [ { "pool": "192.0.3.100 - 192.0.3.200" } ],
"subnet": "192.0.3.0/24"
},
{
"pool": [ "192.0.4.1 - 192.0.4.254" ],
"pool": [ { "pool": "192.0.4.1 - 192.0.4.254" } ],
"subnet": "192.0.4.0/24"
}
]
......@@ -392,16 +394,26 @@ temporarily override a list of interface names and listen on all interfaces.
"Dhcp4": {
<userinput>"subnet4": [
"subnet": "192.0.2.0/24",
"pool": [ "192.0.2.10 - 192.0.2.20" ]</userinput>,
"pools": [
{
"pool": "192.0.2.10 - 192.0.2.20"
}
]</userinput>,
...
]
}</screen>
Note that subnet is defined as a simple string, but the pool parameter is
Note that subnet is defined as a simple string, but the 'pools' parameter is
actually a list of pools: for this reason, the pool definition is enclosed
in square brackets, even though only one range of addresses is
specified in this example.</para>
<para>Each <command>pool</command> is a structure that contains the parameters
th describe a single pool. Currently there is only one parameter,
<command>pool</command>, which gives the range of addresses
in the pool. Additional parameters will be added in future
releases of Kea.</para>
<para>It is possible to define more than one pool in a subnet: continuing
the previous example, further assume that 192.0.2.64/26 should be also be
managed by the server. It could be written as 192.0.2.64 to
......@@ -411,7 +423,10 @@ temporarily override a list of interface names and listen on all interfaces.
<screen>
"Dhcp4": {
"subnet4": [
<userinput>"pool": [ "192.0.2.10-192.0.2.20", "192.0.2.64/26" ]</userinput>,
<userinput>"pools": [
{ "pool": "192.0.2.10-192.0.2.20" },
{ "pool": "192.0.2.64/26" }
]</userinput>,
...
],
...
......@@ -428,17 +443,17 @@ temporarily override a list of interface names and listen on all interfaces.
"subnet4": [
{
"subnet": "192.0.2.0/24",
"pool": [ "192.0.2.1 - 192.0.2.200" ],
"pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
...
},
{
"subnet": "192.0.3.0/24",
"pool": [ "192.0.3.100 - 192.0.3.200" ],
"pools": [ { "pool": "192.0.3.100 - 192.0.3.200" } ],
...
},
{
"subnet": "192.0.4.0/24",
"pool": [ "192.0.4.1 - 192.0.4.254" ],
"pools": [ { "pool": "192.0.4.1 - 192.0.4.254" } ],
...
}
]
......@@ -1198,7 +1213,7 @@ temporarily override a list of interface names and listen on all interfaces.
"subnet4": [
{
<userinput>subnet: "192.0.2.0/24",
"pool": [ "192.0.2.10 - 192.0.2.20" ],
"pools": [ { "pool": "192.0.2.10 - 192.0.2.20" } ],
"client-class": "VENDOR_CLASS_docsis3.0"</userinput>
}
],
......@@ -1709,7 +1724,7 @@ temporarily override a list of interface names and listen on all interfaces.
"subnet4: [
{
"subnet": "192.0.2.0/24",
"pool": [ "192.0.2.10 - 192.0.2.20" ],
"pools": [ { "pool": "192.0.2.10 - 192.0.2.20" } ],
<userinput>"relay": {
"ip-address": "10.0.0.1"
}</userinput>,
......@@ -1745,7 +1760,7 @@ temporarily override a list of interface names and listen on all interfaces.
"subnet4: [
{
"subnet": "10.1.1.0/24",
"pool": [ "10.1.1.2 - 10.1.1.20" ],
"pools": [ { "pool": "10.1.1.2 - 10.1.1.20" } ],
<userinput>"client-class" "docsis3.0",
"relay": {
"ip-address": "10.1.1.1"
......@@ -1753,7 +1768,7 @@ temporarily override a list of interface names and listen on all interfaces.
},
{
"subnet": "192.0.2.0/24",
"pool": [ "192.0.2.10 - 192.0.2.20" ],
"pools": [ { "pool": "192.0.2.10 - 192.0.2.20" } ],
<userinput>"relay": {
"ip-address": "10.1.1.1"
}</userinput>
......
......@@ -456,6 +456,13 @@ temporarily override a list of interface names and listen on all interfaces.
is actually a list of pools: for this reason, the pool definition is
enclosed in square brackets, even though only one range of addresses
is specified.</para>
<para>Each <command>pool</command> is a structure that contains the
parameters th describe a single pool. Currently there is only one
parameter, <command>pool</command>, which gives the range of addresses
in the pool. Additional parameters will be added in future releases of
Kea.</para>
<para>It is possible to define more than one pool in a
subnet: continuing the previous example, further assume that
2001:db8:1:0:5::/80 should be also be managed by the server. It could be written as
......
......@@ -152,6 +152,18 @@ protected:
}
};
class Pools4ListParser : public PoolsListParser {
public:
Pools4ListParser(const std::string& dummy, PoolStoragePtr pools)
:PoolsListParser(dummy, pools) {
}
protected:
virtual ParserPtr poolParserMaker(PoolStoragePtr storage) {
return (ParserPtr(new Pool4Parser("pool", storage)));
}
};
/// @brief This class parses a single IPv4 subnet.
///
/// This is the IPv4 derivation of the SubnetConfigParser class and it parses
......@@ -227,8 +239,8 @@ protected:
(config_id.compare("client-class") == 0) ||
(config_id.compare("next-server") == 0)) {
parser = new StringParser(config_id, string_values_);
} else if (config_id.compare("pool") == 0) {
parser = new Pool4Parser(config_id, pools_);
} else if (config_id.compare("pools") == 0) {
parser = new Pools4ListParser(config_id, pools_);
} else if (config_id.compare("relay") == 0) {
parser = new RelayInfoParser(config_id, relay_info_, Option::V4);
} else if (config_id.compare("option-data") == 0) {
......
......@@ -99,7 +99,7 @@ Dhcp4SrvD2Test::configureD2(bool enable_d2, const bool exp_result,
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
"\"subnet4\": [ { "
" \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
" \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
" \"subnet\": \"192.0.2.0/24\" } ],"
" \"dhcp-ddns\" : {"
" \"enable-updates\" : " << (enable_d2 ? "true" : "false") << ", "
......
......@@ -32,7 +32,7 @@ CONFIG="{
\"subnet4\": [
{
\"subnet\": \"10.0.0.0/8\",
\"pool\": [ \"10.0.0.10-10.0.0.100\" ]
\"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ]
} ]
},
......@@ -68,7 +68,7 @@ CONFIG_INVALID="{
\"subnet4\": [
{
\"subnet\": \"10.0.0.0/8\",
\"pool\": [ \"10.0.0.10-10.0.0.100\" ]
\"pool\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ]
} ]
},
......
......@@ -1209,7 +1209,7 @@ TEST_F(Dhcpv4SrvTest, vendorOptionsDocsis) {
" \"csv-format\": True"
" }],"
"\"subnet4\": [ { "
" \"pool\": [ \"10.254.226.0/25\" ],"
" \"pools\": [ { \"pool\": \"10.254.226.0/25\" } ],"
" \"subnet\": \"10.254.226.0/24\", "
" \"rebind-timer\": 2000, "
" \"renew-timer\": 1000, "
......@@ -1457,7 +1457,7 @@ TEST_F(Dhcpv4SrvTest, nextServerOverride) {
"\"renew-timer\": 1000, "
"\"next-server\": \"192.0.0.1\", "
"\"subnet4\": [ { "
" \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
" \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
" \"next-server\": \"1.2.3.4\", "
" \"subnet\": \"192.0.2.0/24\" } ],"
"\"valid-lifetime\": 4000 }";
......@@ -1502,7 +1502,7 @@ TEST_F(Dhcpv4SrvTest, nextServerGlobal) {
"\"renew-timer\": 1000, "
"\"next-server\": \"192.0.0.1\", "
"\"subnet4\": [ { "
" \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
" \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
" \"subnet\": \"192.0.2.0/24\" } ],"
"\"valid-lifetime\": 4000 }";
......@@ -2494,11 +2494,11 @@ TEST_F(HooksDhcpv4SrvTest, subnet4SelectSimple) {
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
"\"subnet4\": [ { "
" \"pool\": [ \"192.0.2.0/25\" ],"
" \"pools\": [ { \"pool\": \"192.0.2.0/25\" } ],"
" \"subnet\": \"192.0.2.0/24\", "
" \"interface\": \"eth0\" "
" }, {"
" \"pool\": [ \"192.0.3.0/25\" ],"
" \"pools\": [ { \"pool\": \"192.0.3.0/25\" } ],"
" \"subnet\": \"192.0.3.0/24\" "
" } ],"
"\"valid-lifetime\": 4000 }";
......@@ -2562,11 +2562,11 @@ TEST_F(HooksDhcpv4SrvTest, subnet4SelectChange) {
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
"\"subnet4\": [ { "
" \"pool\": [ \"192.0.2.0/25\" ],"
" \"pools\": [ { \"pool\": \"192.0.2.0/25\" } ],"
" \"subnet\": \"192.0.2.0/24\", "
" \"interface\": \"eth0\" "
" }, {"
" \"pool\": [ \"192.0.3.0/25\" ],"
" \"pools\": [ { \"pool\": \"192.0.3.0/25\" } ],"
" \"subnet\": \"192.0.3.0/24\" "
" } ],"
"\"valid-lifetime\": 4000 }";
......@@ -2981,7 +2981,7 @@ TEST_F(Dhcpv4SrvTest, vendorOptionsORO) {
" \"csv-format\": True"
" }],"
"\"subnet4\": [ { "
" \"pool\": [ \"192.0.2.0/25\" ],"
" \"pools\": [ { \"pool\": \"192.0.2.0/25\" } ],"
" \"subnet\": \"192.0.2.0/24\", "
" \"rebind-timer\": 2000, "
" \"renew-timer\": 1000, "
......@@ -3067,7 +3067,7 @@ TEST_F(Dhcpv4SrvTest, vendorOptionsDocsisDefinitions) {
" \"csv-format\": True"
" }],"
"\"subnet4\": [ { "
" \"pool\": [ \"192.0.2.1 - 192.0.2.50\" ],"
" \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.50\" } ],"
" \"subnet\": \"192.0.2.0/24\", "
" \"renew-timer\": 1000, "
" \"rebind-timer\": 1000, "
......@@ -3148,10 +3148,10 @@ TEST_F(Dhcpv4SrvTest, clientClassify2) {
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
"\"subnet4\": [ "
"{ \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
"{ \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
" \"client-class\": \"foo\", "
" \"subnet\": \"192.0.2.0/24\" }, "
"{ \"pool\": [ \"192.0.3.1 - 192.0.3.100\" ],"
"{ \"pools\": [ { \"pool\": \"192.0.3.1 - 192.0.3.100\" } ],"
" \"client-class\": \"xyzzy\", "
" \"subnet\": \"192.0.3.0/24\" } "
"],"
......@@ -3196,12 +3196,12 @@ TEST_F(Dhcpv4SrvTest, relayOverride) {
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
"\"subnet4\": [ "
"{ \"pool\": [ \"192.0.2.2 - 192.0.2.100\" ],"
"{ \"pools\": [ { \"pool\": \"192.0.2.2 - 192.0.2.100\" } ],"
" \"relay\": { "
" \"ip-address\": \"192.0.5.1\""
" },"
" \"subnet\": \"192.0.2.0/24\" }, "
"{ \"pool\": [ \"192.0.3.1 - 192.0.3.100\" ],"
"{ \"pools\": [ { \"pool\": \"192.0.3.1 - 192.0.3.100\" } ],"
" \"relay\": { "
" \"ip-address\": \"192.0.5.2\""
" },"
......@@ -3271,13 +3271,13 @@ TEST_F(Dhcpv4SrvTest, relayOverrideAndClientClass) {
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
"\"subnet4\": [ "
"{ \"pool\": [ \"192.0.2.2 - 192.0.2.100\" ],"
"{ \"pools\": [ { \"pool\": \"192.0.2.2 - 192.0.2.100\" } ],"
" \"client-class\": \"foo\", "
" \"relay\": { "
" \"ip-address\": \"192.0.5.1\""
" },"
" \"subnet\": \"192.0.2.0/24\" }, "
"{ \"pool\": [ \"192.0.3.1 - 192.0.3.100\" ],"
"{ \"pools\": [ { \"pool\": \"192.0.3.1 - 192.0.3.100\" } ],"
" \"relay\": { "
" \"ip-address\": \"192.0.5.1\""
" },"
......
......@@ -120,7 +120,7 @@ DirectClientTest::configureSubnet(const std::string& prefix) {
"\"renew-timer\": 1000, "
"\"option-data\": [ ],"
"\"subnet4\": [ { "
" \"pool\": [ \"" << prefix << "/24\" ],"
" \"pools\": [ { \"pool\": \"" << prefix << "/24\" } ],"
" \"subnet\": \"" << prefix << "/24\", "
" \"rebind-timer\": 2000, "
" \"renew-timer\": 1000, "
......@@ -141,14 +141,14 @@ DirectClientTest::configureTwoSubnets(const std::string& prefix1,
"\"renew-timer\": 1000, "
"\"option-data\": [ ],"
"\"subnet4\": [ { "
" \"pool\": [ \"" << prefix1 << "/24\" ],"
" \"pools\": [ { \"pool\": \"" << prefix1 << "/24\" } ],"
" \"subnet\": \"" << prefix1 << "/24\", "
" \"rebind-timer\": 2000, "
" \"renew-timer\": 1000, "
" \"valid-lifetime\": 4000"
" },"
"{ "
" \"pool\": [ \"" << prefix2 << "/24\" ],"
" \"pools\": [ { \"pool\": \"" << prefix2 << "/24\" } ],"
" \"subnet\": \"" << prefix2 << "/24\", "
" \"rebind-timer\": 2000, "
" \"renew-timer\": 1000, "
......
......@@ -53,7 +53,7 @@ const char* DORA_CONFIGS[] = {
"\"valid-lifetime\": 600,"
"\"subnet4\": [ { "
" \"subnet\": \"10.0.0.0/24\", "
" \"pool\": [ \"10.0.0.10-10.0.0.100\" ],"
" \"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ],"
" \"option-data\": [ {"
" \"name\": \"routers\","
" \"code\": 3,"
......
......@@ -52,7 +52,7 @@ const char* INFORM_CONFIGS[] = {
"\"valid-lifetime\": 600,"
"\"subnet4\": [ { "
" \"subnet\": \"10.0.0.0/24\", "
" \"pool\": [ \"10.0.0.10-10.0.0.100\" ],"
" \"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ],"
" \"option-data\": [ {"
" \"name\": \"routers\","
" \"code\": 3,"
......
......@@ -89,16 +89,16 @@ TEST_F(JSONFileBackendTest, jsonFile) {
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
"\"subnet4\": [ { "
" \"pool\": [ \"192.0.2.1 - 192.0.2.100\" ],"
" \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
" \"subnet\": \"192.0.2.0/24\" "
" },"
" {"
" \"pool\": [ \"192.0.3.101 - 192.0.3.150\" ],"
" \"pools\": [ { \"pool\": \"192.0.3.101 - 192.0.3.150\" } ],"
" \"subnet\": \"192.0.3.0/24\", "
" \"id\": 0 "
" },"
" {"
" \"pool\": [ \"192.0.4.101 - 192.0.4.150\" ],"
" \"pools\": [ { \"pool\": \"192.0.4.101 - 192.0.4.150\" } ],"
" \"subnet\": \"192.0.4.0/24\" "
" } ],"
"\"valid-lifetime\": 4000 }"
......@@ -164,7 +164,7 @@ TEST_F(JSONFileBackendTest, comments) {
"\"renew-timer\": 1000, \n"
"# comments in the middle should be ignored, too\n"
"\"subnet4\": [ { "
" \"pool\": [ \"192.0.2.0/24\" ],"
" \"pools\": [ { \"pool\": \"192.0.2.0/24\" } ],"
" \"subnet\": \"192.0.2.0/22\" "
" } ],"
"\"valid-lifetime\": 4000 }"
......
......@@ -122,7 +122,7 @@ protected:
}
};
/// @brief Parser for IPv4 pool definitions.
/// @brief Parser for IPv6 pool definitions.
///
/// This is the IPv6 derivation of the PoolParser class and handles pool
/// definitions, i.e. a list of entries of one of two syntaxes: min-max and
......@@ -173,6 +173,18 @@ protected:
}
};
class Pools6ListParser : public PoolsListParser {
public:
Pools6ListParser(const std::string& dummy, PoolStoragePtr pools)
:PoolsListParser(dummy, pools) {
}
protected:
virtual ParserPtr poolParserMaker(PoolStoragePtr storage) {
return (ParserPtr(new Pool6Parser("pool", storage)));
}
};
/// @brief Parser for IPv6 prefix delegation definitions.
///
/// This class handles prefix delegation pool definitions for IPv6 subnets
......@@ -436,8 +448,8 @@ protected:
(config_id.compare("client-class") == 0) ||
(config_id.compare("interface-id") == 0)) {
parser = new StringParser(config_id, string_values_);
} else if (config_id.compare("pool") == 0) {
parser = new Pool6Parser(config_id, pools_);
} else if (config_id.compare("pools") == 0) {
parser = new Pools6ListParser(config_id, pools_);
} else if (config_id.compare("relay") == 0) {
parser = new RelayInfoParser(config_id, relay_info_, Option::V6);
} else if (config_id.compare("pd-pools") == 0) {
......
......@@ -195,7 +195,7 @@ public:
" \"encapsulate\": \"\""
"} ],"
"\"subnet6\": [ { "
" \"pool\": [ \"2001:db8:1::/80\" ],"
" \"pools\": [ { \"pool\": \"2001:db8:1::/80\" } ],"
" \"subnet\": \"2001:db8:1::/64\", "
" \"option-data\": [ {";
bool first = true;
......@@ -537,7 +537,7 @@ TEST_F(Dhcp6ParserTest, subnetGlobalDefaults) {
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
"\"subnet6\": [ { "
" \"pool\": [ \"2001:db8:1::1 - 2001:db8:1::ffff\" ],"
" \"pools\": [ { \"pool\": \"2001:db8:1::1 - 2001:db8:1::ffff\" } ],"
" \"subnet\": \"2001:db8:1::/64\" } ],"
"\"valid-lifetime\": 4000 }";
......@@ -562,6 +562,7 @@ TEST_F(Dhcp6ParserTest, subnetGlobalDefaults) {
EXPECT_EQ(1, subnet->getID());
}
// This test checks that multiple subnets can be defined and handled properly.
TEST_F(Dhcp6ParserTest, multipleSubnets) {
ConstElementPtr x;
// Collection of four subnets for which ids should be autogenerated
......@@ -571,20 +572,20 @@ TEST_F(Dhcp6ParserTest, multipleSubnets) {
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
"\"subnet6\": [ { "
" \"pool\": [ \"2001:db8:1::/80\" ],"
" \"pools\": [ { \"pool\": \"2001:db8:1::/80\" } ],"
" \"subnet\": \"2001:db8:1::/64\" "
" },"
" {"
" \"pool\": [ \"2001:db8:2::/80\" ],"
" \"pools\": [ { \"pool\": \"2001:db8:2::/80\" } ],"
" \"subnet\": \"2001:db8:2::/64\", "
" \"id\": 0"
" },"
" {"
" \"pool\": [ \"2001:db8:3::/80\" ],"
" \"pools\": [ { \"pool\": \"2001:db8:3::/80\" } ],"
" \"subnet\": \"2001:db8:3::/64\" "
" },"
" {"
" \"pool\": [ \"2001:db8:4::/80\" ],"
" \"pools\": [ { \"pool\": \"2001:db8:4::/80\" } ],"
" \"subnet\": \"2001:db8:4::/64\" "
" } ],"
"\"valid-lifetime\": 4000 }";
......@@ -623,22 +624,22 @@ TEST_F(Dhcp6ParserTest, multipleSubnetsExplicitIDs) {
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
"\"subnet6\": [ { "
" \"pool\": [ \"2001:db8:1::/80\" ],"
" \"pools\": [ { \"pool\": \"2001:db8:1::/80\" } ],"
" \"subnet\": \"2001:db8:1::/64\", "
" \"id\": 1024"
" },"
" {"
" \"pool\": [ \"2001:db8:2::/80\" ],"
" \"pools\": [ { \"pool\": \"2001:db8:2::/80\" } ],"
" \"subnet\": \"2001:db8:2::/64\", "
" \"id\": 100"
" },"
" {"
" \"pool\": [ \"2001:db8:3::/80\" ],"
" \"pools\": [ { \"pool\": \"2001:db8:3::/80\" } ],"
" \"subnet\": \"2001:db8:3::/64\", "
" \"id\": 1"
" },"
" {"
" \"pool\": [ \"2001:db8:4::/80\" ],"
" \"pools\": [ { \"pool\": \"2001:db8:4::/80\" } ],"
" \"subnet\": \"2001:db8:4::/64\", "
" \"id\": 34"
" } ],"
......@@ -676,22 +677,22 @@ TEST_F(Dhcp6ParserTest, multipleSubnetsOverlapingIDs) {
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
"\"subnet6\": [ { "
" \"pool\": [ \"2001:db8:1::/80\" ],"
" \"pools\": [ { \"pool\": \"2001:db8:1::/80\" } ],"
" \"subnet\": \"2001:db8:1::/64\", "
" \"id\": 1024"
" },"
" {"
" \"pool\": [ \"2001:db8:2::/80\" ],"
" \"pools\": [ { \"pool\": \"2001:db8:2::/80\" } ],"
" \"subnet\": \"2001:db8:2::/64\", "
" \"id\": 100"
" },"
" {"