Commit 59b62eb3 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[master] Merge branch 'trac5016'

parents 7dff9bb5 377e3644
......@@ -118,6 +118,12 @@ We have received the following contributions:
strings to avoid issues with creation of the database
when MySQL server operates in ANSI_QUOTES mode.
- Cristian Secareanu, Qualitance
2016-10: Support for IPv6 prefix and PDEXCLUDE option
- Andrei Pavel, Qualitance
2016-10: Support for DHCPv6 options defined in RFC6603 and RFC7598
Kea uses log4cplus (http://sourceforge.net/projects/log4cplus/) for logging,
Boost (http://www.boost.org/) library for almost everything, and can use Botan
(http://botan.randombit.net/) or OpenSSL (https://www.openssl.org/) for
......
......@@ -29,6 +29,7 @@ nobase_dist_doc_DATA += examples/kea6/pgsql-reservations.json
nobase_dist_doc_DATA += examples/kea6/reservations.json
nobase_dist_doc_DATA += examples/kea6/several-subnets.json
nobase_dist_doc_DATA += examples/kea6/simple.json
nobase_dist_doc_DATA += examples/kea6/softwire46.json
nobase_dist_doc_DATA += examples/kea6/stateless.json
devel:
......
# This is an example configuration file for DHCPv6 server in Kea.
# It demonstrates how user can specify values for Softwire options
# defined in RFC 7598 for Lightweight 4over6 architecture.
{ "Dhcp6":
{
# Kea is told to listen on ethX interface only.
"interfaces-config": {
"interfaces": [ "ethX" ]
},
# Let's use a Memfile backend to store leases.
"lease-database": {
"type": "memfile"
},
# Addresses will be assigned with preferred and valid lifetimes
# being 3000 and 4000, respectively. Client is told to start
# renewing after 1000 seconds. If the server does not respond
# after 2000 seconds since the lease was granted, client is supposed
# to start REBIND procedure (emergency renewal that allows switching
# to a different server).
"preferred-lifetime": 3000,
"valid-lifetime": 4000,
"renew-timer": 1000,
"rebind-timer": 2000,
# The following list defines subnets. Each subnet consists of at
# least subnet and pool entries.
"subnet6": [
{
"pools": [ { "pool": "2001:db8:1::/80" } ],
"subnet": "2001:db8:1::/64",
"interface": "ethX",
# Include MAP-E Container option for hosts connected to this subnet.
"option-data": [
{
"name": "s46-cont-mape"
}
],
# Send host specific softwire options.
"reservations": [
{
"duid": "01:02:03:04:05:06:07:08:09:0A",
"option-data": [
# These two options will be included in the MAP-E Container
{
"space": "s46-cont-mape-options",
"name": "s46-rule",
"data": "1, 0, 24, 192.0.2.0, 2001:db8:1::/64"
},
{
"space": "s46-cont-mape-options",
"name": "s46-br",
"data": "2001:db8:cafe::1"
},
# This option will be included in the S46 Rule option. It includes
# PSID/PSID length value in a user friendly form. The PSID length
# specifies the number of bits on which PSID is coded. The PSID
# value 3 is a 4th value that is coded on these 4 bits: "0011b".
{
"space": "s46-rule-options",
"name": "s46-portparams",
"data": "0, 3/4"
}
]
}
]
}
]
},
# The following configures logging. Kea will log all debug messages
# to /var/log/kea-debug.log file.
"Logging": {
"loggers": [
{
"name": "kea-dhcp6",
"output_options": [
{
"output": "/var/log/kea-debug.log"
}
],
"debuglevel": 99,
"severity": "DEBUG"
}
]
}
}
......@@ -469,7 +469,7 @@ If a timeout is given though, it should be an integer greater than zero.
</section>
</section>
<section id="hosts-storage4">
<section id="hosts4-storage">
<title>Hosts Storage</title>
<para>Kea is also able to store information about host reservations in the
database. The hosts database configuration uses the same syntax as the lease
......@@ -1216,6 +1216,8 @@ It is merely echoed by the server
<row><entry>fqdn</entry><entry>Fully qualified domain name (e.g. www.example.com)</entry></row>
<row><entry>ipv4-address</entry><entry>IPv4 address in the usual dotted-decimal notation (e.g. 192.0.2.1)</entry></row>
<row><entry>ipv6-address</entry><entry>IPv6 address in the usual colon notation (e.g. 2001:db8::1)</entry></row>
<row><entry>ipv6-prefix</entry><entry>IPv6 prefix and prefix length specified using CIDR notation, e.g. 2001:db8:1::/64. This data type is used to represent an 8-bit field conveying a prefix length and the variable length prefix value</entry></row>
<row><entry>psid</entry><entry>PSID and PSID length separated by a slash, e.g. 3/4 specifies PSID=3 and PSID length=4. In the wire format it is represented by an 8-bit field carrying PSID length (in this case equal to 4) and the 16-bits long PSID value field (in this case equal to "0011000000000000b" using binary notation). Allowed values for a PSID length are 0 to 16. See <ulink url="http://tools.ietf.org/html/rfc7597">RFC 7597</ulink> for the details about the PSID wire representation</entry></row>
<row><entry>record</entry><entry>Structured data that may comprise any types (except "record" and "empty")</entry></row>
<row><entry>string</entry><entry>Any text</entry></row>
<row><entry>uint8</entry><entry>8 bit unsigned integer with allowed values 0 to 255</entry></row>
......
......@@ -799,7 +799,6 @@ temporarily override a list of interface names and listen on all interfaces.
</section>
<section>
<!-- @todo: add real meat to the prefix delegation config this is just place holder stuff -->
<title>Subnet and Prefix Delegation Pools</title>
<para>
Subnets may also be configured to delegate prefixes, as defined in
......@@ -833,6 +832,42 @@ temporarily override a list of interface names and listen on all interfaces.
...
}</screen>
</para>
</section>
<section id="pd-exclude-option">
<title>Prefix Exclude Option</title>
<para>
For each delegated prefix the delegating router may choose to exclude
a single prefix out of the delegated prefix as specified in the
<ulink url="http://tools.ietf.org/html/rfc6603"> RFC 6603</ulink>.
The requesting router must not assign the excluded prefix to any
of its downstream interfaces and it is intended to be used on a
link through which the delegating router exchanges DHCPv6 messages with
the requesting router. The configuration example below demonstrates how
to specify an excluded prefix within a prefix pool definition. The
excluded prefix "2001:db8:1:babe:cafe:80::/72" will be sent to a
requesting router which includes Prefix Exclude option in the ORO, and
which is delegated a prefix from this pool.
</para>
<screen>
"Dhcp6": {
"subnet6": [
{
"subnet": "2001:db8:1::/48",
"pd-pools": [
{
"prefix": "2001:db8:1:8000::",
"prefix-len": 48,
"delegated-len": 64,
"excluded-prefix": "2001:db8:1:babe:cafe:80::",
"excluded-prefix-len": 72
}
]
}
]
}
</screen>
</section>
<section id="dhcp6-std-options">
......@@ -1110,11 +1145,21 @@ temporarily override a list of interface names and listen on all interfaces.
<row><entry>bootfile-param</entry><entry>60</entry><entry>binary</entry><entry>false</entry></row>
<row><entry>client-arch-type</entry><entry>61</entry><entry>uint16</entry><entry>true</entry></row>
<row><entry>nii</entry><entry>62</entry><entry>record (uint8, uint8, uint8)</entry><entry>false</entry></row>
<row><entry>aftr-name</entry><entry>64</entry><entry>fqdn</entry><entry>false</entry></row>
<row><entry>erp-local-domain-name</entry><entry>65</entry><entry>fqdn</entry><entry>false</entry></row>
<row><entry>rsoo</entry><entry>66</entry><entry>empty</entry><entry>false</entry></row>
<row><entry>pd-exclude</entry><entry>67</entry><entry>binary</entry><entry>false</entry></row>
<row><entry>client-linklayer-addr</entry><entry>79</entry><entry>binary</entry><entry>false</entry></row>
<!-- <row><entry>dhcpv4-message</entry><entry>87</entry><entry>binary</entry><entry>false</entry></row> -->
<row><entry>dhcp4o6-server-addr</entry><entry>88</entry><entry>ipv6-address</entry><entry>true</entry></row>
<row><entry>s46-rule</entry><entry>89</entry><entry>record (uint8, uint8, uint8, ipv4-address, ipv6-prefix)</entry><entry>false</entry></row>
<row><entry>s46-br</entry><entry>90</entry><entry>ipv6-address</entry><entry>false</entry></row>
<row><entry>s46-dmr</entry><entry>91</entry><entry>ipv6-prefix</entry><entry>false</entry></row>
<row><entry>s46-v4v6bind</entry><entry>92</entry><entry>record (ipv4-address, ipv6-prefix)</entry><entry>false</entry></row>
<row><entry>s46-portparams</entry><entry>93</entry><entry>record(uint8, psid)</entry><entry>false</entry></row>
<row><entry>s46-cont-mape</entry><entry>94</entry><entry>empty</entry><entry>false</entry></row>
<row><entry>s46-cont-mapt</entry><entry>95</entry><entry>empty</entry><entry>false</entry></row>
<row><entry>s46-cont-lw</entry><entry>96</entry><entry>empty</entry><entry>false</entry></row>
</tbody>
</tgroup>
</table>
......@@ -1142,6 +1187,187 @@ temporarily override a list of interface names and listen on all interfaces.
</para>
</section>
<section id="s46-options">
<title>Common Softwire46 Options</title>
<para>
Softwire46 options are involved in IPv4 over IPv6 provisioning by
means of tunneling or translation as specified in the
<ulink url="http://tools.ietf.org/html/rfc7598">RFC 7598</ulink>.
The following sections provide configuration examples of these
options.
</para>
<section id="s46-containers">
<title>Softwire46 Container Options</title>
<para>
S46 container options group rules and optional port parameters
for a specified domain. There are three container options specified
in the "dhcp6" (top level) option space: MAP-E Container option,
MAP-T Container option and S46 Lieghtweight 4over6 Container option.
These options only contain encapsulated options specified below.
They do not include any data fields.
</para>
<para>
In order to configure the server to send specific container option
along with all encapsulated options, the container option must be
included in the server configuration as shown below:
<screen>
"Dhcp6": {
...
"option-data": [
{
"name": "s46-cont-mape"
} ],
...
}
</screen>
This configuration will cause the server to include MAP-E Container
option to the client. Use "s46-cont-mapt" or "s46-cont-lw" for the
MAP-T Container and S46 Lightweight 4over6 Container options
respectively.
</para>
<para>
All remaining softwire options described below are included in one
of the container options. Thus, they have to be included in appropriate
option spaces by selecting a "space" name, which specifies in which
option they are supposed to be included.
</para>
</section>
<section>
<title>S46 Rule Option</title>
<para>
The S46 Rule option is used for conveying the Basic Mapping Rule (BMR)
and Forwarding Mapping Rule (FMR).
<screen>
{
"space": "s46-cont-mape-options",
"name": "s46-rule",
"data": "128, 0, 24, 192.0.2.0, 2001:db8:1::/64"
}
</screen>
Other possible "space" value is "s46-cont-mapt-options".
</para>
<para>
The S46 Rule option conveys a number of parameters:
<itemizedlist>
<listitem>
<simpara><command>flags</command>, an unsigned 8 bits integer, with
currently only the most significant bit specified. It denotes whether
the rule can be used for forwarding (128) or not (0).
</simpara>
</listitem>
<listitem>
<simpara><command>ea-len</command>, an 8 bits long Embedded Address length. Allowed values
range from 0 to 48.</simpara>
</listitem>
<listitem>
<simpara><command>IPv4 prefix length</command>, 8 bits long; expresses the prefix length of the
Rule IPv4 prefix specified in the ipv4-prefix field. Allowed
values range from 0 to 32.</simpara>
</listitem>
<listitem>
<simpara><command>IPv4 prefix</command>, a fixed-length 32-bit field that specifies the IPv4
prefix for the S46 rule. The bits in the prefix after prefix4-len
number of bits are reserved and MUST be initialized to zero by the
sender and ignored by the receiver.</simpara>
</listitem>
<listitem>
<simpara><command>IPv6 prefix</command> in prefix/length notation that specifies the IPv6 domain
prefix for the S46 rule. The field is padded on the right with zero
bits up to the nearest octet boundary when prefix6-len is not evenly
divisible by 8.</simpara>
</listitem>
</itemizedlist>
</para>
</section>
<section>
<title>S46 BR Option</title>
<para>
The S46 BR option is used to convey the IPv6 address of the
Border Relay. This option is mandatory in the MAP-E
Container option and not permitted in the MAP-T and
S46 Lightweight 4over6 Container options.
<screen>
{
"space": "s46-cont-mape-options",
"name": "s46-br",
"data": "2001:db8:cafe::1",
}
</screen>
Other possible "space" value is "s46-cont-lw-options".
</para>
</section>
<section>
<title>S46 DMR Option</title>
<para>
The S46 DMR option is used to convey values for the Default
Mapping Rule (DMR). This option is mandatory in the MAP-T
container option and not permitted in the MAP-E and S46
Lightweight 4over6 Container options.
<screen>
{
"space": "s46-cont-mapt-options",
"name": "s46-dmr",
"data": "2001:db8:cafe::/64",
}
</screen>
This option must not be included in other containers.
</para>
</section>
<section>
<title>S46 IPv4/IPv6 Address Binding option.</title>
<para>
The S46 IPv4/IPv6 Address Binding option may be used to specify
the full or shared IPv4 address of the Customer Edge (CE).
The IPv6 prefix field is used by the CE to identify the
correct prefix to use for the tunnel source.
<screen>
{
"space": "s46-cont-lw",
"name": "s46-v4v6bind",
"data": "192.0.2.3, 2001:db8:1:cafe::/64"
}
</screen>
This option must not be included in other containers.
</para>
</section>
<section>
<title>S46 Port Parameters</title>
<para>
The S46 Port Parameters option specifies optional port set
information that MAY be provided to CEs
<screen>
{
"space": "s46-rule-options",
"name": "s46-portparams",
"data": "2, 3/4",
}
</screen>
Other possible "space" value is "s46-v4v6bind" to include
this option in the S46 IPv4/IPv6 Address Binding option.
</para>
<para>
Note that the second value in the example above specifies the
PSID and PSID length fields in the format of PSID/PSID length.
This is equivalent to the values of PSID-len=4 and
PSID=12288 conveyed in the S46 Port Parameters option.
</para>
</section>
</section>
<section id="dhcp6-custom-options">
<title>Custom DHCPv6 Options</title>
<para>It is possible to define options in addition to the standard ones.
......@@ -2371,7 +2597,7 @@ should include options from the isc option space:
"pd-pools": [
{
"prefix": "2001:db8:1:8000::",
"prefix-len": 56,
"prefix-len": 48,
"delegated-len": 64
}
],
......@@ -3888,6 +4114,12 @@ If not specified, the default value is:
<ulink url="http://tools.ietf.org/html/rfc4704">RFC 4704</ulink>:
Supported option is CLIENT_FQDN.</simpara>
</listitem>
<listitem>
<simpara><emphasis>Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
Option for Dual-Stack Lite</emphasis>,
<ulink url="http://tools.ietf.org/html/rfc6334">RFC 6334</ulink>:
the AFTR-Name DHCPv6 Option is supported.</simpara>
</listitem>
<listitem>
<simpara><emphasis>Relay-Supplied DHCP Options</emphasis>,
<ulink url="http://tools.ietf.org/html/rfc6422">RFC 6422</ulink>:
......@@ -3895,6 +4127,12 @@ If not specified, the default value is:
to echo back the options, checks whether an option is RSOO-enabled,
ability to mark additional options as RSOO-enabled.</simpara>
</listitem>
<listitem>
<simpara><emphasis>Prefix Exclude Option for DHCPv6-based Prefix
Delegation</emphasis>,
<ulink url="http://tools.ietf.org/html/rfc6603">RFC
6603</ulink>: Prefix Exclude option is supported.</simpara>
</listitem>
<listitem>
<simpara><emphasis>Client Link-Layer Address Option in
DHCPv6</emphasis>,
......@@ -3909,6 +4147,13 @@ If not specified, the default value is:
7550</ulink>: All recommendations related to the DHCPv6 server
operation are supported.</simpara>
</listitem>
<listitem>
<simpara><emphasis>DHCPv6 Options for Configuration of Softwire
Address and Port-Mapped Clients</emphasis>,
<ulink url="http://tools.ietf.org/html/rfc7598">RFC
7598</ulink>: All options specified in this specification are
supported by the DHCPv6 server.</simpara>
</listitem>
</itemizedlist>
</section>
......
......@@ -1209,7 +1209,7 @@ Dhcpv4Srv::appendRequestedOptions(Dhcpv4Exchange& ex) {
// Iterate on the configured option list
for (CfgOptionList::const_iterator copts = co_list.begin();
copts != co_list.end(); ++copts) {
OptionDescriptor desc = (*copts)->get("dhcp4", *opt);
OptionDescriptor desc = (*copts)->get(DHCP4_OPTION_SPACE, *opt);
// Got it: add it and jump to the outer loop
if (desc.option_) {
resp->addOption(desc.option_);
......@@ -1320,7 +1320,8 @@ Dhcpv4Srv::appendBasicOptions(Dhcpv4Exchange& ex) {
// Check whether option has been configured.
for (CfgOptionList::const_iterator copts = co_list.begin();
copts != co_list.end(); ++copts) {
OptionDescriptor desc = (*copts)->get("dhcp4", required_options[i]);
OptionDescriptor desc = (*copts)->get(DHCP4_OPTION_SPACE,
required_options[i]);
if (desc.option_) {
resp->addOption(desc.option_);
break;
......
......@@ -146,7 +146,7 @@ public:
std::map<std::string, std::string> params;
if (parameter == "name") {
params["name"] = param_value;
params["space"] = "dhcp4";
params["space"] = DHCP4_OPTION_SPACE;
params["code"] = "56";
params["data"] = "ABCDEF0105";
params["csv-format"] = "False";
......@@ -158,19 +158,19 @@ public:
params["csv-format"] = "False";
} else if (parameter == "code") {
params["name"] = "dhcp-message";
params["space"] = "dhcp4";
params["space"] = DHCP4_OPTION_SPACE;
params["code"] = param_value;
params["data"] = "ABCDEF0105";
params["csv-format"] = "False";
} else if (parameter == "data") {
params["name"] = "dhcp-message";
params["space"] = "dhcp4";
params["space"] = DHCP4_OPTION_SPACE;
params["code"] = "56";
params["data"] = param_value;
params["csv-format"] = "False";
} else if (parameter == "csv-format") {
params["name"] = "dhcp-message";
params["space"] = "dhcp4";
params["space"] = DHCP4_OPTION_SPACE;
params["code"] = "56";
params["data"] = "ABCDEF0105";
params["csv-format"] = param_value;
......@@ -251,7 +251,7 @@ public:
<< "does not exist in Config Manager";
}
OptionContainerPtr options =
subnet->getCfgOption()->getAll("dhcp4");
subnet->getCfgOption()->getAll(DHCP4_OPTION_SPACE);
if (expected_options_count != options->size()) {
ADD_FAILURE() << "The number of options in the subnet '"
<< subnet_address.toText() << "' is different "
......@@ -475,7 +475,7 @@ public:
template<typename ReturnType>
ReturnType
retrieveOption(const Host& host, const uint16_t option_code) const {
return (retrieveOption<ReturnType>(host, "dhcp4", option_code));
return (retrieveOption<ReturnType>(host, DHCP4_OPTION_SPACE, option_code));
}
/// @brief Retrieve an option associated with a host.
......@@ -1823,7 +1823,7 @@ TEST_F(Dhcp4ParserTest, optionStandardDefOverride) {
ElementPtr json = Element::fromJSON(config);
OptionDefinitionPtr def = CfgMgr::instance().getStagingCfg()->
getCfgOptionDef()->get("dhcp4", 109);
getCfgOptionDef()->get(DHCP4_OPTION_SPACE, 109);
ASSERT_FALSE(def);
// Use the configuration string to create new option definition.
......@@ -1834,7 +1834,7 @@ TEST_F(Dhcp4ParserTest, optionStandardDefOverride) {
// The option definition should now be available in the CfgMgr.
def = CfgMgr::instance().getStagingCfg()->
getCfgOptionDef()->get("dhcp4", 109);
getCfgOptionDef()->get(DHCP4_OPTION_SPACE, 109);
ASSERT_TRUE(def);
// Check the option data.
......@@ -1885,7 +1885,7 @@ TEST_F(Dhcp4ParserTest, optionStandardDefOverride) {
checkResult(status, 0);
def = CfgMgr::instance().getStagingCfg()->
getCfgOptionDef()->get("dhcp4", 213);
getCfgOptionDef()->get(DHCP4_OPTION_SPACE, 213);
ASSERT_TRUE(def);
// Check the option data.
......@@ -1927,10 +1927,10 @@ TEST_F(Dhcp4ParserTest, optionDataDefaultsGlobal) {
Subnet4Ptr subnet = CfgMgr::instance().getStagingCfg()->
getCfgSubnets4()->selectSubnet(IOAddress("192.0.2.200"));
ASSERT_TRUE(subnet);
OptionContainerPtr options = subnet->getCfgOption()->getAll("dhcp4");
OptionContainerPtr options = subnet->getCfgOption()->getAll(DHCP4_OPTION_SPACE);
ASSERT_EQ(0, options->size());
options = CfgMgr::instance().getStagingCfg()->getCfgOption()->getAll("dhcp4");
options = CfgMgr::instance().getStagingCfg()->getCfgOption()->getAll(DHCP4_OPTION_SPACE);
ASSERT_EQ(2, options->size());
// Get the search index. Index #1 is to search using option code.
......@@ -1994,13 +1994,13 @@ TEST_F(Dhcp4ParserTest, optionDataDefaultsSubnet) {
// These options are subnet options
OptionContainerPtr options =
CfgMgr::instance().getStagingCfg()->getCfgOption()->getAll("dhcp4");
CfgMgr::instance().getStagingCfg()->getCfgOption()->getAll(DHCP4_OPTION_SPACE);
ASSERT_EQ(0, options->size());
Subnet4Ptr subnet = CfgMgr::instance().getStagingCfg()->
getCfgSubnets4()->selectSubnet(IOAddress("192.0.2.200"));
ASSERT_TRUE(subnet);
options = subnet->getCfgOption()->getAll("dhcp4");
options = subnet->getCfgOption()->getAll(DHCP4_OPTION_SPACE);
ASSERT_EQ(2, options->size());
// Get the search index. Index #1 is to search using option code.
......@@ -2078,7 +2078,7 @@ TEST_F(Dhcp4ParserTest, optionDataTwoSpaces) {
// Options should be now available
// Try to get the option from the space dhcp4.
OptionDescriptor desc1 =
CfgMgr::instance().getStagingCfg()->getCfgOption()->get("dhcp4", 56);
CfgMgr::instance().getStagingCfg()->getCfgOption()->get(DHCP4_OPTION_SPACE, 56);
ASSERT_TRUE(desc1.option_);
EXPECT_EQ(56, desc1.option_->getType());
// Try to get the option from the space isc.
......@@ -2207,13 +2207,13 @@ TEST_F(Dhcp4ParserTest, optionDataEncapsulate) {
// We should have one option available.
OptionContainerPtr options =
CfgMgr::instance().getStagingCfg()->getCfgOption()->getAll("dhcp4");
CfgMgr::instance().getStagingCfg()->getCfgOption()->getAll(DHCP4_OPTION_SPACE);
ASSERT_TRUE(options);
ASSERT_EQ(1, options->size());
// Get the option.
OptionDescriptor desc =
CfgMgr::instance().getStagingCfg()->getCfgOption()->get("dhcp4", 222);
CfgMgr::instance().getStagingCfg()->getCfgOption()->get(DHCP4_OPTION_SPACE, 222);
EXPECT_TRUE(desc.option_);
EXPECT_EQ(222, desc.option_->getType());
......@@ -2267,7 +2267,7 @@ TEST_F(Dhcp4ParserTest, optionDataInSingleSubnet) {
Subnet4Ptr subnet = CfgMgr::instance().getStagingCfg()->
getCfgSubnets4()->selectSubnet(IOAddress("192.0.2.24"));
ASSERT_TRUE(subnet);
OptionContainerPtr options = subnet->getCfgOption()->getAll("dhcp4");
OptionContainerPtr options = subnet->getCfgOption()->getAll(DHCP4_OPTION_SPACE);
ASSERT_EQ(2, options->size());
// Get the search index. Index #1 is to search using option code.
......@@ -2303,7 +2303,7 @@ TEST_F(Dhcp4ParserTest, optionDataBoolean) {
// Create configuration. Use standard option 19 (ip-forwarding).
std::map<std::string, std::string> params;
params["name"] = "ip-forwarding";
params["space"] = "dhcp4";
params["space"] = DHCP4_OPTION_SPACE;
params["code"] = "19";
params["data"] = "true";
params["csv-format"] = "true";
......@@ -2414,7 +2414,7 @@ TEST_F(Dhcp4ParserTest, optionDataInMultipleSubnets) {
Subnet4Ptr subnet1 = CfgMgr::instance().getStagingCfg()->
getCfgSubnets4()->selectSubnet(IOAddress("192.0.2.100"));
ASSERT_TRUE(subnet1);
OptionContainerPtr options1 = subnet1->getCfgOption()->getAll("dhcp4");
OptionContainerPtr options1 = subnet1->getCfgOption()->getAll(DHCP4_OPTION_SPACE);
ASSERT_EQ(1, options1->size());
// Get the search index. Index #1 is to search using option code.
......@@ -2439,7 +2439,7 @@ TEST_F(Dhcp4ParserTest, optionDataInMultipleSubnets) {
Subnet4Ptr subnet2 = CfgMgr::instance().getStagingCfg()->
getCfgSubnets4()->selectSubnet(IOAddress("192.0.3.102"));
ASSERT_TRUE(subnet2);
OptionContainerPtr options2 = subnet2->getCfgOption()->getAll("dhcp4");
OptionContainerPtr options2 = subnet2->getCfgOption()->getAll(DHCP4_OPTION_SPACE);
ASSERT_EQ(1, options2->size());
const OptionContainerTypeIndex& idx2 = options2->get<1>();
......@@ -2517,7 +2517,7 @@ TEST_F(Dhcp4ParserTest, optionDataLowerCase) {
Subnet4Ptr subnet = CfgMgr::instance().getStagingCfg()->
getCfgSubnets4()->selectSubnet(IOAddress("192.0.2.5"));
ASSERT_TRUE(subnet);
OptionContainerPtr options = subnet->getCfgOption()->getAll("dhcp4");
OptionContainerPtr options = subnet->getCfgOption()->getAll(DHCP4_OPTION_SPACE);