From: Thomas Markwalder Date: Thu, 17 Apr 2014 19:29:05 +0000 (-0400) Subject: [3328] Updated Kea4 to support new values X-Git-Tag: trac3434_base~48^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8424bc7ba66d88bdbf59443bd6e06b6918b13723;p=thirdparty%2Fkea.git [3328] Updated Kea4 to support new values Updated spec file and unit tests with new dhcp-ddns values: server-ip, server-port, and max-queue-size --- diff --git a/src/bin/dhcp4/dhcp4.spec b/src/bin/dhcp4/dhcp4.spec index b0f8314fcc..a9a19246af 100644 --- a/src/bin/dhcp4/dhcp4.spec +++ b/src/bin/dhcp4/dhcp4.spec @@ -355,6 +355,27 @@ "item_default": 53001, "item_description" : "port number of b10-dhcp-ddns" }, + { + "item_name": "sender-ip", + "item_type": "string", + "item_optional": true, + "item_default": "", + "item_description" : "IP address from which to send to b10-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 b10-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", diff --git a/src/bin/dhcp4/tests/config_parser_unittest.cc b/src/bin/dhcp4/tests/config_parser_unittest.cc index e01c1dde96..b8f1646f82 100644 --- a/src/bin/dhcp4/tests/config_parser_unittest.cc +++ b/src/bin/dhcp4/tests/config_parser_unittest.cc @@ -2856,6 +2856,9 @@ TEST_F(Dhcp4ParserTest, d2ClientConfig) { " \"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\", " " \"always-include-fqdn\" : true, " @@ -2888,6 +2891,9 @@ TEST_F(Dhcp4ParserTest, d2ClientConfig) { 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()); EXPECT_TRUE(d2_client_config->getAlwaysIncludeFqdn()); diff --git a/src/bin/dhcp4/tests/fqdn_unittest.cc b/src/bin/dhcp4/tests/fqdn_unittest.cc index 90f95f57f0..203e3b7e88 100644 --- a/src/bin/dhcp4/tests/fqdn_unittest.cc +++ b/src/bin/dhcp4/tests/fqdn_unittest.cc @@ -77,6 +77,7 @@ public: ASSERT_NO_THROW(cfg.reset(new D2ClientConfig(true, 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),