From: Francis Dupont Date: Sat, 17 Nov 2018 14:54:32 +0000 (+0100) Subject: [182-remove-always-include-fqdn-configuration-parameter-from-d2clientconfig] Finished... X-Git-Tag: 204-move-models-base~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4de2d249a930d8f4a4e3e9c45a33c56a9117eade;p=thirdparty%2Fkea.git [182-remove-always-include-fqdn-configuration-parameter-from-d2clientconfig] Finished to remove always-include-fqdn --- diff --git a/doc/examples/kea4/with-ddns.json b/doc/examples/kea4/with-ddns.json index 8bd14a72a6..b019d3f527 100644 --- a/doc/examples/kea4/with-ddns.json +++ b/doc/examples/kea4/with-ddns.json @@ -49,7 +49,6 @@ "max-queue-size" : 2048, "ncr-protocol" : "UDP", "ncr-format" : "JSON", - "always-include-fqdn" : true, "override-no-update" : true, "override-client-update" : true, "replace-client-name" : "when-present", diff --git a/doc/examples/kea6/with-ddns.json b/doc/examples/kea6/with-ddns.json index 2f5bbe308c..04cde9edcc 100644 --- a/doc/examples/kea6/with-ddns.json +++ b/doc/examples/kea6/with-ddns.json @@ -51,7 +51,6 @@ "max-queue-size" : 2048, "ncr-protocol" : "UDP", "ncr-format" : "JSON", - "always-include-fqdn" : true, "override-no-update" : true, "override-client-update" : true, "replace-client-name" : "when-present", diff --git a/src/bin/dhcp4/tests/config_parser_unittest.cc b/src/bin/dhcp4/tests/config_parser_unittest.cc index c4191183fa..2b050c0bfd 100644 --- a/src/bin/dhcp4/tests/config_parser_unittest.cc +++ b/src/bin/dhcp4/tests/config_parser_unittest.cc @@ -4157,7 +4157,6 @@ TEST_F(Dhcp4ParserTest, d2ClientConfig) { 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()); - EXPECT_TRUE(d2_client_config->getAlwaysIncludeFqdn()); EXPECT_TRUE(d2_client_config->getOverrideNoUpdate()); EXPECT_TRUE(d2_client_config->getOverrideClientUpdate()); EXPECT_EQ(D2ClientConfig::RCM_WHEN_PRESENT, d2_client_config->getReplaceClientNameMode()); diff --git a/src/bin/dhcp4/tests/fqdn_unittest.cc b/src/bin/dhcp4/tests/fqdn_unittest.cc index f1f3f8e229..8246987db2 100644 --- a/src/bin/dhcp4/tests/fqdn_unittest.cc +++ b/src/bin/dhcp4/tests/fqdn_unittest.cc @@ -211,10 +211,9 @@ public: IfaceMgrTestConfig iface_mgr_test_config_; // Bit Constants for turning on and off DDNS configuration options. - static const uint16_t ALWAYS_INCLUDE_FQDN = 1; - static const uint16_t OVERRIDE_NO_UPDATE = 2; - static const uint16_t OVERRIDE_CLIENT_UPDATE = 4; - static const uint16_t REPLACE_CLIENT_NAME = 8; + static const uint16_t OVERRIDE_NO_UPDATE = 1; + static const uint16_t OVERRIDE_CLIENT_UPDATE = 2; + static const uint16_t REPLACE_CLIENT_NAME = 4; // Enum used to specify whether a client (packet) should include // the hostname option @@ -271,7 +270,6 @@ public: isc::asiolink::IOAddress("127.0.0.1"), 53001, isc::asiolink::IOAddress("0.0.0.0"), 0, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - (mask & ALWAYS_INCLUDE_FQDN), (mask & OVERRIDE_NO_UPDATE), (mask & OVERRIDE_CLIENT_UPDATE), ((mask & REPLACE_CLIENT_NAME) ? diff --git a/src/bin/dhcp4/tests/get_config_unittest.cc b/src/bin/dhcp4/tests/get_config_unittest.cc index f5ef2748bf..40cda032d1 100644 --- a/src/bin/dhcp4/tests/get_config_unittest.cc +++ b/src/bin/dhcp4/tests/get_config_unittest.cc @@ -1187,7 +1187,6 @@ const char* EXTRACTED_CONFIGS[] = { // CONFIGURATION 41 "{\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": true,\n" " \"enable-updates\": true,\n" " \"generated-prefix\": \"test.prefix\",\n" " \"hostname-char-replacement\": \"x\",\n" @@ -1984,7 +1983,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2035,7 +2033,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2112,7 +2109,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2189,7 +2185,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2268,7 +2263,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2428,7 +2422,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2589,7 +2582,6 @@ const char* UNPARSED_CONFIGS[] = { " \"boot-file-name\": \"bar\",\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2670,7 +2662,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2750,7 +2741,6 @@ const char* UNPARSED_CONFIGS[] = { " \"boot-file-name\": \"nofile\",\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2831,7 +2821,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2910,7 +2899,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2989,7 +2977,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3095,7 +3082,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3202,7 +3188,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3309,7 +3294,6 @@ const char* UNPARSED_CONFIGS[] = { " \"authoritative\": true,\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3415,7 +3399,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3494,7 +3477,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3608,7 +3590,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3687,7 +3668,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3745,7 +3725,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3803,7 +3782,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3870,7 +3848,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3928,7 +3905,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3986,7 +3962,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4044,7 +4019,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4102,7 +4076,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4198,7 +4171,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4294,7 +4266,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4400,7 +4371,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4487,7 +4457,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4619,7 +4588,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4724,7 +4692,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4848,7 +4815,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4944,7 +4910,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5045,7 +5010,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5141,7 +5105,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5228,7 +5191,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5351,7 +5313,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5445,7 +5406,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5543,7 +5503,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5594,7 +5553,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5645,7 +5603,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": true,\n" " \"enable-updates\": true,\n" " \"generated-prefix\": \"test.prefix\",\n" " \"hostname-char-replacement\": \"x\",\n" @@ -5724,7 +5681,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5803,7 +5759,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5882,7 +5837,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6045,7 +5999,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6139,7 +6092,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6375,7 +6327,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6484,7 +6435,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6644,7 +6594,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6692,7 +6641,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6740,7 +6688,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 12345,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6788,7 +6735,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6836,7 +6782,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6915,7 +6860,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6994,7 +6938,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -7073,7 +7016,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -7152,7 +7094,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -7257,7 +7198,6 @@ const char* UNPARSED_CONFIGS[] = { " ],\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -7336,7 +7276,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -7415,7 +7354,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -7495,7 +7433,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -7579,7 +7516,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -7663,7 +7599,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -7767,7 +7702,6 @@ const char* UNPARSED_CONFIGS[] = { " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" " \"comment\": \"No dynamic DNS\",\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -7899,7 +7833,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" diff --git a/src/bin/dhcp6/dhcp6.spec b/src/bin/dhcp6/dhcp6.spec deleted file mode 100644 index 56e99b246c..0000000000 --- a/src/bin/dhcp6/dhcp6.spec +++ /dev/null @@ -1,894 +0,0 @@ -{ - "module_spec": { - "module_name": "Dhcp6", - "module_description": "DHCPv6 server daemon", - "config_data": [ - { - "item_name": "server-id", - "item_type": "map", - "item_optional": true, - "item_default": { "type": "LLT" }, - "map_item_spec": [ - { - "item_name": "type", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - { - "item_name": "identifier", - "item_type": "string", - "item_optional": true, - "item_default": "" - }, - { - "item_name": "htype", - "item_type": "integer", - "item_optional": true, - "item_default": 0 - }, - { - "item_name": "time", - "item_type": "integer", - "item_optional": true, - "item_default": 0 - }, - { - "item_name": "enterprise-id", - "item_type": "integer", - "item_optional": true, - "item_default": 0 - }, - { - "item_name": "persist", - "item_type": "boolean", - "item_optional": true, - "item_default": true, - "item_description": "Indicates if generated server identifier should be stored in a stable storage." - } - ] - }, - { - "item_name": "hooks-libraries", - "item_type": "list", - "item_optional": true, - "item_default": [], - "list_item_spec": - { - "item_name": "hooks-library-spec", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "map_item_spec": [ - { - "item_name": "library", - "item_type": "string", - "item_optional": false, - "item_default": "" - } - ] - } - }, - - { "item_name": "interfaces-config", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "map_item_spec": [ - { - "item_name": "interfaces", - "item_type": "list", - "item_optional": false, - "item_default": [ "*" ], - "list_item_spec": - { - "item_name": "interface_name", - "item_type": "string", - "item_optional": false, - "item_default": "*" - } - } - ] - }, - - { "item_name": "expired-leases-processing", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "map_item_spec": [ - { - "item_name": "reclaim-timer-wait-time", - "item_type": "integer", - "item_optional": false, - "item_default": 10 - }, - { - "item_name": "flush-reclaimed-timer-wait-time", - "item_type": "integer", - "item_optional": false, - "item_default": 25 - }, - { - "item_name": "hold-reclaimed-time", - "item_type": "integer", - "item_optional": false, - "item_default": 3600 - }, - { - "item_name": "max-reclaim-leases", - "item_type": "integer", - "item_optional": false, - "item_default": 100 - }, - { - "item_name": "max-reclaim-time", - "item_type": "integer", - "item_optional": false, - "item_default": 250 - }, - { - "item_name": "unwarned-reclaim-cycles", - "item_type": "integer", - "item_optional": false, - "item_default": 5 - } - ] - }, - - { "item_name": "renew-timer", - "item_type": "integer", - "item_optional": false, - "item_default": 1000 - }, - - { "item_name": "rebind-timer", - "item_type": "integer", - "item_optional": false, - "item_default": 2000 - }, - - { "item_name": "preferred-lifetime", - "item_type": "integer", - "item_optional": false, - "item_default": 3000 - }, - - { "item_name": "valid-lifetime", - "item_type": "integer", - "item_optional": false, - "item_default": 4000 - }, - - { "item_name": "option-def", - "item_type": "list", - "item_optional": false, - "item_default": [], - "list_item_spec": - { - "item_name": "single-option-def", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "map_item_spec": [ - { - "item_name": "name", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - - { "item_name": "code", - "item_type": "integer", - "item_optional": false, - "item_default": 0 - }, - - { "item_name": "type", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - - { "item_name": "array", - "item_type": "boolean", - "item_optional": false, - "item_default": false - }, - - { "item_name": "record-types", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - - { "item_name": "space", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - - { "item_name": "encapsulate", - "item_type": "string", - "item_optional": false, - "item_default": "" - } ] - } - }, - - { "item_name": "option-data", - "item_type": "list", - "item_optional": false, - "item_default": [], - "list_item_spec": - { - "item_name": "single-option-data", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "map_item_spec": [ - { - "item_name": "name", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - - { "item_name": "code", - "item_type": "integer", - "item_optional": false, - "item_default": 0 - }, - { "item_name": "data", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - { "item_name": "csv-format", - "item_type": "boolean", - "item_optional": false, - "item_default": false - }, - { "item_name": "space", - "item_type": "string", - "item_optional": false, - "item_default": "dhcp6" - } ] - } - }, - - { "item_name": "lease-database", - "item_type": "map", - "item_optional": false, - "item_default": {"type": "memfile"}, - "map_item_spec": [ - { - "item_name": "type", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - { - "item_name": "name", - "item_type": "string", - "item_optional": true, - "item_default": "" - }, - { - "item_name": "user", - "item_type": "string", - "item_optional": true, - "item_default": "" - }, - { - "item_name": "host", - "item_type": "string", - "item_optional": true, - "item_default": "" - }, - { - "item_name": "password", - "item_type": "string", - "item_optional": true, - "item_default": "" - }, - { - "item_name": "persist", - "item_type": "boolean", - "item_optional": true, - "item_default": true - }, - { - "item_name": "lfc-interval", - "item_type": "integer", - "item_optional": true, - "item_default": 0 - }, - { - "item_name": "readonly", - "item_type": "boolean", - "item_optional": true, - "item_default": false - } - ] - }, - { "item_name": "client-classes", - "item_type": "list", - "item_optional": true, - "item_default": [], - "list_item_spec": - { - "item_name": "client-class", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "map_item_spec": [ - { "item_name": "name", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - { "item_name": "test", - "item_type": "string", - "item_optional": true, - "item_default": "" - }, - { "item_name": "option-data", - "item_type": "list", - "item_optional": true, - "item_default": [], - "list_item_spec": - { - "item_name": "single-option-data", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "map_item_spec": [ - { - "item_name": "name", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - { - "item_name": "code", - "item_type": "integer", - "item_optional": false, - "item_default": 0 - }, - { - "item_name": "data", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - { "item_name": "csv-format", - "item_type": "boolean", - "item_optional": false, - "item_default": false - }, - { "item_name": "space", - "item_type": "string", - "item_optional": false, - "item_default": "dhcp4" - } ] - } - } - ] - } - }, - { "item_name": "subnet6", - "item_type": "list", - "item_optional": false, - "item_default": [], - "list_item_spec": - { - "item_name": "single-subnet6", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "map_item_spec": [ - - { "item_name": "subnet", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - - { "item_name": "id", - "item_type": "integer", - "item_optional": false, - "item_default": 0 - }, - - { "item_name": "interface", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - - { "item_name": "interface-id", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - - { "item_name": "rapid-commit", - "item_type": "boolean", - "item_optional": false, - "item_default": false - }, - - { "item_name": "renew-timer", - "item_type": "integer", - "item_optional": false, - "item_default": 1000 - }, - - { "item_name": "rebind-timer", - "item_type": "integer", - "item_optional": false, - "item_default": 2000 - }, - - { "item_name": "preferred-lifetime", - "item_type": "integer", - "item_optional": false, - "item_default": 3000 - }, - - { "item_name": "valid-lifetime", - "item_type": "integer", - "item_optional": false, - "item_default": 7200 - }, - { "item_name": "pools", - "item_type": "map", - "item_optional": true, - "item_default" : {}, - "map_item_spec": [ - { "item_name": "pool", - "item_type": "list", - "item_optional": false, - "item_default": [], - "list_item_spec": - { - "item_name": "type", - "item_type": "string", - "item_optional": false, - "item_default": "" - } - }, - { "item_name": "option-data", - "item_type": "list", - "item_optional": false, - "item_default": [], - "item_description": "Holds a list of pool specific DHCP options.", - "list_item_spec": - { - "item_name": "single-option-data", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "item_description": "One of the pool specific DHCP options.", - "map_item_spec": [ - { - "item_name": "name", - "item_type": "string", - "item_optional": false, - "item_default": "", - "item_description": "Option name." - }, - - { "item_name": "code", - "item_type": "integer", - "item_optional": false, - "item_default": 0, - "item_description": "Option code." - }, - { "item_name": "data", - "item_type": "string", - "item_optional": false, - "item_default": "", - "item_description": "Option value." - }, - { "item_name": "csv-format", - "item_type": "boolean", - "item_optional": false, - "item_default": false, - "item_description": "Indicates if option value is specified as comma separated values." - }, - { "item_name": "space", - "item_type": "string", - "item_optional": false, - "item_default": "dhcp6", - "item_description": "Option space." - } ] - } - } ] - }, - - { "item_name": "client-class", - "item_type": "string", - "item_optional": false, - "item_default": "", - "item_description" : "Restricts access to this subnet to specified client class (if defined)" - }, - - { "item_name": "relay", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "item_description" : "Structure holding relay information.", - "map_item_spec": [ - { - "item_name": "ip-address", - "item_type": "string", - "item_optional": false, - "item_default": "::", - "item_description" : "IPv6 address of the relay (defaults to :: if not specified)." - } - ] - }, - - { - "item_name": "pd-pools", - "item_type": "list", - "item_optional": true, - "item_default": [], - "list_item_spec": - { - "item_name": "pd-pool", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "map_item_spec": [ - { - "item_name": "prefix", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - { - "item_name": "prefix-len", - "item_type": "integer", - "item_optional": false, - "item_default": 128 - }, - { - "item_name": "delegated-len", - "item_type": "integer", - "item_optional": false, - "item_default": 128 - }, - { - "item_name": "excluded-prefix", - "item_type": "string", - "item_optional": true, - "item_default": "", - "item_description": "excluded prefix as per RFC6603" - }, - { - "item_name": "excluded-prefix-len", - "item_type": "integer", - "item_optional": true, - "item_default": 128, - "item_description": "excluded prefix length" - }, - { - "item_name": "option-data", - "item_type": "list", - "item_optional": false, - "item_default": [], - "item_description": "Holds a list of the pd-pool specific DHCP options.", - "list_item_spec": - { - "item_name": "single-option-data", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "item_description": "One of the pd-pool specific DHCP options.", - "map_item_spec": [ - { - "item_name": "name", - "item_type": "string", - "item_optional": false, - "item_default": "", - "item_description": "Option name." - }, - - { "item_name": "code", - "item_type": "integer", - "item_optional": false, - "item_default": 0, - "item_description": "Option code." - - }, - { "item_name": "data", - "item_type": "string", - "item_optional": false, - "item_default": "", - "item_description": "Option value." - }, - { "item_name": "csv-format", - "item_type": "boolean", - "item_optional": false, - "item_default": false, - "item_description": "Indicates if option value is specified as comma separated values." - }, - { "item_name": "space", - "item_type": "string", - "item_optional": false, - "item_default": "dhcp6", - "item_description": "Option space." - } ] - } - } ] - } - }, - { "item_name": "option-data", - "item_type": "list", - "item_optional": false, - "item_default": [], - "list_item_spec": - { - "item_name": "single-option-data", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "map_item_spec": [ - { - "item_name": "name", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - { - "item_name": "code", - "item_type": "integer", - "item_optional": false, - "item_default": 0 - }, - { - "item_name": "data", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - { "item_name": "csv-format", - "item_type": "boolean", - "item_optional": false, - "item_default": false - }, - { "item_name": "space", - "item_type": "string", - "item_optional": false, - "item_default": "dhcp6" - } ] - } - }, - { "item_name": "reservations", - "item_type": "list", - "item_optional": false, - "item_default": [], - "list_item_spec": - { - "item_name": "reservation", - "item_type": "map", - "item_optional": false, - "item_default": {}, - "map_item_spec": [ - { - "item_name": "hw-address", - "item_type": "string", - "item_optional": true, - "item_default": "" - }, - { - "item_name": "duid", - "item_type": "string", - "item_optional": true, - "item_default": "" - }, - { - "item_name": "hostname", - "item_type": "string", - "item_optional": false, - "item_default": "" - }, - { - "item_name": "ip-addresses", - "item_type": "list", - "item_optional": false, - "item_default": [], - "list_item_spec": - { - "item_name": "ip-address-reservation", - "item_type": "string", - "item_optional": false, - "item_default": "" - } - }, - { - "item_name": "prefixes", - "item_type": "list", - "item_optional": false, - "item_default": [], - "list_item_spec": - { - "item_name": "prefix-reservation", - "item_type": "string", - "item_optional": false, - "item_default": "" - } - }, - { - "item_name": "client-classes", - "item_type": "list", - "item_optional": true, - "item_default": [], - "item_description": "list of reserved classes for a client", - "list_item_spec": - { - "item_name": "client-class", - "item_type": "string", - "item_optional": false, - "item_default": "", - "item_description": "one of the classes reserved for a client" - } - } ] - } - }, - { - "item_name": "reservation-mode", - "item_type": "string", - "item_optional": true, - "item_default": "all", - "item_description": "Specifies allowed host reservation types. Disabling unused modes may improve performance. Allowed values: disabled, off, out-of-pool, all" - } ] - } - }, - - { "item_name": "mac-sources", - "item_type": "list", - "item_optional": true, - "item_default": [ "any" ], - "item_description": "Lists MAC/hardware address acquisition sources", - "list_item_spec": - { - "item_name": "source", - "item_type": "string", - "item_optional": true, - "item_default": "any" - } - } , - - { "item_name": "dhcp-ddns", - "item_type": "map", - "item_optional": false, - "item_default": {"enable-updates": false}, - "item_description" : "Contains parameters pertaining DHCP-driven DDNS updates", - "map_item_spec": [ - { - "item_name": "enable-updates", - "item_type": "boolean", - "item_optional": false, - "item_default": false, - "item_description" : "Enables DDNS update processing" - }, - { - "item_name": "server-ip", - "item_type": "string", - "item_optional": true, - "item_default": "127.0.0.1", - "item_description" : "IP address of kea-dhcp-ddns (IPv4 or IPv6)" - }, - { - "item_name": "server-port", - "item_type": "integer", - "item_optional": true, - "item_default": 53001, - "item_description" : "port number of kea-dhcp-ddns" - }, - { - "item_name": "sender-ip", - "item_type": "string", - "item_optional": true, - "item_default": "", - "item_description" : "IP address from which to send to kea-dhcp-ddns (IPv4 or IPv6)" - }, - { - "item_name": "sender-port", - "item_type": "integer", - "item_optional": true, - "item_default": 0, - "item_description" : "port number from which to send to kea-dhcp-ddns" - }, - { - "item_name": "max-queue-size", - "item_type": "integer", - "item_optional": true, - "item_default": 1024, - "item_description" : "maximum number of requests allowed in the send queue" - }, - { - "item_name": "ncr-protocol", - "item_type": "string", - "item_optional": true, - "item_default": "UDP", - "item_description" : "Socket protocol to use with kea-dhcp-ddns" - }, - { - "item_name": "ncr-format", - "item_type": "string", - "item_optional": true, - "item_default": "JSON", - "item_description" : "Format of the update request packet" - }, - { - - "item_name": "always-include-fqdn", - "item_type": "boolean", - "item_optional": true, - "item_default": false, - "item_description": "Enable always including the FQDN option in its response" - }, - { - "item_name": "override-no-update", - "item_type": "boolean", - "item_optional": true, - "item_default": false, - "item_description": "Do update, even if client requested no updates with N flag" - }, - { - "item_name": "override-client-update", - "item_type": "boolean", - "item_optional": true, - "item_default": false, - "item_description": "Server performs an update even if client requested delegation" - }, - { - "item_name": "replace-client-name", - "item_type": "string", - "item_optional": true, - "item_default": "never", - "item_description": "Should server replace the domain-name supplied by the client" - }, - { - "item_name": "generated-prefix", - "item_type": "string", - "item_optional": true, - "item_default": "myhost", - "item_description": "Prefix to use when generating the client's name" - }, - - { - "item_name": "qualifying-suffix", - "item_type": "string", - "item_optional": true, - "item_default": "", - "item_description": "Fully qualified domain-name suffix if partial name provided by client" - }, - ] - }, - ], - "commands": [ - { - "command_name": "shutdown", - "command_description": "Shuts down DHCPv6 server.", - "command_args": [ - { - "item_name": "pid", - "item_type": "integer", - "item_optional": true - } - ] - }, - - { - "command_name": "libreload", - "command_description": "Reloads the current hooks libraries.", - "command_args": [] - } - ] - } -} diff --git a/src/bin/dhcp6/tests/config_parser_unittest.cc b/src/bin/dhcp6/tests/config_parser_unittest.cc index 8aa6d6213c..4888c627d8 100644 --- a/src/bin/dhcp6/tests/config_parser_unittest.cc +++ b/src/bin/dhcp6/tests/config_parser_unittest.cc @@ -4612,7 +4612,6 @@ TEST_F(Dhcp6ParserTest, d2ClientConfig) { 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()); - EXPECT_TRUE(d2_client_config->getAlwaysIncludeFqdn()); EXPECT_TRUE(d2_client_config->getOverrideNoUpdate()); EXPECT_TRUE(d2_client_config->getOverrideClientUpdate()); EXPECT_EQ(D2ClientConfig::RCM_WHEN_PRESENT, d2_client_config->getReplaceClientNameMode()); diff --git a/src/bin/dhcp6/tests/fqdn_unittest.cc b/src/bin/dhcp6/tests/fqdn_unittest.cc index 4ed958c38a..c5b4083add 100644 --- a/src/bin/dhcp6/tests/fqdn_unittest.cc +++ b/src/bin/dhcp6/tests/fqdn_unittest.cc @@ -48,10 +48,9 @@ public: // Bit Constants for turning on and off DDNS configuration options. // (Defined here as these are only meaningful to this class.) - static const uint16_t ALWAYS_INCLUDE_FQDN = 1; - static const uint16_t OVERRIDE_NO_UPDATE = 2; - static const uint16_t OVERRIDE_CLIENT_UPDATE = 4; - static const uint16_t REPLACE_CLIENT_NAME = 8; + static const uint16_t OVERRIDE_NO_UPDATE = 1; + static const uint16_t OVERRIDE_CLIENT_UPDATE = 2; + static const uint16_t REPLACE_CLIENT_NAME = 4; // Enum used to specify whether a client (packet) should include // the hostname option @@ -123,7 +122,6 @@ public: isc::asiolink::IOAddress("::"), 0, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - (mask & ALWAYS_INCLUDE_FQDN), (mask & OVERRIDE_NO_UPDATE), (mask & OVERRIDE_CLIENT_UPDATE), ((mask & REPLACE_CLIENT_NAME) ? diff --git a/src/bin/dhcp6/tests/get_config_unittest.cc b/src/bin/dhcp6/tests/get_config_unittest.cc index 28dc3d28fb..b931f48f42 100644 --- a/src/bin/dhcp6/tests/get_config_unittest.cc +++ b/src/bin/dhcp6/tests/get_config_unittest.cc @@ -1116,7 +1116,6 @@ const char* EXTRACTED_CONFIGS[] = { // CONFIGURATION 35 "{\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": true,\n" " \"enable-updates\": true,\n" " \"generated-prefix\": \"test.prefix\",\n" " \"hostname-char-replacement\": \"x\",\n" @@ -1838,7 +1837,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -1899,7 +1897,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -1983,7 +1980,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2133,7 +2129,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2283,7 +2278,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2433,7 +2427,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2517,7 +2510,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2602,7 +2594,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2687,7 +2678,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2801,7 +2791,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2885,7 +2874,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -2970,7 +2958,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3057,7 +3044,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3159,7 +3145,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3244,7 +3229,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3311,7 +3295,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3378,7 +3361,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3454,7 +3436,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3521,7 +3502,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3588,7 +3568,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3689,7 +3668,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3790,7 +3768,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3901,7 +3878,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -3998,7 +3974,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4135,7 +4110,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4259,7 +4233,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4396,7 +4369,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4495,7 +4467,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4598,7 +4569,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4659,7 +4629,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4720,7 +4689,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4804,7 +4772,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -4888,7 +4855,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5041,7 +5007,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5140,7 +5105,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5247,7 +5211,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": true,\n" " \"enable-updates\": true,\n" " \"generated-prefix\": \"test.prefix\",\n" " \"hostname-char-replacement\": \"x\",\n" @@ -5331,7 +5294,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5534,7 +5496,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5641,7 +5602,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5702,7 +5662,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5763,7 +5722,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5935,7 +5893,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -5996,7 +5953,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6053,7 +6009,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6110,7 +6065,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 12345,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6167,7 +6121,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6238,7 +6191,6 @@ const char* UNPARSED_CONFIGS[] = { " ],\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6322,7 +6274,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6406,7 +6357,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6491,7 +6441,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6581,7 +6530,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6671,7 +6619,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6757,7 +6704,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6844,7 +6790,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -6936,7 +6881,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -7038,7 +6982,6 @@ const char* UNPARSED_CONFIGS[] = { " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" " \"comment\": \"No dynamic DNS\",\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -7184,7 +7127,6 @@ const char* UNPARSED_CONFIGS[] = { "{\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" @@ -7370,7 +7312,6 @@ const char* UNPARSED_CONFIGS[] = { " },\n" " \"decline-probation-period\": 86400,\n" " \"dhcp-ddns\": {\n" -" \"always-include-fqdn\": false,\n" " \"enable-updates\": false,\n" " \"generated-prefix\": \"myhost\",\n" " \"hostname-char-replacement\": \"\",\n" diff --git a/src/lib/dhcpsrv/tests/cfgmgr_unittest.cc b/src/lib/dhcpsrv/tests/cfgmgr_unittest.cc index 96a87821c8..dd76af4511 100644 --- a/src/lib/dhcpsrv/tests/cfgmgr_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfgmgr_unittest.cc @@ -342,7 +342,7 @@ TEST_F(CfgMgrTest, d2ClientConfig) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_ALWAYS, + true, true, D2ClientConfig::RCM_ALWAYS, "pre-fix", "suf-fix", "[^A-z]", "*"))); // Verify that we can assign a new, non-empty configuration. diff --git a/src/lib/dhcpsrv/tests/d2_client_unittest.cc b/src/lib/dhcpsrv/tests/d2_client_unittest.cc index 0c68a6c38a..3f5860b5af 100644 --- a/src/lib/dhcpsrv/tests/d2_client_unittest.cc +++ b/src/lib/dhcpsrv/tests/d2_client_unittest.cc @@ -196,7 +196,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(ref_config.reset(new D2ClientConfig(true, ref_address, 477, ref_address, 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "[^A-Z]", "*"))); ASSERT_TRUE(ref_config); @@ -204,7 +204,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(true, ref_address, 477, ref_address, 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "[^A-Z]", "*"))); ASSERT_TRUE(test_config); EXPECT_TRUE(*ref_config == *test_config); @@ -214,7 +214,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(false, ref_address, 477, ref_address, 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "[^A-Z]", "*"))); ASSERT_TRUE(test_config); EXPECT_FALSE(*ref_config == *test_config); @@ -224,7 +224,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(true, test_address, 477, ref_address, 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "[^A-Z]", "*"))); ASSERT_TRUE(test_config); EXPECT_FALSE(*ref_config == *test_config); @@ -234,7 +234,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(true, ref_address, 333, ref_address, 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "[^A-Z]", "*"))); ASSERT_TRUE(test_config); EXPECT_FALSE(*ref_config == *test_config); @@ -244,7 +244,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(true, ref_address, 477, test_address, 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "[^A-Z]", "*"))); ASSERT_TRUE(test_config); EXPECT_FALSE(*ref_config == *test_config); @@ -254,7 +254,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(true, ref_address, 477, ref_address, 333, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "[^A-Z]", "*"))); ASSERT_TRUE(test_config); EXPECT_FALSE(*ref_config == *test_config); @@ -264,7 +264,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(true, ref_address, 477, ref_address, 478, 2048, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "[^A-Z]", "*"))); ASSERT_TRUE(test_config); EXPECT_FALSE(*ref_config == *test_config); @@ -274,7 +274,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(true, ref_address, 477, ref_address, 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, false, true, D2ClientConfig::RCM_WHEN_PRESENT, + false, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "[^A-Z]", "*"))); ASSERT_TRUE(test_config); EXPECT_FALSE(*ref_config == *test_config); @@ -284,7 +284,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(true, ref_address, 477, ref_address, 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, false, D2ClientConfig::RCM_WHEN_PRESENT, + true, false, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "[^A-Z]", "*"))); ASSERT_TRUE(test_config); EXPECT_FALSE(*ref_config == *test_config); @@ -294,7 +294,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(true, ref_address, 477, ref_address, 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_NEVER, + true, true, D2ClientConfig::RCM_NEVER, "pre-fix", "suf-fix", "[^A-Z]", "*"))); ASSERT_TRUE(test_config); EXPECT_FALSE(*ref_config == *test_config); @@ -304,7 +304,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(true, ref_address, 477, ref_address, 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "bogus", "suf-fix", "[^A-Z]", "*"))); ASSERT_TRUE(test_config); EXPECT_FALSE(*ref_config == *test_config); @@ -314,7 +314,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(true, ref_address, 477, ref_address, 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "bogus", "[^A-Z]", "*"))); ASSERT_TRUE(test_config); EXPECT_FALSE(*ref_config == *test_config); @@ -324,7 +324,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(true, ref_address, 477, ref_address, 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "[abc]", "*"))); ASSERT_TRUE(test_config); EXPECT_FALSE(*ref_config == *test_config); @@ -334,7 +334,7 @@ TEST(D2ClientConfigTest, equalityOperator) { ASSERT_NO_THROW(test_config.reset(new D2ClientConfig(true, ref_address, 477, ref_address, 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "[^A-Z]", "x"))); ASSERT_TRUE(test_config); EXPECT_FALSE(*ref_config == *test_config); @@ -379,7 +379,7 @@ TEST(D2ClientMgr, validConfig) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "", ""))); // Verify that we can assign a new, non-empty configuration. @@ -416,7 +416,7 @@ TEST(D2ClientMgr, ipv6Config) { isc::asiolink::IOAddress("::1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "pre-fix", "suf-fix", "", ""))); // Verify that we can assign a new, non-empty configuration. @@ -459,7 +459,7 @@ TEST(D2ClientMgr, analyzeFqdnInvalidCombination) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, false, D2ClientConfig::RCM_NEVER, + false, false, D2ClientConfig::RCM_NEVER, "pre-fix", "suf-fix", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); ASSERT_TRUE(mgr.ddnsEnabled()); @@ -483,7 +483,7 @@ TEST(D2ClientMgr, analyzeFqdnEnabledNoOverrides) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, false, D2ClientConfig::RCM_NEVER, + false, false, D2ClientConfig::RCM_NEVER, "pre-fix", "suf-fix", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); ASSERT_TRUE(mgr.ddnsEnabled()); @@ -527,7 +527,7 @@ TEST(D2ClientMgr, analyzeFqdnEnabledOverrideNoUpdate) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, true, false, D2ClientConfig::RCM_NEVER, + true, false, D2ClientConfig::RCM_NEVER, "pre-fix", "suf-fix", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); ASSERT_TRUE(mgr.ddnsEnabled()); @@ -570,7 +570,7 @@ TEST(D2ClientMgr, analyzeFqdnEnabledOverrideClientUpdate) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, true, D2ClientConfig::RCM_NEVER, + false, true, D2ClientConfig::RCM_NEVER, "pre-fix", "suf-fix", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); ASSERT_TRUE(mgr.ddnsEnabled()); @@ -614,7 +614,7 @@ TEST(D2ClientMgr, adjustFqdnFlagsV4) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, true, false, D2ClientConfig::RCM_NEVER, + true, false, D2ClientConfig::RCM_NEVER, "pre-fix", "suf-fix", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); ASSERT_TRUE(mgr.ddnsEnabled()); @@ -715,7 +715,7 @@ TEST(D2ClientMgr, qualifyName) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, true, D2ClientConfig::RCM_NEVER, + false, true, D2ClientConfig::RCM_NEVER, "prefix", "suffix.com", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); @@ -731,7 +731,7 @@ TEST(D2ClientMgr, qualifyName) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, true, D2ClientConfig::RCM_NEVER, + false, true, D2ClientConfig::RCM_NEVER, "prefix", "suffix.com", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); partial_name = "somehost"; @@ -745,7 +745,7 @@ TEST(D2ClientMgr, qualifyName) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, true, D2ClientConfig::RCM_NEVER, + false, true, D2ClientConfig::RCM_NEVER, "prefix", "", "", ""))); //empty suffix ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); partial_name = "somehost"; @@ -758,7 +758,7 @@ TEST(D2ClientMgr, qualifyName) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, true, D2ClientConfig::RCM_NEVER, + false, true, D2ClientConfig::RCM_NEVER, "prefix", "hasdot.com.", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); @@ -777,7 +777,7 @@ TEST(D2ClientMgr, qualifyName) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, true, D2ClientConfig::RCM_NEVER, + false, true, D2ClientConfig::RCM_NEVER, "prefix", "", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); @@ -815,7 +815,7 @@ TEST(D2ClientMgr, generateFqdn) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, true, D2ClientConfig::RCM_NEVER, + false, true, D2ClientConfig::RCM_NEVER, "prefix", "suffix.com", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); @@ -849,7 +849,7 @@ TEST(D2ClientMgr, adjustDomainNameV4) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, false, D2ClientConfig::RCM_NEVER, + false, false, D2ClientConfig::RCM_NEVER, "prefix", "suffix.com", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); ASSERT_EQ(D2ClientConfig::RCM_NEVER, cfg->getReplaceClientNameMode()); @@ -892,7 +892,7 @@ TEST(D2ClientMgr, adjustDomainNameV4) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, false, D2ClientConfig::RCM_WHEN_PRESENT, + false, false, D2ClientConfig::RCM_WHEN_PRESENT, "prefix", "suffix.com", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); ASSERT_EQ(D2ClientConfig::RCM_WHEN_PRESENT, cfg->getReplaceClientNameMode()); @@ -942,7 +942,7 @@ TEST(D2ClientMgr, adjustDomainNameV6) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, false, D2ClientConfig::RCM_NEVER, + false, false, D2ClientConfig::RCM_NEVER, "prefix", "suffix.com", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); ASSERT_EQ(D2ClientConfig::RCM_NEVER, cfg->getReplaceClientNameMode()); @@ -982,7 +982,7 @@ TEST(D2ClientMgr, adjustDomainNameV6) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, false, D2ClientConfig::RCM_WHEN_PRESENT, + false, false, D2ClientConfig::RCM_WHEN_PRESENT, "prefix", "suffix.com", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); ASSERT_EQ(D2ClientConfig::RCM_WHEN_PRESENT, cfg->getReplaceClientNameMode()); @@ -1032,7 +1032,7 @@ TEST(D2ClientMgr, adjustFqdnFlagsV6) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, true, false, D2ClientConfig::RCM_NEVER, + true, false, D2ClientConfig::RCM_NEVER, "pre-fix", "suf-fix", "", ""))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); ASSERT_TRUE(mgr.ddnsEnabled()); @@ -1126,7 +1126,7 @@ TEST(D2ClientMgr, sanitizeFqdnV4) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, false, D2ClientConfig::RCM_NEVER, + false, false, D2ClientConfig::RCM_NEVER, "prefix", "suffix.com", "[^A-Za-z0-9-]", "x"))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); ASSERT_EQ(D2ClientConfig::RCM_NEVER, cfg->getReplaceClientNameMode()); @@ -1210,7 +1210,7 @@ TEST(D2ClientMgr, sanitizeFqdnV6) { isc::asiolink::IOAddress("127.0.0.1"), 478, 1024, dhcp_ddns::NCR_UDP, dhcp_ddns::FMT_JSON, - false, false, false, D2ClientConfig::RCM_NEVER, + false, false, D2ClientConfig::RCM_NEVER, "prefix", "suffix.com", "[^A-Za-z0-9-]", "x"))); ASSERT_NO_THROW(mgr.setD2ClientConfig(cfg)); ASSERT_EQ(D2ClientConfig::RCM_NEVER, cfg->getReplaceClientNameMode()); diff --git a/src/lib/dhcpsrv/tests/d2_udp_unittest.cc b/src/lib/dhcpsrv/tests/d2_udp_unittest.cc index 333a368759..f0bc492e9a 100644 --- a/src/lib/dhcpsrv/tests/d2_udp_unittest.cc +++ b/src/lib/dhcpsrv/tests/d2_udp_unittest.cc @@ -75,7 +75,7 @@ public: sender_ip, D2ClientConfig::DFT_SENDER_PORT, D2ClientConfig::DFT_MAX_QUEUE_SIZE, protocol, dhcp_ddns::FMT_JSON, - true, true, true, D2ClientConfig::RCM_WHEN_PRESENT, + true, true, D2ClientConfig::RCM_WHEN_PRESENT, "myhost", ".example.com.", "", ""))); ASSERT_NO_THROW(setD2ClientConfig(new_cfg)); diff --git a/src/lib/yang/models/kea-dhcp-types.yang b/src/lib/yang/models/kea-dhcp-types.yang index 43e8baf8f8..6f6ec5ef91 100644 --- a/src/lib/yang/models/kea-dhcp-types.yang +++ b/src/lib/yang/models/kea-dhcp-types.yang @@ -309,10 +309,6 @@ module kea-dhcp-types { default "JSON"; description "Packet format to use for DHCP-DDNS."; } - leaf always-include-fqdn { - type boolean; - description "???"; - } leaf override-no-update { type boolean; default false; diff --git a/src/lib/yang/translator_config.cc b/src/lib/yang/translator_config.cc index 1818287d11..1f5c2207ef 100644 --- a/src/lib/yang/translator_config.cc +++ b/src/lib/yang/translator_config.cc @@ -172,8 +172,6 @@ TranslatorConfig::getDdnsKea(std::string xpath) { getParam(ddns, xpath, "max-queue-size"); getParam(ddns, xpath, "ncr-protocol"); getParam(ddns, xpath, "ncr-format"); - /// @todo: remove this one when it will be removed from the syntax. - getParam(ddns, xpath, "always-include-fqdn"); getParam(ddns, xpath, "override-no-update"); getParam(ddns, xpath, "override-client-update"); getParam(ddns, xpath, "replace-client-name"); @@ -616,11 +614,6 @@ TranslatorConfig::setServerKeaDhcpCommon(const string& xpath, if (format) { setItem(xpath + "/dhcp-ddns/ncr-format", format, SR_ENUM_T); } - ConstElementPtr always = ddns->get("always-include-fqdn"); - if (always) { - setItem(xpath + "/dhcp-ddns/always-include-fqdn", always, - SR_BOOL_T); - } ConstElementPtr no_up = ddns->get("override-no-update"); if (no_up) { setItem(xpath + "/dhcp-ddns/override-no-update", no_up, SR_BOOL_T);