]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#488,!259] Updated get_config_unittests for v4.
authorMarcin Siodelski <marcin@isc.org>
Wed, 6 Mar 2019 16:29:53 +0000 (17:29 +0100)
committerMarcin Siodelski <marcin@isc.org>
Thu, 7 Mar 2019 13:00:36 +0000 (08:00 -0500)
src/bin/dhcp4/tests/get_config_unittest.cc
src/lib/dhcpsrv/network.cc
src/lib/dhcpsrv/network.h

index 6a10212aee288b84de9898481198862066c75fd5..ca0f38d1a29a4faab924720eddccf9694fbba8c3 100644 (file)
@@ -8359,6 +8359,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"interface\": \"\",\n"
 "                \"match-client-id\": true,\n"
 "                \"name\": \"foo\",\n"
+"                \"next-server\": \"0.0.0.0\",\n"
 "                \"option-data\": [ ],\n"
 "                \"relay\": {\n"
 "                    \"ip-addresses\": [ ]\n"
@@ -8644,6 +8645,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"interface\": \"\",\n"
 "                \"match-client-id\": true,\n"
 "                \"name\": \"foo\",\n"
+"                \"next-server\": \"0.0.0.0\",\n"
 "                \"option-data\": [ ],\n"
 "                \"relay\": {\n"
 "                    \"ip-addresses\": [ ]\n"
index 8666f63e3e9b03de4f699b27db292d3bf100dda1..55f2ff24c5c3f2061c530b2763f3d121baa37eca 100644 (file)
@@ -214,7 +214,7 @@ Network4::setSiaddr(const Optional<IOAddress>& siaddr) {
     siaddr_ = siaddr;
 }
 
-Optional<IOAddress>
+const Optional<IOAddress>&
 Network4::getSiaddr() const {
     return (siaddr_);
 }
index e864509e7ed31675ee0809c2643a745bea0029be..7e68a30dbf3bd6e13f20dacd313135e067f0da42 100644 (file)
@@ -464,7 +464,7 @@ public:
     /// @brief Returns siaddr for this network.
     ///
     /// @return siaddr value
-    util::Optional<asiolink::IOAddress> getSiaddr() const;
+    const util::Optional<asiolink::IOAddress>& getSiaddr() const;
 
     /// @brief Sets server hostname for the network.
     ///