Commit 9702b661 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[5288] Minor changes after review

parent 556f6591
......@@ -127,8 +127,20 @@
"data": "0xf0"
}
],
// Now we define pools. There are two pools here.
"pools": [ {
"pool": "192.0.2.10 - 192.0.2.200",
// This is the first pool. Nothing spectacular here, just a range
// of addresses.
"pool": "192.0.2.10 - 192.0.2.100"
}, {
// This second pool is more interesting. Anyone who gets an
// address from this pool will also get this specific option
// value if asks for DNS servers configuration. This value,
// being more specific, overrides any values that were specified
// on either global or subnet scope.
"pool": "192.0.2.101 - 192.0.2.200",
"option-data": [
{
"name": "domain-name-servers",
......
......@@ -2809,6 +2809,8 @@ TEST_F(Dhcp4ParserTest, optionDataSinglePool) {
testOption(*range.first, 23, foo2_expected, sizeof(foo2_expected));
}
// This test verifies that it's possible to define different options in
// different pools and those options are not confused.
TEST_F(Dhcp4ParserTest, optionDataMultiplePools) {
ConstElementPtr x;
string config = "{ " + genIfaceConfig() + ","
......
......@@ -135,7 +135,7 @@ TEST(Pool4Test, addOptions) {
// Add 7 options to another option space. The option codes partially overlap
// with option codes that we have added to dhcp4 option space.
for (uint16_t code = 105; code < 112; ++code) {
OptionPtr option(new Option(Option::V6, code, OptionBuffer(10, 0xFF)));
OptionPtr option(new Option(Option::V4, code, OptionBuffer(10, 0xFF)));
ASSERT_NO_THROW(pool->getCfgOption()->add(option, false, "isc"));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment