]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#652] Addressed review comments
authorMarcin Siodelski <marcin@isc.org>
Wed, 9 Dec 2020 14:30:30 +0000 (15:30 +0100)
committerMarcin Siodelski <marcin@isc.org>
Wed, 9 Dec 2020 15:24:46 +0000 (16:24 +0100)
Fixed a typo and small impl change in network.

src/lib/dhcpsrv/network.cc
src/lib/dhcpsrv/tests/shared_network_unittest.cc

index 8aeb6d58a8f4737f021df19b60124c1bb79beeb0..5fc4f86c66e2cff265bf1c551aed6283bb5bab97 100644 (file)
@@ -363,9 +363,8 @@ Network6::toElement() const {
     }
 
     // Set interface-id
-    const OptionPtr& ifaceid = getInterfaceId(Network::Inheritance::NONE);
-    if (ifaceid) {
-        std::vector<uint8_t> bin = ifaceid->getData();
+    if (interface_id_) {
+        std::vector<uint8_t> bin = interface_id_->getData();
         std::string ifid;
         ifid.resize(bin.size());
         if (!bin.empty()) {
index 1bf24e78e17d44c2c55d66fe2af526ce1550ad05..0f407a226dabe1a9e69d80f56620a26cc05e98a7 100644 (file)
@@ -1346,7 +1346,7 @@ TEST(SharedNetwork6Test, unparse) {
     subnet2->addRelayAddress(IOAddress("2001:db8:1::8"));
 
     // Set subnet specific interface-id for subnet2. This is to ensure that
-    // the subnet specific value is not overriden by shared network specific
+    // the subnet specific value is not overridden by shared network specific
     // value.
     std::string subnet_interface_id_value = "vlan222";
     OptionBuffer subnet_iface_id_buffer(subnet_interface_id_value.begin(),