"server-ip": "127.0.0.1",
// Port number on which D2 listens for NCRs.
- "server-port": 53001,
-
- // The following parameters are DEPRECATED. They have been
- // replaced with parameters that may be set at the global,
- // shared-network, and subnet4 scopes. They are listed here
- // as configuration parsing still accepts them. Eventually
- // support for them will be removed.
- "generated-prefix": "myhost",
- "hostname-char-replacement": "x",
- "hostname-char-set": "[^A-Za-z0-9.-]",
- "override-client-update": false,
- "override-no-update": false,
- "qualifying-suffix": "",
- "replace-client-name": "never"
+ "server-port": 53001
},
// Specifies the first of the two consecutive ports of the UDP
"server-ip": "127.0.0.1",
// Port number on which D2 listens for NCRs.
- "server-port": 53001,
-
- // The following parameters are DEPRECATED. They have been
- // replaced with parameters that may be set at the global,
- // shared-network, and subnet4 scopes. They are listed here
- // as configuration parsing still accepts them. Eventually
- // support for them will be removed.
- "generated-prefix": "myhost",
- "hostname-char-replacement": "x",
- "hostname-char-set": "[^A-Za-z0-9.-]",
- "override-client-update": false,
- "override-no-update": false,
- "qualifying-suffix": "",
- "replace-client-name": "never"
+ "server-port": 53001
},
// Specifies the first of the two consecutive ports of the UDP
"server-ip": "::1",
// Port number on which D2 listens for NCRs.
- "server-port": 53001,
-
- // The following parameters are DEPRECATED. They have been
- // replaced with parameters that may be set at the global,
- // shared-network, and subnet6 scopes. They are listed here
- // as configuration parsing still accepts them. Eventually
- // support for them will be removed.
- "generated-prefix": "myhost",
- "hostname-char-replacement": "x",
- "hostname-char-set": "[^A-Za-z0-9.-]",
- "override-client-update": false,
- "override-no-update": false,
- "qualifying-suffix": "",
- "replace-client-name": "never"
+ "server-port": 53001
},
// Specifies the first of the two consecutive ports of the UDP
"server-ip": "::1",
// Port number on which D2 listens for NCRs.
- "server-port": 53001,
-
- // The following parameters are DEPRECATED. They have been
- // replaced with parameters that may be set at the global,
- // shared-network, and subnet6 scopes. They are listed here
- // as configuration parsing still accepts them. Eventually
- // support for them will be removed.
- "generated-prefix": "myhost",
- "hostname-char-replacement": "x",
- "hostname-char-set": "[^A-Za-z0-9.-]",
- "override-client-update": false,
- "override-no-update": false,
- "qualifying-suffix": "",
- "replace-client-name": "never"
+ "server-port": 53001
},
// Specifies the first of the two consecutive ports of the UDP
- ``sender-port``
- ``max-queue-size``
- ``ncr-protocol``
- - ``ncr-format"``
+ - ``ncr-format``
2. Behavioral Parameters
- ``ddns-send-updates``
- ``ddns-override-no-update``
- ``ddns-override-client-update``
- - ``ddns-replace-client-name"``
+ - ``ddns-replace-client-name``
- ``ddns-generated-prefix``
- ``ddns-qualifying-suffix``
- ``ddns-update-on-renew``
- ``hostname-char-set``
- ``hostname-char-replacement``
-.. note::
-
- For backward compatibility, configuration parsing still recognizes
- the original behavioral parameters specified in ``dhcp-ddns``,
- by translating the parameter into its global equivalent. If a
- parameter is specified both globally and in ``dhcp-ddns``, the latter
- value is ignored. In either case, a log is emitted explaining
- what has occurred. Specifying these values within ``dhcp-ddns`` is
- deprecated and support for it will be removed.
-
.. note::
Behavioral parameters that affect the FQDN are in effect even
``ddns-generated-prefix``, ``ddns-qualifying-suffix``, ``hostname-char-set``,
and ``hostname-char-replacement``.
-
The default configuration and values would appear as follows:
::
.. note::
It is possible to specify ``hostname-char-set``
- and/or ``hostname-char-replacement`` at the global scope. This allows
- host names to be sanitized without requiring a ``dhcp-ddns`` entry. When
- a ``hostname-char`` parameter is defined at both the global scope and
- in a ``dhcp-ddns`` entry, the second (local) value is used.
+ and/or ``hostname-char-replacement`` at the global scope.
The Kea hook library :ischooklib:`libdhcp_ddns_tuning.so` provides the ability
for both :iscman:`kea-dhcp4` and :iscman:`kea-dhcp6` to generate host names
+------------------------------------------------------------------+------------------------------+----------------------------------+
| dhcp-ddns.server-port | dhcp-ddns | server-port |
+------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.generated-prefix | dhcp-ddns | generated-prefix |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.hostname-char-replacement | dhcp-ddns | hostname-char-replacement |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.hostname-char-set | dhcp-ddns | hostname-char-set |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.override-client-update | dhcp-ddns | override-client-update |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.override-no-update | dhcp-ddns | override-no-update |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.qualifying-suffix | dhcp-ddns | qualifying-suffix |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.replace-client-name | dhcp-ddns | replace-client-name |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
| expired-leases-processing.flush-reclaimed-timer-wait-time | expired-leases-processing | flush-reclaimed-timer-wait-time |
+------------------------------------------------------------------+------------------------------+----------------------------------+
| expired-leases-processing.hold-reclaimed-time | expired-leases-processing | hold-reclaimed-time |
- ``sender-port``
- ``max-queue-size``
- ``ncr-protocol``
- - ``ncr-format"``
+ - ``ncr-format``
2. Behavioral Parameters
- ``ddns-send-updates``
- ``ddns-override-no-update``
- ``ddns-override-client-update``
- - ``ddns-replace-client-name"``
+ - ``ddns-replace-client-name``
- ``ddns-generated-prefix``
- ``ddns-qualifying-suffix``
- ``ddns-update-on-renew``
- ``hostname-char-set``
- ``hostname-char-replacement``
-.. note::
-
- For backward compatibility, configuration parsing still recognizes
- the original behavioral parameters specified in ``dhcp-ddns``,
- by translating the parameter into its global equivalent. If a
- parameter is specified both globally and in ``dhcp-ddns``, the latter
- value is ignored. In either case, a log is emitted explaining
- what has occurred. Specifying these values within ``dhcp-ddns`` is
- deprecated and support for it will be removed.
-
.. note::
Behavioral parameters that affect the FQDN are in effect even
if both ``enable-updates`` and ``ddns-send-updates`` are ``false``,
to support environments in which clients are responsible
- for their own DNS updates. This applies to ``ddns-replace-client-name``,
+ for their own DNS updates. This applies to ``ddns-replace-client-name``,
``ddns-generated-prefix``, ``ddns-qualifying-suffix``, ``hostname-char-set``,
and ``hostname-char-replacement``.
.. note::
It is possible to specify ``hostname-char-set``
- and/or ``hostname-char-replacement`` at the global scope. This allows
- host names to be sanitized without requiring a ``dhcp-ddns`` entry. When
- a ``hostname-char`` parameter is defined at both the global scope and
- in a ``dhcp-ddns`` entry, the second (local) value is used.
+ and/or ``hostname-char-replacement`` at the global scope.
The Kea hook library :ischooklib:`libdhcp_ddns_tuning.so` provides the ability
for both :iscman:`kea-dhcp4` and :iscman:`kea-dhcp6` to generate host names
+------------------------------------------------------------------+------------------------------+----------------------------------+
| dhcp-ddns.server-port | dhcp-ddns | server-port |
+------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.generated-prefix | dhcp-ddns | generated-prefix |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.hostname-char-replacement | dhcp-ddns | hostname-char-replacement |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.hostname-char-set | dhcp-ddns | hostname-char-set |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.override-client-update | dhcp-ddns | override-client-update |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.override-no-update | dhcp-ddns | override-no-update |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.qualifying-suffix | dhcp-ddns | qualifying-suffix |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
- | dhcp-ddns.replace-client-name | dhcp-ddns | replace-client-name |
- +------------------------------------------------------------------+------------------------------+----------------------------------+
| expired-leases-processing.flush-reclaimed-timer-wait-time | expired-leases-processing | flush-reclaimed-timer-wait-time |
+------------------------------------------------------------------+------------------------------+----------------------------------+
| expired-leases-processing.hold-reclaimed-time | expired-leases-processing | hold-reclaimed-time |
}
}
-\"qualifying-suffix\" {
- switch(driver.ctx_) {
- case isc::dhcp::Parser4Context::DHCP_DDNS:
- return isc::dhcp::Dhcp4Parser::make_QUALIFYING_SUFFIX(driver.loc_);
- default:
- return isc::dhcp::Dhcp4Parser::make_STRING("qualifying-suffix", driver.loc_);
- }
-}
-
\"server-ip\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_DDNS:
}
}
-\"override-no-update\" {
- switch(driver.ctx_) {
- case isc::dhcp::Parser4Context::DHCP_DDNS:
- return isc::dhcp::Dhcp4Parser::make_OVERRIDE_NO_UPDATE(driver.loc_);
- default:
- return isc::dhcp::Dhcp4Parser::make_STRING("override-no-update", driver.loc_);
- }
-}
-
-\"override-client-update\" {
- switch(driver.ctx_) {
- case isc::dhcp::Parser4Context::DHCP_DDNS:
- return isc::dhcp::Dhcp4Parser::make_OVERRIDE_CLIENT_UPDATE(driver.loc_);
- default:
- return isc::dhcp::Dhcp4Parser::make_STRING("override-client-update", driver.loc_);
- }
-}
-
-\"replace-client-name\" {
- switch(driver.ctx_) {
- case isc::dhcp::Parser4Context::DHCP_DDNS:
- return isc::dhcp::Dhcp4Parser::make_REPLACE_CLIENT_NAME(driver.loc_);
- default:
- return isc::dhcp::Dhcp4Parser::make_STRING("replace-client-name", driver.loc_);
- }
-}
-
-\"generated-prefix\" {
- switch(driver.ctx_) {
- case isc::dhcp::Parser4Context::DHCP_DDNS:
- return isc::dhcp::Dhcp4Parser::make_GENERATED_PREFIX(driver.loc_);
- default:
- return isc::dhcp::Dhcp4Parser::make_STRING("generated-prefix", driver.loc_);
- }
-}
-
\"hostname-char-set\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
- case isc::dhcp::Parser4Context::DHCP_DDNS:
case isc::dhcp::Parser4Context::SUBNET4:
case isc::dhcp::Parser4Context::SHARED_NETWORK:
return isc::dhcp::Dhcp4Parser::make_HOSTNAME_CHAR_SET(driver.loc_);
\"hostname-char-replacement\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
- case isc::dhcp::Parser4Context::DHCP_DDNS:
case isc::dhcp::Parser4Context::SUBNET4:
case isc::dhcp::Parser4Context::SHARED_NETWORK:
return isc::dhcp::Dhcp4Parser::make_HOSTNAME_CHAR_REPLACEMENT(driver.loc_);
This debug message is issued when the server found a hostname reservation
for a client and uses this reservation in a hostname option sent back
to this client. The reserved hostname is qualified with a value
-of 'qualifying-suffix' parameter, if this parameter is specified.
+of 'ddns-qualifying-suffix' parameter, if this parameter is specified.
% DHCP4_RESPONSE_DATA %1: responding with packet %2 (type %3), packet details: %4
A debug message including the detailed data about the packet being sent
DHCP_DDNS "dhcp-ddns"
ENABLE_UPDATES "enable-updates"
- QUALIFYING_SUFFIX "qualifying-suffix"
SERVER_IP "server-ip"
SERVER_PORT "server-port"
SENDER_IP "sender-ip"
MAX_QUEUE_SIZE "max-queue-size"
NCR_PROTOCOL "ncr-protocol"
NCR_FORMAT "ncr-format"
- OVERRIDE_NO_UPDATE "override-no-update"
- OVERRIDE_CLIENT_UPDATE "override-client-update"
- REPLACE_CLIENT_NAME "replace-client-name"
- GENERATED_PREFIX "generated-prefix"
TCP "tcp"
JSON "JSON"
WHEN_PRESENT "when-present"
$$ = ElementPtr(new StringElement("when-not-present", ctx.loc2pos(@1)));
}
| BOOLEAN {
- error(@1, "boolean values for the replace-client-name are "
+ error(@1, "boolean values for the ddns-replace-client-name are "
"no longer supported");
}
;
| max_queue_size
| ncr_protocol
| ncr_format
- | dep_override_no_update
- | dep_override_client_update
- | dep_replace_client_name
- | dep_generated_prefix
- | dep_qualifying_suffix
- | dep_hostname_char_set
- | dep_hostname_char_replacement
| user_context
| comment
| unknown_map_entry
ctx.leave();
};
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_qualifying_suffix: QUALIFYING_SUFFIX {
- ctx.unique("qualifying-suffix", ctx.loc2pos(@1));
- ctx.enter(ctx.NO_KEYWORD);
-} COLON STRING {
- ElementPtr s(new StringElement($4, ctx.loc2pos(@4)));
- ctx.stack_.back()->set("qualifying-suffix", s);
- ctx.leave();
-};
-
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_override_no_update: OVERRIDE_NO_UPDATE COLON BOOLEAN {
- ctx.unique("override-no-update", ctx.loc2pos(@1));
- ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
- ctx.stack_.back()->set("override-no-update", b);
-};
-
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_override_client_update: OVERRIDE_CLIENT_UPDATE COLON BOOLEAN {
- ctx.unique("override-client-update", ctx.loc2pos(@1));
- ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
- ctx.stack_.back()->set("override-client-update", b);
-};
-
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_replace_client_name: REPLACE_CLIENT_NAME {
- ctx.unique("replace-client-name", ctx.loc2pos(@1));
- ctx.enter(ctx.REPLACE_CLIENT_NAME);
-} COLON ddns_replace_client_name_value {
- ctx.stack_.back()->set("replace-client-name", $4);
- ctx.leave();
-};
-
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_generated_prefix: GENERATED_PREFIX {
- ctx.unique("generated-prefix", ctx.loc2pos(@1));
- ctx.enter(ctx.NO_KEYWORD);
-} COLON STRING {
- ElementPtr s(new StringElement($4, ctx.loc2pos(@4)));
- ctx.stack_.back()->set("generated-prefix", s);
- ctx.leave();
-};
-
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_hostname_char_set: HOSTNAME_CHAR_SET {
- ctx.unique("hostname-char-set", ctx.loc2pos(@1));
- ctx.enter(ctx.NO_KEYWORD);
-} COLON STRING {
- ElementPtr s(new StringElement($4, ctx.loc2pos(@4)));
- ctx.stack_.back()->set("hostname-char-set", s);
- ctx.leave();
-};
-
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_hostname_char_replacement: HOSTNAME_CHAR_REPLACEMENT {
- ctx.unique("hostname-char-replacement", ctx.loc2pos(@1));
- ctx.enter(ctx.NO_KEYWORD);
-} COLON STRING {
- ElementPtr s(new StringElement($4, ctx.loc2pos(@4)));
- ctx.stack_.back()->set("hostname-char-replacement", s);
- ctx.leave();
-};
-
-
// Config control information element
config_control: CONFIG_CONTROL {
/// configuration. A reserved hostname takes precedence over a hostname
/// supplied by the client or auto generated hostname.
///
- /// If the 'qualifying-suffix' parameter is specified, its value is used
+ /// If the 'ddns-qualifying-suffix' parameter is specified, its value is used
/// to qualify a hostname. For example, if the host reservation contains
/// a hostname 'marcin-laptop', and the qualifying suffix is
/// 'example.isc.org', the hostname returned to the client will be
- /// 'marcin-laptop.example.isc.org'. If the 'qualifying-suffix' is not
+ /// 'marcin-laptop.example.isc.org'. If the 'ddns-qualifying-suffix' is not
/// specified (empty), the reserved hostname is returned to the client
/// unqualified.
///
- /// The 'qualifying-suffix' value is also used to qualify the hostname
+ /// The 'ddns-qualifying-suffix' value is also used to qualify the hostname
/// supplied by the client, when this hostname is unqualified,
/// e.g. 'laptop-x'. If the supplied hostname is qualified, e.g.
/// 'laptop-x.example.org', the qualifying suffix will not be appended
// default values and will insert derived values as well.
mutable_cfg = boost::const_pointer_cast<Element>(config_set);
- // Relocate dhcp-ddns parameters that have moved to global scope.
- // Rule is that a global value overrides the dhcp-ddns value, so
- // we need to do this before we apply global defaults.
- // Note this is done for backward compatibility.
- srv_config->moveDdnsParams(mutable_cfg);
-
// Move from reservation mode to new reservations flags.
// @todo add warning
BaseNetworkParser::moveReservationMode(mutable_cfg);
checkGlobal("ddns-qualifying-suffix", "");
}
-// This test verifies that valid but deprecated dhcp-ddns parameters
-// get moved to the global scope when they do not already exist there.
-TEST_F(Dhcp4ParserTest, d2ClientConfigMoveToGlobal) {
- ConstElementPtr status;
-
- // Verify that the D2 configuration can be fetched and is set to disabled.
- D2ClientConfigPtr d2_client_config = CfgMgr::instance().getD2ClientConfig();
- EXPECT_FALSE(d2_client_config->getEnableUpdates());
-
- // Verify that the convenience method agrees.
- ASSERT_FALSE(CfgMgr::instance().ddnsEnabled());
-
- string config_str = "{ " + genIfaceConfig() + "," +
- "\"rebind-timer\": 2000, "
- "\"renew-timer\": 1000, "
- "\"subnet4\": [ { "
- " \"id\": 1,"
- " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
- " \"subnet\": \"192.0.2.0/24\" } ],"
- " \"dhcp-ddns\" : {"
- " \"enable-updates\" : true, "
- " \"server-ip\" : \"192.168.2.1\", "
- " \"server-port\" : 777, "
- " \"sender-ip\" : \"192.168.2.2\", "
- " \"sender-port\" : 778, "
- " \"max-queue-size\" : 2048, "
- " \"ncr-protocol\" : \"UDP\", "
- " \"ncr-format\" : \"JSON\", "
- " \"override-no-update\" : true, "
- " \"override-client-update\" : true, "
- " \"replace-client-name\" : \"when-present\", "
- " \"generated-prefix\" : \"test.prefix\", "
- " \"qualifying-suffix\" : \"test.suffix.\", "
- " \"hostname-char-set\" : \"[^A-Z]\", "
- " \"hostname-char-replacement\" : \"x\" }, "
- "\"valid-lifetime\": 4000 }";
-
- // Convert the JSON string to configuration elements.
- ConstElementPtr config;
- ASSERT_NO_THROW(config = parseDHCP4(config_str, true));
- extractConfig(config_str);
-
- // Pass the configuration in for parsing.
- EXPECT_NO_THROW(status = Dhcpv4SrvTest::configure(*srv_, config));
-
- // check if returned status is OK
- checkResult(status, 0);
-
- // Verify that DHCP-DDNS updating is enabled.
- EXPECT_TRUE(CfgMgr::instance().ddnsEnabled());
-
- // Verify that the D2 configuration can be retrieved.
- d2_client_config = CfgMgr::instance().getD2ClientConfig();
- ASSERT_TRUE(d2_client_config);
-
- // Verify that the configuration values are correct.
- EXPECT_TRUE(d2_client_config->getEnableUpdates());
- EXPECT_EQ("192.168.2.1", d2_client_config->getServerIp().toText());
- EXPECT_EQ(777, d2_client_config->getServerPort());
- EXPECT_EQ("192.168.2.2", d2_client_config->getSenderIp().toText());
- EXPECT_EQ(778, d2_client_config->getSenderPort());
- EXPECT_EQ(2048, d2_client_config->getMaxQueueSize());
- EXPECT_EQ(dhcp_ddns::NCR_UDP, d2_client_config->getNcrProtocol());
- EXPECT_EQ(dhcp_ddns::FMT_JSON, d2_client_config->getNcrFormat());
-
- // ddns-send-updates should be global default
- checkGlobal("ddns-send-updates", true);
-
- // The following should all have been moved from dhcp-ddns.
- checkGlobal("ddns-override-no-update", true);
- checkGlobal("ddns-override-client-update", true);
- checkGlobal("ddns-replace-client-name", "when-present");
- checkGlobal("ddns-generated-prefix", "test.prefix");
- checkGlobal("ddns-qualifying-suffix", "test.suffix.");
- checkGlobal("hostname-char-set", "[^A-Z]");
- checkGlobal("hostname-char-replacement", "x");
-}
-
-// This test verifies that explicit global values override deprecated
-// dhcp-ddns parameters (i.e. global scope wins)
-TEST_F(Dhcp4ParserTest, d2ClientConfigBoth) {
- ConstElementPtr status;
-
- // Verify that the D2 configuration can be fetched and is set to disabled.
- D2ClientConfigPtr d2_client_config = CfgMgr::instance().getD2ClientConfig();
- EXPECT_FALSE(d2_client_config->getEnableUpdates());
-
- // Verify that the convenience method agrees.
- ASSERT_FALSE(CfgMgr::instance().ddnsEnabled());
-
- string config_str = "{ " + genIfaceConfig() + "," +
- "\"rebind-timer\": 2000, "
- "\"renew-timer\": 1000, "
- "\"subnet4\": [ { "
- " \"id\": 1,"
- " \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
- " \"subnet\": \"192.0.2.0/24\" } ],"
- " \"dhcp-ddns\" : {"
- " \"enable-updates\" : true, "
- " \"server-ip\" : \"192.168.2.1\", "
- " \"server-port\" : 777, "
- " \"sender-ip\" : \"192.168.2.2\", "
- " \"sender-port\" : 778, "
- " \"max-queue-size\" : 2048, "
- " \"ncr-protocol\" : \"UDP\", "
- " \"ncr-format\" : \"JSON\", "
- " \"override-no-update\" : false, "
- " \"override-client-update\" : false, "
- " \"replace-client-name\" : \"when-present\", "
- " \"generated-prefix\" : \"d2.prefix\", "
- " \"qualifying-suffix\" : \"d2.suffix.\", "
- " \"hostname-char-set\" : \"[^0-9]\", "
- " \"hostname-char-replacement\" : \"z\" }, "
- " \"ddns-send-updates\" : false, "
- " \"ddns-override-no-update\" : true, "
- " \"ddns-override-client-update\" : true, "
- " \"ddns-replace-client-name\" : \"always\", "
- " \"ddns-generated-prefix\" : \"global.prefix\", "
- " \"ddns-qualifying-suffix\" : \"global.suffix.\", "
- " \"hostname-char-set\" : \"[^A-Z]\", "
- " \"hostname-char-replacement\" : \"x\", "
- "\"valid-lifetime\": 4000 }";
-
- // Convert the JSON string to configuration elements.
- ConstElementPtr config;
- ASSERT_NO_THROW(config = parseDHCP4(config_str, true));
- extractConfig(config_str);
-
- // Pass the configuration in for parsing.
- EXPECT_NO_THROW(status = Dhcpv4SrvTest::configure(*srv_, config));
-
- // check if returned status is OK
- checkResult(status, 0);
-
- // Verify that DHCP-DDNS updating is enabled.
- EXPECT_TRUE(CfgMgr::instance().ddnsEnabled());
-
- // Verify that the D2 configuration can be retrieved.
- d2_client_config = CfgMgr::instance().getD2ClientConfig();
- ASSERT_TRUE(d2_client_config);
-
- // Verify that the configuration values are correct.
- EXPECT_TRUE(d2_client_config->getEnableUpdates());
- EXPECT_EQ("192.168.2.1", d2_client_config->getServerIp().toText());
- EXPECT_EQ(777, d2_client_config->getServerPort());
- EXPECT_EQ("192.168.2.2", d2_client_config->getSenderIp().toText());
- EXPECT_EQ(778, d2_client_config->getSenderPort());
- EXPECT_EQ(2048, d2_client_config->getMaxQueueSize());
- EXPECT_EQ(dhcp_ddns::NCR_UDP, d2_client_config->getNcrProtocol());
- EXPECT_EQ(dhcp_ddns::FMT_JSON, d2_client_config->getNcrFormat());
-
- // Verify all global values won.
- checkGlobal("ddns-send-updates", false);
- checkGlobal("ddns-override-no-update", true);
- checkGlobal("ddns-override-client-update", true);
- checkGlobal("ddns-replace-client-name", "always");
- checkGlobal("ddns-generated-prefix", "global.prefix");
- checkGlobal("ddns-qualifying-suffix", "global.suffix.");
- checkGlobal("hostname-char-set", "[^A-Z]");
- checkGlobal("hostname-char-replacement", "x");
-}
-
// This test checks the ability of the server to handle a configuration
// containing an invalid dhcp-ddns (D2ClientConfig) entry.
TEST_F(Dhcp4ParserTest, invalidD2ClientConfig) {
string config_str = "{ " + genIfaceConfig() + "," +
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
+ "\"ddns-override-no-update\" : true, "
+ "\"ddns-override-client-update\" : true, "
+ "\"ddns-replace-client-name\" : \"when-present\", "
+ "\"ddns-generated-prefix\" : \"test.prefix\", "
+ "\"ddns-qualifying-suffix\" : \"test.suffix.\", "
"\"subnet4\": [ { "
" \"id\": 1,"
" \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
" \"server-ip\" : \"bogus-value\", "
" \"server-port\" : 5301, "
" \"ncr-protocol\" : \"UDP\", "
- " \"ncr-format\" : \"JSON\", "
- " \"override-no-update\" : true, "
- " \"override-client-update\" : true, "
- " \"replace-client-name\" : \"when-present\", "
- " \"generated-prefix\" : \"test.prefix\", "
- " \"qualifying-suffix\" : \"test.suffix.\" },"
+ " \"ncr-format\" : \"JSON\"},"
"\"valid-lifetime\": 4000 }";
// Convert the JSON string to configuration elements.
"},"
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
+ "\"ddns-override-no-update\" : true, "
+ "\"ddns-override-client-update\" : true, "
+ "\"ddns-replace-client-name\" : \"when-present\", "
+ "\"ddns-generated-prefix\" : \"test.prefix\", "
+ "\"ddns-qualifying-suffix\" : \"test.suffix.\", "
"\"subnet4\": [ { "
" \"id\": 1,"
" \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
" \"sender-port\" : " << sender_port << ", "
" \"max-queue-size\" : " << max_queue_size << ", "
" \"ncr-protocol\" : \"UDP\", "
- " \"ncr-format\" : \"JSON\", "
- " \"override-no-update\" : true, "
- " \"override-client-update\" : true, "
- " \"replace-client-name\" : \"when-present\", "
- " \"generated-prefix\" : \"test.prefix\", "
- " \"qualifying-suffix\" : \"test.suffix.\" },"
+ " \"ncr-format\" : \"JSON\"},"
"\"valid-lifetime\": 4000 }";
configure(config.str(), exp_result);
"},"
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
+ "\"ddns-override-no-update\" : true, "
+ "\"ddns-override-client-update\" : true, "
+ "\"ddns-replace-client-name\" : \"when-present\", "
+ "\"ddns-generated-prefix\" : \"test.prefix\", "
+ "\"ddns-qualifying-suffix\" : \"test.suffix.\", "
"\"subnet4\": [ { "
" \"id\": 1,"
" \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
" \"sender-port\" : 0, "
" \"max-queue-size\" : 1024, "
" \"ncr-protocol\" : \"TCP\", "
- " \"ncr-format\" : \"JSON\", "
- " \"override-no-update\" : true, "
- " \"override-client-update\" : true, "
- " \"replace-client-name\" : \"when-present\", "
- " \"generated-prefix\" : \"test.prefix\", "
- " \"qualifying-suffix\" : \"test.suffix.\" },"
+ " \"ncr-format\" : \"JSON\"},"
"\"valid-lifetime\": 4000 }";
ElementPtr json = Element::fromJSON(config);
"},"
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
+ "\"ddns-override-no-update\" : true, "
+ "\"ddns-override-client-update\" : true, "
+ "\"ddns-replace-client-name\" : \"when-present\", "
+ "\"ddns-generated-prefix\" : \"test.prefix\", "
+ "\"ddns-qualifying-suffix\" : \"test.suffix.\", "
"\"subnet4\": [ { "
" \"id\": 1,"
" \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
" \"sender-port\" : 0, "
" \"max-queue-size\" : 1024, "
" \"ncr-protocol\" : \"UDP\", "
- " \"ncr-format\" : \"JSON\", "
- " \"override-no-update\" : true, "
- " \"override-client-update\" : true, "
- " \"replace-client-name\" : \"when-present\", "
- " \"generated-prefix\" : \"test.prefix\", "
- " \"qualifying-suffix\" : \"test.suffix.\" },"
+ " \"ncr-format\" : \"JSON\"},"
"\"valid-lifetime\": 4000 }";
ElementPtr json = Element::fromJSON(config);
"},"
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
+ "\"ddns-override-no-update\" : true, "
+ "\"ddns-override-client-update\" : true, "
+ "\"ddns-replace-client-name\" : \"when-present\", "
+ "\"ddns-generated-prefix\" : \"test.prefix\", "
+ "\"ddns-qualifying-suffix\" : \"test.suffix.\", "
"\"subnet4\": [ { "
" \"id\": 1,"
" \"pools\": [ { \"pool\": \"192.0.2.1 - 192.0.2.100\" } ],"
" \"sender-port\" : 53001, "
" \"max-queue-size\" : 1024, "
" \"ncr-protocol\" : \"UDP\", "
- " \"ncr-format\" : \"JSON\", "
- " \"override-no-update\" : true, "
- " \"override-client-update\" : true, "
- " \"replace-client-name\" : \"when-present\", "
- " \"generated-prefix\" : \"test.prefix\", "
- " \"qualifying-suffix\" : \"test.suffix.\" },"
+ " \"ncr-format\" : \"JSON\"},"
"\"valid-lifetime\": 4000 }";
ElementPtr json = Element::fromJSON(config);
\"subnet\": \"10.0.0.0/8\",
\"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ]
} ],
+ \"ddns-qualifying-suffix\": \"\",
\"dhcp-ddns\": {
- \"enable-updates\": true,
- \"qualifying-suffix\": \"\"
+ \"enable-updates\": true
},
\"loggers\": [
{
\"subnet\": \"10.0.0.0/8\",
\"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ]
} ],
+ \"ddns-qualifying-suffix\": \"\",
\"dhcp-ddns\": {
- \"enable-updates\": true,
- \"qualifying-suffix\": \"\"
+ \"enable-updates\": true
},
\"hooks-libraries\": [
{
\"subnet\": \"10.0.0.0/8\",
\"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ]
} ],
+ \"ddns-qualifying-suffix\": \"\",
\"dhcp-ddns\": {
- \"enable-updates\": true,
- \"qualifying-suffix\": \"\"
+ \"enable-updates\": true
},
\"hooks-libraries\": [
{
\"subnet\": \"10.0.0.0/8\",
\"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ]
} ],
+ \"ddns-qualifying-suffix\": \"\",
\"dhcp-ddns\": {
- \"enable-updates\": true,
- \"qualifying-suffix\": \"\"
+ \"enable-updates\": true
},
\"hooks-libraries\": [
{
" }"
" ]"
" }],"
+ "\"ddns-qualifying-suffix\": \"\","
"\"dhcp-ddns\": {"
- "\"enable-updates\": true,"
- "\"qualifying-suffix\": \"\""
+ "\"enable-updates\": true"
"}"
"}",
// 1
" }"
" ]"
" }],"
+ "\"ddns-qualifying-suffix\": \"fake-suffix.isc.org.\","
"\"dhcp-ddns\": {"
- "\"enable-updates\": true,"
- "\"qualifying-suffix\": \"fake-suffix.isc.org.\""
+ "\"enable-updates\": true"
"}"
"}",
// 2
" \"id\": 1,"
" \"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.10\" } ]"
" }],"
+ "\"ddns-qualifying-suffix\": \"fake-suffix.isc.org.\","
"\"dhcp-ddns\": {"
- "\"enable-updates\": false,"
- "\"qualifying-suffix\": \"fake-suffix.isc.org.\""
+ "\"enable-updates\": false"
"}"
"}",
// 3
" \"id\": 1,"
" \"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.10\" } ]"
" }],"
+ "\"ddns-qualifying-suffix\": \"fake-suffix.isc.org.\","
"\"dhcp-ddns\": {"
- "\"enable-updates\": true,"
- "\"qualifying-suffix\": \"fake-suffix.isc.org.\""
+ "\"enable-updates\": true"
"}"
"}",
// 4
" }"
" ]"
" }],"
+ "\"ddns-qualifying-suffix\": \"\","
"\"dhcp-ddns\": {"
- "\"enable-updates\": false,"
- "\"qualifying-suffix\": \"\""
+ "\"enable-updates\": false"
"}"
"}",
// 5
// Configuration which disables DNS updates but contains a reservation
- // for a hostname and the qualifying-suffix which should be appended to
+ // for a hostname and the ddns-qualifying-suffix which should be appended to
// the reserved hostname in the Hostname option returned to a client.
"{ \"interfaces-config\": {"
" \"interfaces\": [ \"*\" ]"
" }"
" ]"
" }],"
+ "\"ddns-qualifying-suffix\": \"example.isc.org\","
"\"dhcp-ddns\": {"
- "\"enable-updates\": false,"
- "\"qualifying-suffix\": \"example.isc.org\""
+ "\"enable-updates\": false"
"}"
"}",
// 6
" }"
" ]"
" }],"
+ "\"hostname-char-set\" : \"[^A-Za-z0-9.-]\","
+ "\"hostname-char-replacement\" : \"x\","
+ "\"ddns-qualifying-suffix\": \"example.com\","
"\"dhcp-ddns\": {"
- "\"enable-updates\": true,"
- "\"hostname-char-set\" : \"[^A-Za-z0-9.-]\","
- "\"hostname-char-replacement\" : \"x\","
- "\"qualifying-suffix\": \"example.com\""
+ "\"enable-updates\": true"
"}"
"}",
// 7
" \"id\": 1,"
" \"pools\": [ { \"pool\": \"192.0.2.10-192.0.2.10\" } ]"
" }],"
+ "\"ddns-qualifying-suffix\": \"fake-suffix.isc.org.\","
"\"dhcp-ddns\": {"
- "\"enable-updates\": true,"
- "\"qualifying-suffix\": \"fake-suffix.isc.org.\""
+ "\"enable-updates\": true"
"}"
"}",
// 10
" \"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.10\" } ],\n"
" \"offer-lifetime\": 45,\n"
"} ],\n"
+ "\"ddns-qualifying-suffix\": \"example.com.\",\n"
"\"dhcp-ddns\": {\n"
- "\"enable-updates\": true,\n"
- "\"qualifying-suffix\": \"example.com.\"\n"
+ "\"enable-updates\": true\n"
"}\n"
"}",
// 12
" \"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.10\" } ],\n"
" \"ddns-ttl-percent\": .25\n"
"} ],\n"
+ "\"ddns-qualifying-suffix\": \"example.com.\",\n"
"\"dhcp-ddns\": {\n"
- "\"enable-updates\": true,\n"
- "\"qualifying-suffix\": \"example.com.\"\n"
+ "\"enable-updates\": true\n"
"}\n"
"}"
};
}
// Test that the server's processes the hostname (or lack thereof)
- // in a client request correctly, according to the replace-client-name
+ // in a client request correctly, according to the ddns-replace-client-name
// mode configuration parameter. We include hostname sanitizer to ensure
// it does not interfere with name replacement.
//
- // @param mode - value to use for replace-client-name
+ // @param mode - value to use for ddns-replace-client-name
// @param client_name_flag - specifies whether or not the client request
// should contain a hostname option
// @param exp_replacement_flag - specifies whether or not the server is
" \"id\": 1,"
" \"pools\": [ { \"pool\": \"192.0.2.10-192.0.2.10\" } ]"
" }],"
+ "\"ddns-replace-client-name\": \"%s\","
+ "\"ddns-qualifying-suffix\": \"fake-suffix.isc.org.\","
+ "\"hostname-char-set\": \"[^A-Za-z0-9.-]\","
+ "\"hostname-char-replacement\": \"x\","
"\"dhcp-ddns\": {"
- " \"enable-updates\": true,"
- " \"qualifying-suffix\": \"fake-suffix.isc.org.\","
- " \"hostname-char-set\": \"[^A-Za-z0-9.-]\","
- " \"hostname-char-replacement\": \"x\","
- " \"replace-client-name\": \"%s\""
+ " \"enable-updates\": true"
"}}";
// Create the configuration and configure the server
// Tests the following scenario:
// - Updates are enabled
-// - override-no-update is on
+// - ddns-override-no-update is on
// - Client requests no updates (N = 1, S = 0)
//
// Server should override "no update" request and perform updates:
// Tests the following scenario:
// - Updates are enabled
-// - override-client-update is on.
+// - ddns-override-client-update is on.
// - Client requests delegation (N = 0, S = 0)
//
// Server should override client's delegation request and do updates:
// - Response flags should be N = 0, S = 1, O = 1
// - Should queue an NCR
TEST_F(NameDhcpv4SrvTest, overrideClientDelegation) {
- // Turn on override-client-update.
+ // Turn on ddns-override-client-update.
enableD2(OVERRIDE_CLIENT_UPDATE);
flagVsConfigScenario(Option4ClientFqdn::FLAG_E,
}
// This test verifies that the server sends the Hostname option to the client
-// with partial hostname reservation and with the global qualifying-suffix set.
+// with partial hostname reservation and with the global ddns-qualifying-suffix set.
TEST_F(NameDhcpv4SrvTest, hostnameReservationNoDNSQualifyingSuffix) {
Dhcp4Client client(Dhcp4Client::SELECTING);
// Use HW address that matches the reservation entry in the configuration.
EXPECT_EQ(expected_fqdn, lease->hostname_);
}
-// Verifies that the replace-client-name behavior is correct for each of
+// Verifies that the ddns-replace-client-name behavior is correct for each of
// the supported modes.
TEST_F(NameDhcpv4SrvTest, replaceClientNameModeTest) {
" }\n",
// CONFIGURATION 42
"{\n"
-" \"dhcp-ddns\": {\n"
-" \"enable-updates\": true,\n"
-" \"generated-prefix\": \"test.prefix\",\n"
-" \"hostname-char-replacement\": \"x\",\n"
-" \"hostname-char-set\": \"[^A-Z]\",\n"
-" \"max-queue-size\": 2048,\n"
-" \"ncr-format\": \"JSON\",\n"
-" \"ncr-protocol\": \"UDP\",\n"
-" \"override-client-update\": true,\n"
-" \"override-no-update\": true,\n"
-" \"qualifying-suffix\": \"test.suffix.\",\n"
-" \"replace-client-name\": \"when-present\",\n"
-" \"sender-ip\": \"192.168.2.2\",\n"
-" \"sender-port\": 778,\n"
-" \"server-ip\": \"192.168.2.1\",\n"
-" \"server-port\": 777\n"
-" },\n"
-" \"interfaces-config\": {\n"
-" \"interfaces\": [ \"*\" ],\n"
-" \"re-detect\": false\n"
-" },\n"
-" \"rebind-timer\": 2000,\n"
-" \"renew-timer\": 1000,\n"
-" \"subnet4\": [\n"
-" {\n"
-" \"id\": 1,\n"
-" \"pools\": [\n"
-" {\n"
-" \"pool\": \"192.0.2.1 - 192.0.2.100\"\n"
-" }\n"
-" ],\n"
-" \"subnet\": \"192.0.2.0/24\"\n"
-" }\n"
-" ],\n"
-" \"valid-lifetime\": 4000\n"
-" }\n",
- // CONFIGURATION 43
-"{\n"
-" \"ddns-generated-prefix\": \"global.prefix\",\n"
-" \"ddns-override-client-update\": true,\n"
-" \"ddns-override-no-update\": true,\n"
-" \"ddns-qualifying-suffix\": \"global.suffix.\",\n"
-" \"ddns-replace-client-name\": \"always\",\n"
-" \"ddns-send-updates\": false,\n"
-" \"dhcp-ddns\": {\n"
-" \"enable-updates\": true,\n"
-" \"generated-prefix\": \"d2.prefix\",\n"
-" \"hostname-char-replacement\": \"z\",\n"
-" \"hostname-char-set\": \"[^0-9]\",\n"
-" \"max-queue-size\": 2048,\n"
-" \"ncr-format\": \"JSON\",\n"
-" \"ncr-protocol\": \"UDP\",\n"
-" \"override-client-update\": false,\n"
-" \"override-no-update\": false,\n"
-" \"qualifying-suffix\": \"d2.suffix.\",\n"
-" \"replace-client-name\": \"when-present\",\n"
-" \"sender-ip\": \"192.168.2.2\",\n"
-" \"sender-port\": 778,\n"
-" \"server-ip\": \"192.168.2.1\",\n"
-" \"server-port\": 777\n"
-" },\n"
-" \"hostname-char-replacement\": \"x\",\n"
-" \"hostname-char-set\": \"[^A-Z]\",\n"
-" \"interfaces-config\": {\n"
-" \"interfaces\": [ \"*\" ],\n"
-" \"re-detect\": false\n"
-" },\n"
-" \"rebind-timer\": 2000,\n"
-" \"renew-timer\": 1000,\n"
-" \"subnet4\": [\n"
-" {\n"
-" \"id\": 1,\n"
-" \"pools\": [\n"
-" {\n"
-" \"pool\": \"192.0.2.1 - 192.0.2.100\"\n"
-" }\n"
-" ],\n"
-" \"subnet\": \"192.0.2.0/24\"\n"
-" }\n"
-" ],\n"
-" \"valid-lifetime\": 4000\n"
-" }\n",
- // CONFIGURATION 44
-"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" \"re-detect\": false\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 45
+ // CONFIGURATION 43
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 46
+ // CONFIGURATION 44
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 47
+ // CONFIGURATION 45
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 48
+ // CONFIGURATION 46
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 49
+ // CONFIGURATION 47
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 50
+ // CONFIGURATION 48
"{\n"
" \"rebind-timer\": 2000,\n"
" \"renew-timer\": 1000,\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 51
+ // CONFIGURATION 49
"{\n"
" \"rebind-timer\": 2000,\n"
" \"renew-timer\": 1000,\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 52
+ // CONFIGURATION 50
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" },\n"
" \"subnet4\": [ ]\n"
" }\n",
- // CONFIGURATION 53
+ // CONFIGURATION 51
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" },\n"
" \"subnet4\": [ ]\n"
" }\n",
- // CONFIGURATION 54
+ // CONFIGURATION 52
"{\n"
" \"decline-probation-period\": 12345,\n"
" \"interfaces-config\": {\n"
" },\n"
" \"subnet4\": [ ]\n"
" }\n",
- // CONFIGURATION 55
+ // CONFIGURATION 53
"{\n"
" \"expired-leases-processing\": {\n"
" \"flush-reclaimed-timer-wait-time\": 35,\n"
" },\n"
" \"subnet4\": [ ]\n"
" }\n",
- // CONFIGURATION 56
+ // CONFIGURATION 54
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 57
+ // CONFIGURATION 55
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 58
+ // CONFIGURATION 56
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 59
+ // CONFIGURATION 57
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 60
+ // CONFIGURATION 58
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 61
+ // CONFIGURATION 59
"{\n"
" \"client-classes\": [\n"
" {\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 62
+ // CONFIGURATION 60
"{\n"
" \"client-classes\": [\n"
" {\n"
" }\n"
" ]\n"
" }\n",
- // CONFIGURATION 63
+ // CONFIGURATION 61
"{\n"
" \"client-classes\": [\n"
" {\n"
" }\n"
" ]\n"
" }\n",
- // CONFIGURATION 64
+ // CONFIGURATION 62
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 65
+ // CONFIGURATION 63
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 66
+ // CONFIGURATION 64
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 67
+ // CONFIGURATION 65
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 68
+ // CONFIGURATION 66
"{\n"
" \"hosts-databases\": [\n"
" {\n"
" \"renew-timer\": 1000,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 69
+ // CONFIGURATION 67
"{\n"
" \"client-classes\": [\n"
" {\n"
" \"comment\": \"A DHCPv4 server\"\n"
" }\n"
" }\n",
- // CONFIGURATION 70
+ // CONFIGURATION 68
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 71
+ // CONFIGURATION 69
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 72
+ // CONFIGURATION 70
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 73
+ // CONFIGURATION 71
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 74
+ // CONFIGURATION 72
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" \"statistic-default-sample-count\": 10,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 75
+ // CONFIGURATION 73
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" },\n"
" \"subnet4\": [ ]\n"
" }\n",
- // CONFIGURATION 76
+ // CONFIGURATION 74
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" },\n"
" \"subnet4\": [ ]\n"
" }\n",
- // CONFIGURATION 77
+ // CONFIGURATION 75
"{\n"
" \"ddns-conflict-resolution-mode\": \"no-check-with-dhcid\",\n"
" \"interfaces-config\": {\n"
" \"boot-file-name\": \"\",\n"
" \"calculate-tee-times\": false,\n"
" \"ddns-conflict-resolution-mode\": \"check-with-dhcid\",\n"
-" \"ddns-generated-prefix\": \"test.prefix\",\n"
-" \"ddns-override-client-update\": true,\n"
-" \"ddns-override-no-update\": true,\n"
-" \"ddns-qualifying-suffix\": \"test.suffix.\",\n"
-" \"ddns-replace-client-name\": \"when-present\",\n"
-" \"ddns-send-updates\": true,\n"
-" \"ddns-update-on-renew\": false,\n"
-" \"decline-probation-period\": 86400,\n"
-" \"dhcp-ddns\": {\n"
-" \"enable-updates\": true,\n"
-" \"max-queue-size\": 2048,\n"
-" \"ncr-format\": \"JSON\",\n"
-" \"ncr-protocol\": \"UDP\",\n"
-" \"sender-ip\": \"192.168.2.2\",\n"
-" \"sender-port\": 778,\n"
-" \"server-ip\": \"192.168.2.1\",\n"
-" \"server-port\": 777\n"
-" },\n"
-" \"dhcp-queue-control\": {\n"
-" \"capacity\": 64,\n"
-" \"enable-queue\": false,\n"
-" \"queue-type\": \"kea-ring4\"\n"
-" },\n"
-" \"dhcp4o6-port\": 0,\n"
-" \"early-global-reservations-lookup\": false,\n"
-" \"echo-client-id\": true,\n"
-" \"expired-leases-processing\": {\n"
-" \"flush-reclaimed-timer-wait-time\": 25,\n"
-" \"hold-reclaimed-time\": 3600,\n"
-" \"max-reclaim-leases\": 100,\n"
-" \"max-reclaim-time\": 250,\n"
-" \"reclaim-timer-wait-time\": 10,\n"
-" \"unwarned-reclaim-cycles\": 5\n"
-" },\n"
-" \"hooks-libraries\": [ ],\n"
-" \"host-reservation-identifiers\": [ \"hw-address\", \"duid\", \"circuit-id\", \"client-id\" ],\n"
-" \"hostname-char-replacement\": \"x\",\n"
-" \"hostname-char-set\": \"[^A-Z]\",\n"
-" \"interfaces-config\": {\n"
-" \"interfaces\": [ \"*\" ],\n"
-" \"re-detect\": false\n"
-" },\n"
-" \"ip-reservations-unique\": true,\n"
-" \"lease-database\": {\n"
-" \"type\": \"memfile\"\n"
-" },\n"
-" \"match-client-id\": true,\n"
-" \"multi-threading\": {\n"
-" \"enable-multi-threading\": true,\n"
-" \"packet-queue-size\": 64,\n"
-" \"thread-pool-size\": 0\n"
-" },\n"
-" \"next-server\": \"0.0.0.0\",\n"
-" \"option-data\": [ ],\n"
-" \"option-def\": [ ],\n"
-" \"parked-packet-limit\": 256,\n"
-" \"rebind-timer\": 2000,\n"
-" \"renew-timer\": 1000,\n"
-" \"reservations-global\": false,\n"
-" \"reservations-in-subnet\": true,\n"
-" \"reservations-lookup-first\": false,\n"
-" \"reservations-out-of-pool\": false,\n"
-" \"sanity-checks\": {\n"
-" \"extended-info-checks\": \"fix\",\n"
-" \"lease-checks\": \"warn\"\n"
-" },\n"
-" \"server-hostname\": \"\",\n"
-" \"server-tag\": \"\",\n"
-" \"shared-networks\": [ ],\n"
-" \"stash-agent-options\": false,\n"
-" \"statistic-default-sample-age\": 0,\n"
-" \"statistic-default-sample-count\": 20,\n"
-" \"store-extended-info\": false,\n"
-" \"subnet4\": [\n"
-" {\n"
-" \"4o6-interface\": \"\",\n"
-" \"4o6-interface-id\": \"\",\n"
-" \"4o6-subnet\": \"\",\n"
-" \"allocator\": \"iterative\",\n"
-" \"calculate-tee-times\": false,\n"
-" \"id\": 1,\n"
-" \"max-valid-lifetime\": 4000,\n"
-" \"min-valid-lifetime\": 4000,\n"
-" \"option-data\": [ ],\n"
-" \"pools\": [\n"
-" {\n"
-" \"option-data\": [ ],\n"
-" \"pool\": \"192.0.2.1-192.0.2.100\"\n"
-" }\n"
-" ],\n"
-" \"rebind-timer\": 2000,\n"
-" \"relay\": {\n"
-" \"ip-addresses\": [ ]\n"
-" },\n"
-" \"renew-timer\": 1000,\n"
-" \"reservations\": [ ],\n"
-" \"store-extended-info\": false,\n"
-" \"subnet\": \"192.0.2.0/24\",\n"
-" \"t1-percent\": 0.5,\n"
-" \"t2-percent\": 0.875,\n"
-" \"valid-lifetime\": 4000\n"
-" }\n"
-" ],\n"
-" \"t1-percent\": 0.5,\n"
-" \"t2-percent\": 0.875,\n"
-" \"valid-lifetime\": 4000\n"
-" }\n",
- // CONFIGURATION 43
-"{\n"
-" \"allocator\": \"iterative\",\n"
-" \"authoritative\": false,\n"
-" \"boot-file-name\": \"\",\n"
-" \"calculate-tee-times\": false,\n"
-" \"ddns-conflict-resolution-mode\": \"check-with-dhcid\",\n"
-" \"ddns-generated-prefix\": \"global.prefix\",\n"
-" \"ddns-override-client-update\": true,\n"
-" \"ddns-override-no-update\": true,\n"
-" \"ddns-qualifying-suffix\": \"global.suffix.\",\n"
-" \"ddns-replace-client-name\": \"always\",\n"
-" \"ddns-send-updates\": false,\n"
-" \"ddns-update-on-renew\": false,\n"
-" \"decline-probation-period\": 86400,\n"
-" \"dhcp-ddns\": {\n"
-" \"enable-updates\": true,\n"
-" \"max-queue-size\": 2048,\n"
-" \"ncr-format\": \"JSON\",\n"
-" \"ncr-protocol\": \"UDP\",\n"
-" \"sender-ip\": \"192.168.2.2\",\n"
-" \"sender-port\": 778,\n"
-" \"server-ip\": \"192.168.2.1\",\n"
-" \"server-port\": 777\n"
-" },\n"
-" \"dhcp-queue-control\": {\n"
-" \"capacity\": 64,\n"
-" \"enable-queue\": false,\n"
-" \"queue-type\": \"kea-ring4\"\n"
-" },\n"
-" \"dhcp4o6-port\": 0,\n"
-" \"early-global-reservations-lookup\": false,\n"
-" \"echo-client-id\": true,\n"
-" \"expired-leases-processing\": {\n"
-" \"flush-reclaimed-timer-wait-time\": 25,\n"
-" \"hold-reclaimed-time\": 3600,\n"
-" \"max-reclaim-leases\": 100,\n"
-" \"max-reclaim-time\": 250,\n"
-" \"reclaim-timer-wait-time\": 10,\n"
-" \"unwarned-reclaim-cycles\": 5\n"
-" },\n"
-" \"hooks-libraries\": [ ],\n"
-" \"host-reservation-identifiers\": [ \"hw-address\", \"duid\", \"circuit-id\", \"client-id\" ],\n"
-" \"hostname-char-replacement\": \"x\",\n"
-" \"hostname-char-set\": \"[^A-Z]\",\n"
-" \"interfaces-config\": {\n"
-" \"interfaces\": [ \"*\" ],\n"
-" \"re-detect\": false\n"
-" },\n"
-" \"ip-reservations-unique\": true,\n"
-" \"lease-database\": {\n"
-" \"type\": \"memfile\"\n"
-" },\n"
-" \"match-client-id\": true,\n"
-" \"multi-threading\": {\n"
-" \"enable-multi-threading\": true,\n"
-" \"packet-queue-size\": 64,\n"
-" \"thread-pool-size\": 0\n"
-" },\n"
-" \"next-server\": \"0.0.0.0\",\n"
-" \"option-data\": [ ],\n"
-" \"option-def\": [ ],\n"
-" \"parked-packet-limit\": 256,\n"
-" \"rebind-timer\": 2000,\n"
-" \"renew-timer\": 1000,\n"
-" \"reservations-global\": false,\n"
-" \"reservations-in-subnet\": true,\n"
-" \"reservations-lookup-first\": false,\n"
-" \"reservations-out-of-pool\": false,\n"
-" \"sanity-checks\": {\n"
-" \"extended-info-checks\": \"fix\",\n"
-" \"lease-checks\": \"warn\"\n"
-" },\n"
-" \"server-hostname\": \"\",\n"
-" \"server-tag\": \"\",\n"
-" \"shared-networks\": [ ],\n"
-" \"stash-agent-options\": false,\n"
-" \"statistic-default-sample-age\": 0,\n"
-" \"statistic-default-sample-count\": 20,\n"
-" \"store-extended-info\": false,\n"
-" \"subnet4\": [\n"
-" {\n"
-" \"4o6-interface\": \"\",\n"
-" \"4o6-interface-id\": \"\",\n"
-" \"4o6-subnet\": \"\",\n"
-" \"allocator\": \"iterative\",\n"
-" \"calculate-tee-times\": false,\n"
-" \"id\": 1,\n"
-" \"max-valid-lifetime\": 4000,\n"
-" \"min-valid-lifetime\": 4000,\n"
-" \"option-data\": [ ],\n"
-" \"pools\": [\n"
-" {\n"
-" \"option-data\": [ ],\n"
-" \"pool\": \"192.0.2.1-192.0.2.100\"\n"
-" }\n"
-" ],\n"
-" \"rebind-timer\": 2000,\n"
-" \"relay\": {\n"
-" \"ip-addresses\": [ ]\n"
-" },\n"
-" \"renew-timer\": 1000,\n"
-" \"reservations\": [ ],\n"
-" \"store-extended-info\": false,\n"
-" \"subnet\": \"192.0.2.0/24\",\n"
-" \"t1-percent\": 0.5,\n"
-" \"t2-percent\": 0.875,\n"
-" \"valid-lifetime\": 4000\n"
-" }\n"
-" ],\n"
-" \"t1-percent\": 0.5,\n"
-" \"t2-percent\": 0.875,\n"
-" \"valid-lifetime\": 4000\n"
-" }\n",
- // CONFIGURATION 44
-"{\n"
-" \"allocator\": \"iterative\",\n"
-" \"authoritative\": false,\n"
-" \"boot-file-name\": \"\",\n"
-" \"calculate-tee-times\": false,\n"
-" \"ddns-conflict-resolution-mode\": \"check-with-dhcid\",\n"
" \"ddns-generated-prefix\": \"myhost\",\n"
" \"ddns-override-client-update\": false,\n"
" \"ddns-override-no-update\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 45
+ // CONFIGURATION 43
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 46
+ // CONFIGURATION 44
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 47
+ // CONFIGURATION 45
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 48
+ // CONFIGURATION 46
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 49
+ // CONFIGURATION 47
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 50
+ // CONFIGURATION 48
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 51
+ // CONFIGURATION 49
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 52
+ // CONFIGURATION 50
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 53
+ // CONFIGURATION 51
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 54
+ // CONFIGURATION 52
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 55
+ // CONFIGURATION 53
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 56
+ // CONFIGURATION 54
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 57
+ // CONFIGURATION 55
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 58
+ // CONFIGURATION 56
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 59
+ // CONFIGURATION 57
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 60
+ // CONFIGURATION 58
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 61
+ // CONFIGURATION 59
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 62
+ // CONFIGURATION 60
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 63
+ // CONFIGURATION 61
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 64
+ // CONFIGURATION 62
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 65
+ // CONFIGURATION 63
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 66
+ // CONFIGURATION 64
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 67
+ // CONFIGURATION 65
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 68
+ // CONFIGURATION 66
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 69
+ // CONFIGURATION 67
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" },\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 70
+ // CONFIGURATION 68
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 71
+ // CONFIGURATION 69
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 72
+ // CONFIGURATION 70
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 73
+ // CONFIGURATION 71
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 74
+ // CONFIGURATION 72
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 75
+ // CONFIGURATION 73
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 76
+ // CONFIGURATION 74
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
" \"t2-percent\": 0.875,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 77
+ // CONFIGURATION 75
"{\n"
" \"allocator\": \"iterative\",\n"
" \"authoritative\": false,\n"
-// Copyright (C) 2017-2023 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2017-2024 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
" }"
" ]"
"} ],"
+ "\"ddns-qualifying-suffix\": \"\","
"\"dhcp-ddns\": {"
- " \"enable-updates\": true,"
- " \"qualifying-suffix\": \"\""
+ " \"enable-updates\": true"
"}"
"}",
" }"
" ]"
"} ],"
+ "\"ddns-qualifying-suffix\": \"\","
"\"dhcp-ddns\": {"
- " \"enable-updates\": true,"
- " \"qualifying-suffix\": \"\""
+ " \"enable-updates\": true"
"}"
"}",
" \"id\": 1, "
" \"pools\": [ { \"pool\": \"10.0.0.101-10.0.0.200\" } ],"
"} ],"
+ "\"ddns-qualifying-suffix\": \"\","
"\"dhcp-ddns\": {"
- " \"enable-updates\": true,"
- " \"qualifying-suffix\": \"\""
+ " \"enable-updates\": true"
"}"
"}",
" }"
" ]"
"} ],"
+ "\"ddns-qualifying-suffix\": \"\","
"\"dhcp-ddns\": {"
- " \"enable-updates\": true,"
- " \"qualifying-suffix\": \"\""
+ " \"enable-updates\": true"
"}"
"}",
" \"id\": 1, "
" \"pools\": [ { \"pool\": \"192.0.2.101-192.0.2.200\" } ]"
"} ],"
+ "\"ddns-qualifying-suffix\": \"\","
"\"dhcp-ddns\": {"
- " \"enable-updates\": true,"
- " \"qualifying-suffix\": \"\""
+ " \"enable-updates\": true"
"}"
"}",
" \"id\": 1, "
" \"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ]"
"} ],"
+ "\"ddns-qualifying-suffix\": \"\","
"\"dhcp-ddns\": {"
- " \"enable-updates\": true,"
- " \"qualifying-suffix\": \"\""
+ " \"enable-updates\": true"
"}"
"}",
}
}
-\"qualifying-suffix\" {
- switch(driver.ctx_) {
- case isc::dhcp::Parser6Context::DHCP_DDNS:
- return isc::dhcp::Dhcp6Parser::make_QUALIFYING_SUFFIX(driver.loc_);
- default:
- return isc::dhcp::Dhcp6Parser::make_STRING("qualifying-suffix", driver.loc_);
- }
-}
-
\"server-ip\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP_DDNS:
}
}
-\"override-no-update\" {
- switch(driver.ctx_) {
- case isc::dhcp::Parser6Context::DHCP_DDNS:
- return isc::dhcp::Dhcp6Parser::make_OVERRIDE_NO_UPDATE(driver.loc_);
- default:
- return isc::dhcp::Dhcp6Parser::make_STRING("override-no-update", driver.loc_);
- }
-}
-
-\"override-client-update\" {
- switch(driver.ctx_) {
- case isc::dhcp::Parser6Context::DHCP_DDNS:
- return isc::dhcp::Dhcp6Parser::make_OVERRIDE_CLIENT_UPDATE(driver.loc_);
- default:
- return isc::dhcp::Dhcp6Parser::make_STRING("override-client-update", driver.loc_);
- }
-}
-
-\"replace-client-name\" {
- switch(driver.ctx_) {
- case isc::dhcp::Parser6Context::DHCP_DDNS:
- return isc::dhcp::Dhcp6Parser::make_REPLACE_CLIENT_NAME(driver.loc_);
- default:
- return isc::dhcp::Dhcp6Parser::make_STRING("replace-client-name", driver.loc_);
- }
-}
-
-\"generated-prefix\" {
- switch(driver.ctx_) {
- case isc::dhcp::Parser6Context::DHCP_DDNS:
- return isc::dhcp::Dhcp6Parser::make_GENERATED_PREFIX(driver.loc_);
- default:
- return isc::dhcp::Dhcp6Parser::make_STRING("generated-prefix", driver.loc_);
- }
-}
-
\"hostname-char-set\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
- case isc::dhcp::Parser6Context::DHCP_DDNS:
case isc::dhcp::Parser6Context::SUBNET6:
case isc::dhcp::Parser6Context::SHARED_NETWORK:
return isc::dhcp::Dhcp6Parser::make_HOSTNAME_CHAR_SET(driver.loc_);
\"hostname-char-replacement\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
- case isc::dhcp::Parser6Context::DHCP_DDNS:
case isc::dhcp::Parser6Context::SUBNET6:
case isc::dhcp::Parser6Context::SHARED_NETWORK:
return isc::dhcp::Dhcp6Parser::make_HOSTNAME_CHAR_REPLACEMENT(driver.loc_);
DHCP_DDNS "dhcp-ddns"
ENABLE_UPDATES "enable-updates"
- QUALIFYING_SUFFIX "qualifying-suffix"
SERVER_IP "server-ip"
SERVER_PORT "server-port"
SENDER_IP "sender-ip"
MAX_QUEUE_SIZE "max-queue-size"
NCR_PROTOCOL "ncr-protocol"
NCR_FORMAT "ncr-format"
- OVERRIDE_NO_UPDATE "override-no-update"
- OVERRIDE_CLIENT_UPDATE "override-client-update"
- REPLACE_CLIENT_NAME "replace-client-name"
- GENERATED_PREFIX "generated-prefix"
UDP "UDP"
TCP "TCP"
JSON "JSON"
};
ddns_replace_client_name: DDNS_REPLACE_CLIENT_NAME {
- ctx.unique("ddns-replace-client-name", ctx.loc2pos(@1));
ctx.enter(ctx.REPLACE_CLIENT_NAME);
+ ctx.unique("ddns-replace-client-name", ctx.loc2pos(@1));
} COLON ddns_replace_client_name_value {
ctx.stack_.back()->set("ddns-replace-client-name", $4);
ctx.leave();
$$ = ElementPtr(new StringElement("when-not-present", ctx.loc2pos(@1)));
}
| BOOLEAN {
- error(@1, "boolean values for the replace-client-name are "
+ error(@1, "boolean values for the ddns-replace-client-name are "
"no longer supported");
}
;
| max_queue_size
| ncr_protocol
| ncr_format
- | dep_override_no_update
- | dep_override_client_update
- | dep_replace_client_name
- | dep_generated_prefix
- | dep_qualifying_suffix
- | dep_hostname_char_set
- | dep_hostname_char_replacement
| user_context
| comment
| unknown_map_entry
ctx.stack_.back()->set("enable-updates", b);
};
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_qualifying_suffix: QUALIFYING_SUFFIX {
- ctx.unique("qualifying-suffix", ctx.loc2pos(@1));
- ctx.enter(ctx.NO_KEYWORD);
-} COLON STRING {
- ElementPtr s(new StringElement($4, ctx.loc2pos(@4)));
- ctx.stack_.back()->set("qualifying-suffix", s);
- ctx.leave();
-};
-
server_ip: SERVER_IP {
ctx.unique("server-ip", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
ctx.leave();
};
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_override_no_update: OVERRIDE_NO_UPDATE COLON BOOLEAN {
- ctx.unique("override-no-update", ctx.loc2pos(@1));
- ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
- ctx.stack_.back()->set("override-no-update", b);
-};
-
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_override_client_update: OVERRIDE_CLIENT_UPDATE COLON BOOLEAN {
- ctx.unique("override-client-update", ctx.loc2pos(@1));
- ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
- ctx.stack_.back()->set("override-client-update", b);
-};
-
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_replace_client_name: REPLACE_CLIENT_NAME {
- ctx.unique("replace-client-name", ctx.loc2pos(@1));
- ctx.enter(ctx.REPLACE_CLIENT_NAME);
-} COLON ddns_replace_client_name_value {
- ctx.stack_.back()->set("replace-client-name", $4);
- ctx.leave();
-};
-
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_generated_prefix: GENERATED_PREFIX {
- ctx.unique("generated-prefix", ctx.loc2pos(@1));
- ctx.enter(ctx.NO_KEYWORD);
-} COLON STRING {
- ElementPtr s(new StringElement($4, ctx.loc2pos(@4)));
- ctx.stack_.back()->set("generated-prefix", s);
- ctx.leave();
-};
-
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_hostname_char_set: HOSTNAME_CHAR_SET {
- ctx.unique("hostname-char-set", ctx.loc2pos(@1));
- ctx.enter(ctx.NO_KEYWORD);
-} COLON STRING {
- ElementPtr s(new StringElement($4, ctx.loc2pos(@4)));
- ctx.stack_.back()->set("hostname-char-set", s);
- ctx.leave();
-};
-
-// Deprecated, moved to global/network scopes. Eventually it should be removed.
-dep_hostname_char_replacement: HOSTNAME_CHAR_REPLACEMENT {
- ctx.unique("hostname-char-replacement", ctx.loc2pos(@1));
- ctx.enter(ctx.NO_KEYWORD);
-} COLON STRING {
- ElementPtr s(new StringElement($4, ctx.loc2pos(@4)));
- ctx.stack_.back()->set("hostname-char-replacement", s);
- ctx.leave();
-};
-
-
// Config control information element
config_control: CONFIG_CONTROL {
/// - If there is a Client FQDN but no reserved hostname then both the
/// FQDN and lease hostname will be equal to the name provided in the
/// client FQDN adjusted according the DhcpDdns configuration
- /// parameters (e.g.replace-client-name, qualifying suffix...).
+ /// parameters (e.g. ddns-replace-client-name, ddns-qualifying-suffix...).
///
/// All the logic required to form appropriate answer to the client is
/// held in this function.
// default values and will insert derived values as well.
mutable_cfg = boost::const_pointer_cast<Element>(config_set);
- // Relocate dhcp-ddns parameters that have moved to global scope.
- // Rule is that a global value overrides the dhcp-ddns value, so
- // we need to do this before we apply global defaults.
- // Note this is done for backward compatibility.
- srv_config->moveDdnsParams(mutable_cfg);
-
// Move from reservation mode to new reservations flags.
// @todo add warning
BaseNetworkParser::moveReservationMode(mutable_cfg);
checkGlobal("ddns-qualifying-suffix", "");
}
-// This test verifies that valid but deprecated dhcp-ddns parameters
-// get moved to the global scope when they do not already exist there.
-TEST_F(Dhcp6ParserTest, d2ClientConfigMoveToGlobal) {
- // Verify that the D2 configuration can be fetched and is set to disabled.
- D2ClientConfigPtr d2_client_config = CfgMgr::instance().getD2ClientConfig();
- EXPECT_FALSE(d2_client_config->getEnableUpdates());
-
- // Verify that the convenience method agrees.
- ASSERT_FALSE(CfgMgr::instance().ddnsEnabled());
-
- string config_str = "{ " + genIfaceConfig() + ","
- "\"preferred-lifetime\": 3000,"
- "\"rebind-timer\": 2000, "
- "\"renew-timer\": 1000, "
- "\"subnet6\": [ { "
- " \"id\": 1,"
- " \"pools\": [ { \"pool\": \"2001:db8:1::/80\" } ],"
- " \"subnet\": \"2001:db8:1::/64\" } ], "
- " \"dhcp-ddns\" : {"
- " \"enable-updates\" : true, "
- " \"server-ip\" : \"3001::1\", "
- " \"server-port\" : 777, "
- " \"sender-ip\" : \"3001::2\", "
- " \"sender-port\" : 778, "
- " \"max-queue-size\" : 2048, "
- " \"ncr-protocol\" : \"UDP\", "
- " \"ncr-format\" : \"JSON\", "
- " \"override-no-update\" : true, "
- " \"override-client-update\" : true, "
- " \"replace-client-name\" : \"when-present\", "
- " \"generated-prefix\" : \"test.prefix\", "
- " \"qualifying-suffix\" : \"test.suffix.\", "
- " \"hostname-char-set\" : \"[^A-Z]\", "
- " \"hostname-char-replacement\" : \"x\"}, "
- "\"valid-lifetime\": 4000 }";
-
- // Convert the JSON string to configuration elements.
- ConstElementPtr config;
- ASSERT_NO_THROW(config = parseDHCP6(config_str));
- extractConfig(config_str);
-
- // Pass the configuration in for parsing.
- ConstElementPtr status;
- EXPECT_NO_THROW(status = Dhcpv6SrvTest::configure(srv_, config));
-
- // check if returned status is OK
- checkResult(status, 0);
-
- // Verify that DHCP-DDNS updating is enabled.
- EXPECT_TRUE(CfgMgr::instance().ddnsEnabled());
-
- // Verify that the D2 configuration can be retrieved.
- d2_client_config = CfgMgr::instance().getD2ClientConfig();
- ASSERT_TRUE(d2_client_config);
-
- // Verify that the configuration values are correct.
- EXPECT_TRUE(d2_client_config->getEnableUpdates());
- EXPECT_EQ("3001::1", d2_client_config->getServerIp().toText());
- EXPECT_EQ(777, d2_client_config->getServerPort());
- EXPECT_EQ("3001::2", d2_client_config->getSenderIp().toText());
- EXPECT_EQ(778, d2_client_config->getSenderPort());
- EXPECT_EQ(2048, d2_client_config->getMaxQueueSize());
- EXPECT_EQ(dhcp_ddns::NCR_UDP, d2_client_config->getNcrProtocol());
- EXPECT_EQ(dhcp_ddns::FMT_JSON, d2_client_config->getNcrFormat());
-
- // ddns-send-updates should be global default
- checkGlobal("ddns-send-updates", true);
-
- // The following should all have been moved from dhcp-ddns.
- checkGlobal("ddns-override-no-update", true);
- checkGlobal("ddns-override-client-update", true);
- checkGlobal("ddns-replace-client-name", "when-present");
- checkGlobal("ddns-generated-prefix", "test.prefix");
- checkGlobal("ddns-qualifying-suffix", "test.suffix.");
- checkGlobal("hostname-char-set", "[^A-Z]");
- checkGlobal("hostname-char-replacement", "x");
-}
-
-// This test verifies that explicit global values override deprecated
-// dhcp-ddns parameters (i.e. global scope wins)
-TEST_F(Dhcp6ParserTest, d2ClientConfigBoth) {
- // Verify that the D2 configuration can be fetched and is set to disabled.
- D2ClientConfigPtr d2_client_config = CfgMgr::instance().getD2ClientConfig();
- EXPECT_FALSE(d2_client_config->getEnableUpdates());
-
- // Verify that the convenience method agrees.
- ASSERT_FALSE(CfgMgr::instance().ddnsEnabled());
-
- string config_str = "{ " + genIfaceConfig() + ","
- "\"preferred-lifetime\": 3000,"
- "\"rebind-timer\": 2000, "
- "\"renew-timer\": 1000, "
- "\"subnet6\": [ { "
- " \"id\": 1,"
- " \"pools\": [ { \"pool\": \"2001:db8:1::/80\" } ],"
- " \"subnet\": \"2001:db8:1::/64\" } ], "
- " \"dhcp-ddns\" : {"
- " \"enable-updates\" : true, "
- " \"server-ip\" : \"3001::1\", "
- " \"server-port\" : 777, "
- " \"sender-ip\" : \"3001::2\", "
- " \"sender-port\" : 778, "
- " \"max-queue-size\" : 2048, "
- " \"ncr-protocol\" : \"UDP\", "
- " \"ncr-format\" : \"JSON\", "
- " \"override-no-update\" : false, "
- " \"override-client-update\" : false, "
- " \"replace-client-name\" : \"when-present\", "
- " \"generated-prefix\" : \"d2.prefix\", "
- " \"qualifying-suffix\" : \"d2.suffix.\", "
- " \"hostname-char-set\" : \"[^0-9]\", "
- " \"hostname-char-replacement\" : \"z\" }, "
- " \"ddns-send-updates\" : false, "
- " \"ddns-override-no-update\" : true, "
- " \"ddns-override-client-update\" : true, "
- " \"ddns-replace-client-name\" : \"always\", "
- " \"ddns-generated-prefix\" : \"global.prefix\", "
- " \"ddns-qualifying-suffix\" : \"global.suffix.\", "
- " \"hostname-char-set\" : \"[^A-Z]\", "
- " \"hostname-char-replacement\" : \"x\", "
- "\"valid-lifetime\": 4000 }";
-
- // Convert the JSON string to configuration elements.
- ConstElementPtr config;
- ASSERT_NO_THROW(config = parseDHCP6(config_str));
- extractConfig(config_str);
-
- // Pass the configuration in for parsing.
- ConstElementPtr status;
- EXPECT_NO_THROW(status = Dhcpv6SrvTest::configure(srv_, config));
-
- // check if returned status is OK
- checkResult(status, 0);
-
- // Verify that DHCP-DDNS updating is enabled.
- EXPECT_TRUE(CfgMgr::instance().ddnsEnabled());
-
- // Verify that the D2 configuration can be retrieved.
- d2_client_config = CfgMgr::instance().getD2ClientConfig();
- ASSERT_TRUE(d2_client_config);
-
- // Verify that the configuration values are correct.
- EXPECT_TRUE(d2_client_config->getEnableUpdates());
- EXPECT_EQ("3001::1", d2_client_config->getServerIp().toText());
- EXPECT_EQ(777, d2_client_config->getServerPort());
- EXPECT_EQ("3001::2", d2_client_config->getSenderIp().toText());
- EXPECT_EQ(778, d2_client_config->getSenderPort());
- EXPECT_EQ(2048, d2_client_config->getMaxQueueSize());
- EXPECT_EQ(dhcp_ddns::NCR_UDP, d2_client_config->getNcrProtocol());
- EXPECT_EQ(dhcp_ddns::FMT_JSON, d2_client_config->getNcrFormat());
-
- // Verify all global values won.
- checkGlobal("ddns-send-updates", false);
- checkGlobal("ddns-override-no-update", true);
- checkGlobal("ddns-override-client-update", true);
- checkGlobal("ddns-replace-client-name", "always");
- checkGlobal("ddns-generated-prefix", "global.prefix");
- checkGlobal("ddns-qualifying-suffix", "global.suffix.");
- checkGlobal("hostname-char-set", "[^A-Z]");
- checkGlobal("hostname-char-replacement", "x");
-}
-
// This test checks the ability of the server to handle a configuration
// containing an invalid dhcp-ddns (D2ClientConfig) entry.
TEST_F(Dhcp6ParserTest, invalidD2ClientConfig) {
string config_str = "{ " + genIfaceConfig() + ","
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
+ "\"ddns-override-no-update\" : true, "
+ "\"ddns-override-client-update\" : true, "
+ "\"ddns-replace-client-name\" : \"when-present\", "
+ "\"ddns-generated-prefix\" : \"test.prefix\", "
+ "\"ddns-qualifying-suffix\" : \"test.suffix.\", "
"\"subnet6\": [ { "
" \"id\": 1,"
" \"pools\": [ { \"pool\": \"2001:db8:1::/80\" } ],"
" \"server-ip\" : \"bogus-value\", "
" \"server-port\" : 5301, "
" \"ncr-protocol\" : \"UDP\", "
- " \"ncr-format\" : \"JSON\", "
- " \"override-no-update\" : true, "
- " \"override-client-update\" : true, "
- " \"replace-client-name\" : \"when-present\", "
- " \"generated-prefix\" : \"test.prefix\", "
- " \"qualifying-suffix\" : \"test.suffix.\" },"
+ " \"ncr-format\" : \"JSON\"},"
"\"valid-lifetime\": 4000 }";
// Convert the JSON string to configuration elements.
"\"preferred-lifetime\": 3000,"
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
+ "\"ddns-override-no-update\" : true, "
+ "\"ddns-override-client-update\" : true, "
+ "\"ddns-replace-client-name\" : \"when-present\", "
+ "\"ddns-generated-prefix\" : \"test.prefix\", "
+ "\"ddns-qualifying-suffix\" : \"test.suffix.\", "
"\"subnet6\": [ { "
" \"id\": 1, "
" \"pools\": [ { \"pool\": \"2001:db8:1::1 - 2001:db8:1::ffff\" } ],"
" \"sender-port\" : " << sender_port << ", "
" \"max-queue-size\" : " << max_queue_size << ", "
" \"ncr-protocol\" : \"UDP\", "
- " \"ncr-format\" : \"JSON\", "
- " \"override-no-update\" : true, "
- " \"override-client-update\" : true, "
- " \"replace-client-name\" : \"when-present\", "
- " \"generated-prefix\" : \"test.prefix\", "
- " \"qualifying-suffix\" : \"test.suffix.\" },"
+ " \"ncr-format\" : \"JSON\"},"
"\"valid-lifetime\": 4000 }";
configure(config.str(), exp_result);
\"id\": 1,
\"pools\": [ { \"pool\": \"2001:db8:1::10-2001:db8:1::100\" } ]
} ],
+ \"ddns-qualifying-suffix\": \"\",
\"dhcp-ddns\": {
- \"enable-updates\": true,
- \"qualifying-suffix\": \"\"
+ \"enable-updates\": true
},
\"loggers\": [
{
\"id\": 1,
\"pools\": [ { \"pool\": \"3000::-3000::ffff\" } ]
} ],
+ \"ddns-qualifying-suffix\": \"\",
\"dhcp-ddns\": {
- \"enable-updates\": true,
- \"qualifying-suffix\": \"\"
+ \"enable-updates\": true
}
}
}"
\"id\": 1,
\"pools\": [ { \"pool\": \"2001:db8:1::10-2001:db8:1::100\" } ]
} ],
+ \"ddns-qualifying-suffix\": \"\",
\"dhcp-ddns\": {
- \"enable-updates\": true,
- \"qualifying-suffix\": \"\"
+ \"enable-updates\": true
},
\"hooks-libraries\": [
{
\"id\": 1,
\"pools\": [ { \"pool\": \"2001:db8:1::10-2001:db8:1::100\" } ]
} ],
+ \"ddns-qualifying-suffix\": \"\",
\"dhcp-ddns\": {
- \"enable-updates\": true,
- \"qualifying-suffix\": \"\"
+ \"enable-updates\": true
},
\"hooks-libraries\": [
{
\"id\": 1,
\"pools\": [ { \"pool\": \"2001:db8:1::10-2001:db8:1::100\" } ]
} ],
+ \"ddns-qualifying-suffix\": \"\",
\"dhcp-ddns\": {
- \"enable-updates\": true,
- \"qualifying-suffix\": \"\"
+ \"enable-updates\": true
},
\"hooks-libraries\": [
{
}
// Test that the server processes the FQDN option (or lack thereof)
- // in a client request correctly, according to the replace-client-name
+ // in a client request correctly, according to the ddns-replace-client-name
// mode configuration parameter.
//
- // @param mode - value to use for replace-client-name mode
+ // @param mode - value to use for ddns-replace-client-name mode
//
// @param client_name_flag - specifies whether or not the client request
// should contain a hostname option
"\"preferred-lifetime\": 3000, \n"
"\"rebind-timer\": 2000, \n"
"\"renew-timer\": 1000, \n"
+ "\"ddns-replace-client-name\": \"%s\", \n"
+ "\"ddns-qualifying-suffix\": \"fake-suffix.isc.org.\", \n"
"\"subnet6\": [ { \n"
" \"id\": 1, \n"
" \"pools\": [ { \"pool\": \"2001:db8:1::/64\" } ], \n"
" \"interface\": \"eth0\" \n"
" } ], \n"
"\"dhcp-ddns\": { \n"
- "\"enable-updates\": true, \n"
- "\"qualifying-suffix\": \"fake-suffix.isc.org.\", \n"
- "\"replace-client-name\": \"%s\" \n"
+ "\"enable-updates\": true \n"
"}} \n";
// Create the configuration and configure the server
}
// Test server's response when client requests no DNS update and
-// override-no-updates is true.
+// ddns-override-no-updates is true.
TEST_F(FqdnDhcpv6SrvTest, overrideNoUpdate) {
enableD2(OVERRIDE_NO_UPDATE);
testFqdn(DHCPV6_SOLICIT, Option6ClientFqdn::FLAG_N,
" \"id\": 1, \n"
" \"subnet\": \"2001:db8:1::/48\", "
" \"pools\": [ { \"pool\": \"2001:db8:1:1::/64\" } ],"
- " \"interface\" : \"eth0\" , "
+ " \"interface\": \"eth0\" , "
" \"reservations\": ["
" {"
" \"duid\": \"" + duid_->toText() + "\","
" }"
" ]"
" } ],"
- " \"dhcp-ddns\" : {"
- " \"enable-updates\" : true, "
- " \"qualifying-suffix\" : \"example.com\" }"
+ " \"ddns-qualifying-suffix\": \"example.com\", "
+ " \"dhcp-ddns\": {"
+ " \"enable-updates\": true }"
"}";
configure(config_str);
" \"id\": 1, \n"
" \"subnet\": \"2001:db8:1::/48\", "
" \"pools\": [ { \"pool\": \"2001:db8:1:1::/64\" } ],"
- " \"interface\" : \"eth0\" , "
+ " \"interface\": \"eth0\" , "
" \"reservations\": ["
" {"
" \"duid\": \"" + duid_->toText() + "\","
" }"
" ]"
" } ],"
- " \"dhcp-ddns\" : {"
- " \"enable-updates\" : true, "
- " \"qualifying-suffix\" : \"\" }"
+ " \"ddns-qualifying-suffix\": \"\", "
+ " \"dhcp-ddns\": {"
+ " \"enable-updates\": true }"
"}";
configure(config_str);
" \"id\": 1, \n"
" \"subnet\": \"2001:db8:1::/48\", "
" \"pools\": [ { \"pool\": \"2001:db8:1:1::/64\" } ],"
- " \"interface\" : \"eth0\" , "
+ " \"interface\": \"eth0\" , "
" \"reservations\": ["
" {"
" \"duid\": \"" + duid_->toText() + "\","
" }"
" ]"
" } ],"
- " \"dhcp-ddns\" : {"
- " \"enable-updates\" : false, "
- " \"qualifying-suffix\" : \"disabled.example.com\" }"
+ " \"ddns-qualifying-suffix\": \"disabled.example.com\", "
+ " \"dhcp-ddns\": {"
+ " \"enable-updates\": false }"
"}";
configure(config_str);
IOAddress("2001:db8:1:1::babe"));
}
-// Verifies that the replace-client-name behavior is correct for each of
+// Verifies that the ddns-replace-client-name behavior is correct for each of
// the supported modes.
TEST_F(FqdnDhcpv6SrvTest, replaceClientNameModeTest) {
isc::dhcp::test::IfaceMgrTestConfig test_config(true);
" \"ddns-send-updates\": true\n"
" } ],\n"
"\"valid-lifetime\": 4000,\n"
- " \"dhcp-ddns\" : {\n"
- " \"enable-updates\" : true\n"
+ " \"dhcp-ddns\": {\n"
+ " \"enable-updates\": true\n"
" }\n"
"}";
" } ] \n"
"} ], \n"
"\"ddns-send-updates\": true, \n"
- "\"dhcp-ddns\" : { \n"
- " \"enable-updates\" : true \n"
+ "\"dhcp-ddns\": { \n"
+ " \"enable-updates\": true \n"
" } \n"
"}";
"\"ddns-send-updates\": false \n"
" } ] \n"
"} ], \n"
- "\"dhcp-ddns\" : { \n"
- " \"enable-updates\" : true \n"
+ "\"dhcp-ddns\": { \n"
+ " \"enable-updates\": true \n"
" } \n"
"}";
-// Copyright (C) 2017-2023 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2017-2024 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
" }\n",
// CONFIGURATION 36
"{\n"
-" \"dhcp-ddns\": {\n"
-" \"enable-updates\": true,\n"
-" \"generated-prefix\": \"test.prefix\",\n"
-" \"hostname-char-replacement\": \"x\",\n"
-" \"hostname-char-set\": \"[^A-Z]\",\n"
-" \"max-queue-size\": 2048,\n"
-" \"ncr-format\": \"JSON\",\n"
-" \"ncr-protocol\": \"UDP\",\n"
-" \"override-client-update\": true,\n"
-" \"override-no-update\": true,\n"
-" \"qualifying-suffix\": \"test.suffix.\",\n"
-" \"replace-client-name\": \"when-present\",\n"
-" \"sender-ip\": \"3001::2\",\n"
-" \"sender-port\": 778,\n"
-" \"server-ip\": \"3001::1\",\n"
-" \"server-port\": 777\n"
-" },\n"
-" \"interfaces-config\": {\n"
-" \"interfaces\": [ \"*\" ],\n"
-" \"re-detect\": false\n"
-" },\n"
-" \"preferred-lifetime\": 3000,\n"
-" \"rebind-timer\": 2000,\n"
-" \"renew-timer\": 1000,\n"
-" \"subnet6\": [\n"
-" {\n"
-" \"id\": 1,\n"
-" \"pools\": [\n"
-" {\n"
-" \"pool\": \"2001:db8:1::/80\"\n"
-" }\n"
-" ],\n"
-" \"subnet\": \"2001:db8:1::/64\"\n"
-" }\n"
-" ],\n"
-" \"valid-lifetime\": 4000\n"
-" }\n",
- // CONFIGURATION 37
-"{\n"
-" \"ddns-generated-prefix\": \"global.prefix\",\n"
-" \"ddns-override-client-update\": true,\n"
-" \"ddns-override-no-update\": true,\n"
-" \"ddns-qualifying-suffix\": \"global.suffix.\",\n"
-" \"ddns-replace-client-name\": \"always\",\n"
-" \"ddns-send-updates\": false,\n"
-" \"dhcp-ddns\": {\n"
-" \"enable-updates\": true,\n"
-" \"generated-prefix\": \"d2.prefix\",\n"
-" \"hostname-char-replacement\": \"z\",\n"
-" \"hostname-char-set\": \"[^0-9]\",\n"
-" \"max-queue-size\": 2048,\n"
-" \"ncr-format\": \"JSON\",\n"
-" \"ncr-protocol\": \"UDP\",\n"
-" \"override-client-update\": false,\n"
-" \"override-no-update\": false,\n"
-" \"qualifying-suffix\": \"d2.suffix.\",\n"
-" \"replace-client-name\": \"when-present\",\n"
-" \"sender-ip\": \"3001::2\",\n"
-" \"sender-port\": 778,\n"
-" \"server-ip\": \"3001::1\",\n"
-" \"server-port\": 777\n"
-" },\n"
-" \"hostname-char-replacement\": \"x\",\n"
-" \"hostname-char-set\": \"[^A-Z]\",\n"
-" \"interfaces-config\": {\n"
-" \"interfaces\": [ \"*\" ],\n"
-" \"re-detect\": false\n"
-" },\n"
-" \"preferred-lifetime\": 3000,\n"
-" \"rebind-timer\": 2000,\n"
-" \"renew-timer\": 1000,\n"
-" \"subnet6\": [\n"
-" {\n"
-" \"id\": 1,\n"
-" \"pools\": [\n"
-" {\n"
-" \"pool\": \"2001:db8:1::/80\"\n"
-" }\n"
-" ],\n"
-" \"subnet\": \"2001:db8:1::/64\"\n"
-" }\n"
-" ],\n"
-" \"valid-lifetime\": 4000\n"
-" }\n",
- // CONFIGURATION 38
-"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" \"re-detect\": false\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 39
+ // CONFIGURATION 37
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 40
+ // CONFIGURATION 38
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" \"subnet6\": [ ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 41
+ // CONFIGURATION 39
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" \"subnet6\": [ ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 42
+ // CONFIGURATION 40
"{\n"
" \"preferred-lifetime\": 3000,\n"
" \"rebind-timer\": 2000,\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 43
+ // CONFIGURATION 41
"{\n"
" \"preferred-lifetime\": 3000,\n"
" \"rebind-timer\": 2000,\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 44
+ // CONFIGURATION 42
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" \"subnet6\": [ ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 45
+ // CONFIGURATION 43
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" },\n"
" \"subnet6\": [ ]\n"
" }\n",
- // CONFIGURATION 46
+ // CONFIGURATION 44
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" },\n"
" \"subnet6\": [ ]\n"
" }\n",
- // CONFIGURATION 47
+ // CONFIGURATION 45
"{\n"
" \"decline-probation-period\": 12345,\n"
" \"interfaces-config\": {\n"
" },\n"
" \"subnet6\": [ ]\n"
" }\n",
- // CONFIGURATION 48
+ // CONFIGURATION 46
"{\n"
" \"expired-leases-processing\": {\n"
" \"flush-reclaimed-timer-wait-time\": 35,\n"
" },\n"
" \"subnet6\": [ ]\n"
" }\n",
- // CONFIGURATION 49
+ // CONFIGURATION 47
"{\n"
" \"client-classes\": [\n"
" {\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 50
+ // CONFIGURATION 48
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 51
+ // CONFIGURATION 49
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 52
+ // CONFIGURATION 50
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 53
+ // CONFIGURATION 51
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 54
+ // CONFIGURATION 52
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 55
+ // CONFIGURATION 53
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 56
+ // CONFIGURATION 54
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 57
+ // CONFIGURATION 55
"{\n"
" \"hosts-databases\": [\n"
" {\n"
" \"renew-timer\": 1000,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 58
+ // CONFIGURATION 56
"{\n"
" \"client-classes\": [\n"
" {\n"
" \"comment\": \"A DHCPv6 server\"\n"
" }\n"
" }\n",
- // CONFIGURATION 59
+ // CONFIGURATION 57
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" ],\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 60
+ // CONFIGURATION 58
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" \"statistic-default-sample-count\": 10,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 61
+ // CONFIGURATION 59
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" },\n"
" \"subnet6\": [ ]\n"
" }\n",
- // CONFIGURATION 62
+ // CONFIGURATION 60
"{\n"
" \"interfaces-config\": {\n"
" \"interfaces\": [ \"*\" ],\n"
" },\n"
" \"subnet6\": [ ]\n"
" }\n",
- // CONFIGURATION 63
+ // CONFIGURATION 61
"{\n"
" \"client-classes\": [\n"
" {\n"
" }\n"
" ]\n"
" }\n",
- // CONFIGURATION 64
+ // CONFIGURATION 62
"{\n"
" \"client-classes\": [\n"
" {\n"
" }\n"
" ]\n"
" }\n",
- // CONFIGURATION 65
+ // CONFIGURATION 63
"{\n"
" \"ddns-conflict-resolution-mode\": \"no-check-with-dhcid\",\n"
" \"interfaces-config\": {\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"ddns-conflict-resolution-mode\": \"check-with-dhcid\",\n"
-" \"ddns-generated-prefix\": \"test.prefix\",\n"
-" \"ddns-override-client-update\": true,\n"
-" \"ddns-override-no-update\": true,\n"
-" \"ddns-qualifying-suffix\": \"test.suffix.\",\n"
-" \"ddns-replace-client-name\": \"when-present\",\n"
-" \"ddns-send-updates\": true,\n"
-" \"ddns-update-on-renew\": false,\n"
-" \"decline-probation-period\": 86400,\n"
-" \"dhcp-ddns\": {\n"
-" \"enable-updates\": true,\n"
-" \"max-queue-size\": 2048,\n"
-" \"ncr-format\": \"JSON\",\n"
-" \"ncr-protocol\": \"UDP\",\n"
-" \"sender-ip\": \"3001::2\",\n"
-" \"sender-port\": 778,\n"
-" \"server-ip\": \"3001::1\",\n"
-" \"server-port\": 777\n"
-" },\n"
-" \"dhcp-queue-control\": {\n"
-" \"capacity\": 64,\n"
-" \"enable-queue\": false,\n"
-" \"queue-type\": \"kea-ring6\"\n"
-" },\n"
-" \"dhcp4o6-port\": 0,\n"
-" \"early-global-reservations-lookup\": false,\n"
-" \"expired-leases-processing\": {\n"
-" \"flush-reclaimed-timer-wait-time\": 25,\n"
-" \"hold-reclaimed-time\": 3600,\n"
-" \"max-reclaim-leases\": 100,\n"
-" \"max-reclaim-time\": 250,\n"
-" \"reclaim-timer-wait-time\": 10,\n"
-" \"unwarned-reclaim-cycles\": 5\n"
-" },\n"
-" \"hooks-libraries\": [ ],\n"
-" \"host-reservation-identifiers\": [ \"hw-address\", \"duid\" ],\n"
-" \"hostname-char-replacement\": \"x\",\n"
-" \"hostname-char-set\": \"[^A-Z]\",\n"
-" \"interfaces-config\": {\n"
-" \"interfaces\": [ \"*\" ],\n"
-" \"re-detect\": false\n"
-" },\n"
-" \"ip-reservations-unique\": true,\n"
-" \"lease-database\": {\n"
-" \"type\": \"memfile\"\n"
-" },\n"
-" \"mac-sources\": [ \"any\" ],\n"
-" \"multi-threading\": {\n"
-" \"enable-multi-threading\": true,\n"
-" \"packet-queue-size\": 64,\n"
-" \"thread-pool-size\": 0\n"
-" },\n"
-" \"option-data\": [ ],\n"
-" \"option-def\": [ ],\n"
-" \"parked-packet-limit\": 256,\n"
-" \"pd-allocator\": \"iterative\",\n"
-" \"preferred-lifetime\": 3000,\n"
-" \"rebind-timer\": 2000,\n"
-" \"relay-supplied-options\": [ \"65\" ],\n"
-" \"renew-timer\": 1000,\n"
-" \"reservations-global\": false,\n"
-" \"reservations-in-subnet\": true,\n"
-" \"reservations-lookup-first\": false,\n"
-" \"reservations-out-of-pool\": false,\n"
-" \"sanity-checks\": {\n"
-" \"extended-info-checks\": \"fix\",\n"
-" \"lease-checks\": \"warn\"\n"
-" },\n"
-" \"server-id\": {\n"
-" \"enterprise-id\": 0,\n"
-" \"htype\": 0,\n"
-" \"identifier\": \"\",\n"
-" \"persist\": true,\n"
-" \"time\": 0,\n"
-" \"type\": \"LLT\"\n"
-" },\n"
-" \"server-tag\": \"\",\n"
-" \"shared-networks\": [ ],\n"
-" \"statistic-default-sample-age\": 0,\n"
-" \"statistic-default-sample-count\": 20,\n"
-" \"store-extended-info\": false,\n"
-" \"subnet6\": [\n"
-" {\n"
-" \"allocator\": \"iterative\",\n"
-" \"calculate-tee-times\": true,\n"
-" \"id\": 1,\n"
-" \"max-preferred-lifetime\": 3000,\n"
-" \"max-valid-lifetime\": 4000,\n"
-" \"min-preferred-lifetime\": 3000,\n"
-" \"min-valid-lifetime\": 4000,\n"
-" \"option-data\": [ ],\n"
-" \"pd-allocator\": \"iterative\",\n"
-" \"pd-pools\": [ ],\n"
-" \"pools\": [\n"
-" {\n"
-" \"option-data\": [ ],\n"
-" \"pool\": \"2001:db8:1::/80\"\n"
-" }\n"
-" ],\n"
-" \"preferred-lifetime\": 3000,\n"
-" \"rapid-commit\": false,\n"
-" \"rebind-timer\": 2000,\n"
-" \"relay\": {\n"
-" \"ip-addresses\": [ ]\n"
-" },\n"
-" \"renew-timer\": 1000,\n"
-" \"reservations\": [ ],\n"
-" \"store-extended-info\": false,\n"
-" \"subnet\": \"2001:db8:1::/64\",\n"
-" \"t1-percent\": 0.5,\n"
-" \"t2-percent\": 0.8,\n"
-" \"valid-lifetime\": 4000\n"
-" }\n"
-" ],\n"
-" \"t1-percent\": 0.5,\n"
-" \"t2-percent\": 0.8,\n"
-" \"valid-lifetime\": 4000\n"
-" }\n",
- // CONFIGURATION 37
-"{\n"
-" \"allocator\": \"iterative\",\n"
-" \"calculate-tee-times\": true,\n"
-" \"ddns-conflict-resolution-mode\": \"check-with-dhcid\",\n"
-" \"ddns-generated-prefix\": \"global.prefix\",\n"
-" \"ddns-override-client-update\": true,\n"
-" \"ddns-override-no-update\": true,\n"
-" \"ddns-qualifying-suffix\": \"global.suffix.\",\n"
-" \"ddns-replace-client-name\": \"always\",\n"
-" \"ddns-send-updates\": false,\n"
-" \"ddns-update-on-renew\": false,\n"
-" \"decline-probation-period\": 86400,\n"
-" \"dhcp-ddns\": {\n"
-" \"enable-updates\": true,\n"
-" \"max-queue-size\": 2048,\n"
-" \"ncr-format\": \"JSON\",\n"
-" \"ncr-protocol\": \"UDP\",\n"
-" \"sender-ip\": \"3001::2\",\n"
-" \"sender-port\": 778,\n"
-" \"server-ip\": \"3001::1\",\n"
-" \"server-port\": 777\n"
-" },\n"
-" \"dhcp-queue-control\": {\n"
-" \"capacity\": 64,\n"
-" \"enable-queue\": false,\n"
-" \"queue-type\": \"kea-ring6\"\n"
-" },\n"
-" \"dhcp4o6-port\": 0,\n"
-" \"early-global-reservations-lookup\": false,\n"
-" \"expired-leases-processing\": {\n"
-" \"flush-reclaimed-timer-wait-time\": 25,\n"
-" \"hold-reclaimed-time\": 3600,\n"
-" \"max-reclaim-leases\": 100,\n"
-" \"max-reclaim-time\": 250,\n"
-" \"reclaim-timer-wait-time\": 10,\n"
-" \"unwarned-reclaim-cycles\": 5\n"
-" },\n"
-" \"hooks-libraries\": [ ],\n"
-" \"host-reservation-identifiers\": [ \"hw-address\", \"duid\" ],\n"
-" \"hostname-char-replacement\": \"x\",\n"
-" \"hostname-char-set\": \"[^A-Z]\",\n"
-" \"interfaces-config\": {\n"
-" \"interfaces\": [ \"*\" ],\n"
-" \"re-detect\": false\n"
-" },\n"
-" \"ip-reservations-unique\": true,\n"
-" \"lease-database\": {\n"
-" \"type\": \"memfile\"\n"
-" },\n"
-" \"mac-sources\": [ \"any\" ],\n"
-" \"multi-threading\": {\n"
-" \"enable-multi-threading\": true,\n"
-" \"packet-queue-size\": 64,\n"
-" \"thread-pool-size\": 0\n"
-" },\n"
-" \"option-data\": [ ],\n"
-" \"option-def\": [ ],\n"
-" \"parked-packet-limit\": 256,\n"
-" \"pd-allocator\": \"iterative\",\n"
-" \"preferred-lifetime\": 3000,\n"
-" \"rebind-timer\": 2000,\n"
-" \"relay-supplied-options\": [ \"65\" ],\n"
-" \"renew-timer\": 1000,\n"
-" \"reservations-global\": false,\n"
-" \"reservations-in-subnet\": true,\n"
-" \"reservations-lookup-first\": false,\n"
-" \"reservations-out-of-pool\": false,\n"
-" \"sanity-checks\": {\n"
-" \"extended-info-checks\": \"fix\",\n"
-" \"lease-checks\": \"warn\"\n"
-" },\n"
-" \"server-id\": {\n"
-" \"enterprise-id\": 0,\n"
-" \"htype\": 0,\n"
-" \"identifier\": \"\",\n"
-" \"persist\": true,\n"
-" \"time\": 0,\n"
-" \"type\": \"LLT\"\n"
-" },\n"
-" \"server-tag\": \"\",\n"
-" \"shared-networks\": [ ],\n"
-" \"statistic-default-sample-age\": 0,\n"
-" \"statistic-default-sample-count\": 20,\n"
-" \"store-extended-info\": false,\n"
-" \"subnet6\": [\n"
-" {\n"
-" \"allocator\": \"iterative\",\n"
-" \"calculate-tee-times\": true,\n"
-" \"id\": 1,\n"
-" \"max-preferred-lifetime\": 3000,\n"
-" \"max-valid-lifetime\": 4000,\n"
-" \"min-preferred-lifetime\": 3000,\n"
-" \"min-valid-lifetime\": 4000,\n"
-" \"option-data\": [ ],\n"
-" \"pd-allocator\": \"iterative\",\n"
-" \"pd-pools\": [ ],\n"
-" \"pools\": [\n"
-" {\n"
-" \"option-data\": [ ],\n"
-" \"pool\": \"2001:db8:1::/80\"\n"
-" }\n"
-" ],\n"
-" \"preferred-lifetime\": 3000,\n"
-" \"rapid-commit\": false,\n"
-" \"rebind-timer\": 2000,\n"
-" \"relay\": {\n"
-" \"ip-addresses\": [ ]\n"
-" },\n"
-" \"renew-timer\": 1000,\n"
-" \"reservations\": [ ],\n"
-" \"store-extended-info\": false,\n"
-" \"subnet\": \"2001:db8:1::/64\",\n"
-" \"t1-percent\": 0.5,\n"
-" \"t2-percent\": 0.8,\n"
-" \"valid-lifetime\": 4000\n"
-" }\n"
-" ],\n"
-" \"t1-percent\": 0.5,\n"
-" \"t2-percent\": 0.8,\n"
-" \"valid-lifetime\": 4000\n"
-" }\n",
- // CONFIGURATION 38
-"{\n"
-" \"allocator\": \"iterative\",\n"
-" \"calculate-tee-times\": true,\n"
-" \"ddns-conflict-resolution-mode\": \"check-with-dhcid\",\n"
" \"ddns-generated-prefix\": \"myhost\",\n"
" \"ddns-override-client-update\": false,\n"
" \"ddns-override-no-update\": false,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 39
+ // CONFIGURATION 37
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 40
+ // CONFIGURATION 38
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 41
+ // CONFIGURATION 39
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 42
+ // CONFIGURATION 40
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 43
+ // CONFIGURATION 41
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 44
+ // CONFIGURATION 42
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 45
+ // CONFIGURATION 43
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 46
+ // CONFIGURATION 44
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 47
+ // CONFIGURATION 45
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 48
+ // CONFIGURATION 46
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 49
+ // CONFIGURATION 47
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 50
+ // CONFIGURATION 48
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 51
+ // CONFIGURATION 49
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 52
+ // CONFIGURATION 50
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 53
+ // CONFIGURATION 51
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 54
+ // CONFIGURATION 52
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 55
+ // CONFIGURATION 53
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 56
+ // CONFIGURATION 54
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 57
+ // CONFIGURATION 55
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 58
+ // CONFIGURATION 56
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" },\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 59
+ // CONFIGURATION 57
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 60
+ // CONFIGURATION 58
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 4000\n"
" }\n",
- // CONFIGURATION 61
+ // CONFIGURATION 59
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 62
+ // CONFIGURATION 60
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 63
+ // CONFIGURATION 61
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 64
+ // CONFIGURATION 62
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
" \"t2-percent\": 0.8,\n"
" \"valid-lifetime\": 7200\n"
" }\n",
- // CONFIGURATION 65
+ // CONFIGURATION 63
"{\n"
" \"allocator\": \"iterative\",\n"
" \"calculate-tee-times\": true,\n"
-// Copyright (C) 2017-2023 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2017-2024 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
" \"rapid-commit\": false"
" } ],"
"\"valid-lifetime\": 4000,"
- " \"dhcp-ddns\" : {"
- " \"enable-updates\" : true, "
- " \"qualifying-suffix\" : \"example.com\" }"
+ " \"ddns-qualifying-suffix\": \"example.com\", "
+ " \"dhcp-ddns\": {"
+ " \"enable-updates\": true }"
"}",
// Configuration 2
result->set("ncr-protocol", Element::create(dhcp_ddns::ncrProtocolToString(ncr_protocol_)));
// Set ncr-format
result->set("ncr-format", Element::create(dhcp_ddns::ncrFormatToString(ncr_format_)));
- // Set override-no-update
return (result);
}
/// @brief Determines server flags based on configuration and client flags.
///
/// This method uses input values for the client's FQDN S and N flags, in
- /// conjunction with the configuration parameters updates-enabled, override-
- /// no-updates, and override-client-updates to determine the values that
- /// should be used for the server's FQDN S and N flags.
+ /// conjunction with the configuration parameters updates-enabled,
+ /// ddns-override-no-updates, and ddns-override-client-updates to determine
+ /// the values that should be used for the server's FQDN S and N flags.
/// The logic in this method is based upon RFCs 4702 and 4704, and is
/// shown in the following truth table:
///
/// @brief Builds a FQDN based on the configuration and given IP address.
///
- /// Using the current values for generated-prefix, qualifying-suffix and
- /// an IP address, this method constructs a fully qualified domain name.
+ /// Using the current values for ddns-generated-prefix,
+ /// ddns-qualifying-suffix and an IP address, this method constructs a fully
+ /// qualified domain name.
/// It supports both IPv4 and IPv6 addresses. The format of the name
/// is as follows:
///
- /// <generated-prefix>-<ip address>.<qualifying-suffix>.
+ /// <ddns-generated-prefix>-<ip address>.<ddns-qualifying-suffix>.
///
/// <ip-address> is the result of IOAddress.toText() with the delimiters
/// ('.' for IPv4 or ':' for IPv6) replaced with a hyphen, '-'.
/// @brief Adds a qualifying suffix to a given domain name
///
- /// Constructs a FQDN based on the configured qualifying-suffix and
+ /// Constructs a FQDN based on the configured ddns-qualifying-suffix and
/// a partial domain name as follows:
///
- /// <partial_name>.<qualifying-suffix>.
+ /// <partial_name>.<ddns-qualifying-suffix>.
///
/// Note that the qualifying suffix will only be appended if the
/// input name does not already end with that suffix.
/// @brief Set server FQDN flags based on configuration and a given FQDN
///
- /// Templated wrapper around the analyzeFqdn() allowing that method to
+ /// Template wrapper around the analyzeFqdn() allowing that method to
/// be used for either IPv4 or IPv6 processing. This methods resets all
/// of the flags in the response to zero and then sets the S,N, and O
/// flags. Any other flags are the responsibility of the invoking layer.
/// @brief Get directional update flags based on server FQDN flags
///
- /// Templated convenience method which determines whether forward and
+ /// Template convenience method which determines whether forward and
/// reverse updates should be performed based on a server response version
/// of the FQDN flags. The logic is straight forward and currently not
/// dependent upon configuration specific values:
/// @brief Set server FQDN name based on configuration and a given FQDN
///
- /// Templated method which adjusts the domain name value and type in
+ /// Template method which adjusts the domain name value and type in
/// a server FQDN from a client (inbound) FQDN and the current
/// configuration. The logic is as follows:
///
- /// If replace-client-name is true or the supplied name is empty, the
+ /// If ddns-replace-client-name is true or the supplied name is empty, the
/// server FQDN is set to ""/PARTIAL.
///
- /// If replace-client-name is false and the supplied name is a partial
+ /// If ddns-replace-client-name is false and the supplied name is a partial
/// name the server FQDN is set to the supplied name qualified by
- /// appending the qualifying-suffix.
+ /// appending the ddns-qualifying-suffix.
///
- /// If replace-client-name is false and the supplied name is a fully
+ /// If ddns-replace-client-name is false and the supplied name is a fully
/// qualified name, set the server FQDN to the supplied name.
///
/// If hostname-char-set is not empty, the inbound name will be
getD2ClientConfig()->getEnableUpdates())));
}
-void
-SrvConfig::moveDdnsParams(isc::data::ElementPtr srv_elem) {
- if (!srv_elem || (srv_elem->getType() != Element::map)) {
- isc_throw(BadValue, "moveDdnsParams server config must be given a map element");
- }
-
- if (!srv_elem->contains("dhcp-ddns")) {
- /* nothing to do */
- return;
- }
-
- ElementPtr d2_elem = boost::const_pointer_cast<Element>(srv_elem->get("dhcp-ddns"));
- if (!d2_elem || (d2_elem->getType() != Element::map)) {
- isc_throw(BadValue, "moveDdnsParams dhcp-ddns is not a map");
- }
-
- struct Param {
- std::string from_name;
- std::string to_name;
- };
-
- std::vector<Param> params {
- { "override-no-update", "ddns-override-no-update" },
- { "override-client-update", "ddns-override-client-update" },
- { "replace-client-name", "ddns-replace-client-name" },
- { "generated-prefix", "ddns-generated-prefix" },
- { "qualifying-suffix", "ddns-qualifying-suffix" },
- { "hostname-char-set", "hostname-char-set" },
- { "hostname-char-replacement", "hostname-char-replacement" }
- };
-
- for (auto const& param : params) {
- if (d2_elem->contains(param.from_name)) {
- if (!srv_elem->contains(param.to_name)) {
- // No global value for it already, so let's add it.
- srv_elem->set(param.to_name, d2_elem->get(param.from_name));
- LOG_INFO(dhcpsrv_logger, DHCPSRV_CFGMGR_DDNS_PARAMETER_MOVED)
- .arg(param.from_name).arg(param.to_name);
- } else {
- // Already a global value, we'll use it and ignore this one.
- LOG_INFO(dhcpsrv_logger, DHCPSRV_CFGMGR_DDNS_PARAMETER_IGNORED)
- .arg(param.from_name).arg(param.to_name);
- }
-
- // Now remove it from d2_data, so D2ClientCfg won't complain.
- d2_elem->remove(param.from_name);
- }
- }
-}
-
void
SrvConfig::setIPReservationsUnique(const bool unique) {
if (!getCfgDbAccess()->getIPReservationsUnique() && unique) {
void sanityChecksLifetime(const SrvConfig& target_config,
const std::string& name) const;
- /// @brief Moves deprecated parameters from dhcp-ddns element to global element
- ///
- /// Given a server configuration element map, the following parameters are moved
- /// from dhcp-ddns to top-level (i.e. global) element if they do not already
- /// exist there:
- ///
- /// @code
- /// From dhcp-ddns: To (global):
- /// ------------------------------------------------------
- /// override-no-update ddns-override-no-update
- /// override-client-update ddns-override-client-update
- /// replace-client-name ddns-replace-client-name
- /// generated-prefix ddns-generated-prefix
- /// qualifying-suffix ddns-qualifying-suffix
- /// hostname-char-set hostname-char-set
- /// hostname-char-replacement hostname-char-replacement
- /// @endcode
- ///
- /// Note that the whether or not the deprecated parameters are added
- /// to the global element, they are always removed from the dhcp-ddns
- /// element.
- ///
- /// @param srv_elem server top level map to alter
- static void moveDdnsParams(isc::data::ElementPtr srv_elem);
-
/// @brief Configures the server to allow or disallow specifying multiple
/// hosts with the same IP address/subnet.
///
}
/// @brief Tests that analyzeFqdn generates correct server S and N flags when
-/// updates are enabled and override-no-update is on.
+/// updates are enabled and ddns-override-no-update is on.
TEST_F(D2ClientMgrParamsTest, analyzeFqdnEnabledOverrideNoUpdate) {
D2ClientMgr mgr;
bool server_s = false;
bool server_n = false;
- // Create enabled configuration with override-no-update true.
+ // Create enabled configuration with ddns-override-no-update true.
subnet_->setDdnsSendUpdates(true);
subnet_->setDdnsOverrideNoUpdate(true);
subnet_->setDdnsOverrideClientUpdate(false);
}
/// @brief Tests that analyzeFqdn generates correct server S and N flags when
-/// updates are enabled and override-client-update is on.
+/// updates are enabled and ddns-override-client-update is on.
TEST_F(D2ClientMgrParamsTest, analyzeFqdnEnabledOverrideClientUpdate) {
D2ClientMgr mgr;
bool server_s = false;
bool server_n = false;
- // Create enabled configuration with override-client-update true.
+ // Create enabled configuration with ddns-override-client-update true.
subnet_->setDdnsSendUpdates(true);
subnet_->setDdnsOverrideNoUpdate(false);
subnet_->setDdnsOverrideClientUpdate(true);
EXPECT_TRUE(cfg_to.getClientClassDictionary()->findClass("bar"));
}
-// Validates SrvConfig::moveDdnsParams by ensuring that deprecated dhcp-ddns
-// parameters are:
-// 1. Translated to their global counterparts if they do not exist globally
-// 2. Removed from the dhcp-ddns element
-TEST_F(SrvConfigTest, moveDdnsParamsTest) {
- DdnsParamsPtr params;
-
- CfgMgr::instance().setFamily(AF_INET);
-
- struct Scenario {
- std::string description;
- std::string input_cfg;
- std::string exp_cfg;
- };
-
- std::vector<Scenario> scenarios {
- {
- "scenario 1, move with no global conflicts",
- // input_cfg
- "{\n"
- " \"dhcp-ddns\": {\n"
- " \"enable-updates\": true, \n"
- " \"server-ip\" : \"192.0.2.0\",\n"
- " \"server-port\" : 3432,\n"
- " \"sender-ip\" : \"192.0.2.1\",\n"
- " \"sender-port\" : 3433,\n"
- " \"max-queue-size\" : 2048,\n"
- " \"ncr-protocol\" : \"UDP\",\n"
- " \"ncr-format\" : \"JSON\",\n"
- " \"user-context\": { \"foo\": \"bar\" },\n"
- " \"override-no-update\": true,\n"
- " \"override-client-update\": false,\n"
- " \"replace-client-name\": \"always\",\n"
- " \"generated-prefix\": \"prefix\",\n"
- " \"qualifying-suffix\": \"suffix.com.\",\n"
- " \"hostname-char-set\": \"[^A-Z]\",\n"
- " \"hostname-char-replacement\": \"x\"\n"
- " }\n"
- "}\n",
- // exp_cfg
- "{\n"
- " \"dhcp-ddns\": {\n"
- " \"enable-updates\": true, \n"
- " \"server-ip\" : \"192.0.2.0\",\n"
- " \"server-port\" : 3432,\n"
- " \"sender-ip\" : \"192.0.2.1\",\n"
- " \"sender-port\" : 3433,\n"
- " \"max-queue-size\" : 2048,\n"
- " \"ncr-protocol\" : \"UDP\",\n"
- " \"ncr-format\" : \"JSON\",\n"
- " \"user-context\": { \"foo\": \"bar\" }\n"
- " },\n"
- " \"ddns-override-no-update\": true,\n"
- " \"ddns-override-client-update\": false,\n"
- " \"ddns-replace-client-name\": \"always\",\n"
- " \"ddns-generated-prefix\": \"prefix\",\n"
- " \"ddns-qualifying-suffix\": \"suffix.com.\",\n"
- " \"hostname-char-set\": \"[^A-Z]\",\n"
- " \"hostname-char-replacement\": \"x\"\n"
- "}\n"
- },
- {
- "scenario 2, globals already exist for all movable params",
- // input_cfg
- "{\n"
- " \"dhcp-ddns\" : {\n"
- " \"enable-updates\": true, \n"
- " \"override-no-update\": true,\n"
- " \"override-client-update\": true,\n"
- " \"replace-client-name\": \"always\",\n"
- " \"generated-prefix\": \"prefix\",\n"
- " \"qualifying-suffix\": \"suffix.com.\",\n"
- " \"hostname-char-set\": \"[^A-Z]\",\n"
- " \"hostname-char-replacement\": \"x\"\n"
- " },\n"
- " \"ddns-override-no-update\": false,\n"
- " \"ddns-override-client-update\": false,\n"
- " \"ddns-replace-client-name\": \"when-present\",\n"
- " \"ddns-generated-prefix\": \"org_prefix\",\n"
- " \"ddns-qualifying-suffix\": \"org_suffix.com.\",\n"
- " \"hostname-char-set\": \"[^a-z]\",\n"
- " \"hostname-char-replacement\": \"y\"\n"
- "}\n",
- // exp_cfg
- "{\n"
- " \"dhcp-ddns\" : {\n"
- " \"enable-updates\": true\n"
- " },\n"
- " \"ddns-override-no-update\": false,\n"
- " \"ddns-override-client-update\": false,\n"
- " \"ddns-replace-client-name\": \"when-present\",\n"
- " \"ddns-generated-prefix\": \"org_prefix\",\n"
- " \"ddns-qualifying-suffix\": \"org_suffix.com.\",\n"
- " \"hostname-char-set\": \"[^a-z]\",\n"
- " \"hostname-char-replacement\": \"y\"\n"
- "}\n"
- },
- {
- "scenario 3, nothing to move",
- // input_cfg
- "{\n"
- " \"dhcp-ddns\" : {\n"
- " \"enable-updates\": true, \n"
- " \"server-ip\" : \"192.0.2.0\",\n"
- " \"server-port\" : 3432,\n"
- " \"sender-ip\" : \"192.0.2.1\"\n"
- " }\n"
- "}\n",
- // exp_output
- "{\n"
- " \"dhcp-ddns\" : {\n"
- " \"enable-updates\": true, \n"
- " \"server-ip\" : \"192.0.2.0\",\n"
- " \"server-port\" : 3432,\n"
- " \"sender-ip\" : \"192.0.2.1\"\n"
- " }\n"
- "}\n"
- }
- };
-
- for (auto const& scenario : scenarios) {
- SrvConfig conf(32);
- ElementPtr input_cfg;
- ConstElementPtr exp_cfg;
- {
- SCOPED_TRACE(scenario.description);
- // Parse the input cfg into a mutable Element map.
- ASSERT_NO_THROW(input_cfg = boost::const_pointer_cast<Element>
- (Element::fromJSON(scenario.input_cfg)))
- << "input_cfg didn't parse, test is broken";
-
- // Parse the expected cfg into an Element map.
- ASSERT_NO_THROW(exp_cfg = Element::fromJSON(scenario.exp_cfg))
- << "exp_cfg didn't parse, test is broken";
-
- // Now call moveDdnsParams.
- ASSERT_NO_THROW(SrvConfig::moveDdnsParams(input_cfg));
-
- // Make sure the resultant configuration is as expected.
- EXPECT_TRUE(input_cfg->equals(*exp_cfg));
- }
- }
-}
-
// Verifies that the scoped values for DDNS parameters can be fetched
// for a given Subnet4.
TEST_F(SrvConfigTest, getDdnsParamsTest4) {