]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2663] Addressed CID 1517207
authorFrancis Dupont <fdupont@isc.org>
Thu, 1 Dec 2022 22:45:54 +0000 (23:45 +0100)
committerFrancis Dupont <fdupont@isc.org>
Thu, 8 Dec 2022 16:56:23 +0000 (17:56 +0100)
src/lib/dhcpsrv/cfg_subnets4.cc
src/lib/dhcpsrv/cfg_subnets6.cc

index cd339cf39becec5906bc9d312449fc6313cae90b..9e5c7a33ccbad6f4f69c39ca5bc4630a9625b504 100644 (file)
@@ -505,6 +505,7 @@ CfgSubnets4::getLinks(const IOAddress& link_addr, uint8_t& link_len) const {
         }
         uint8_t plen = subnet->get().second;
         if (!link_len_set || (plen < link_len)) {
+            link_len_set = true;
             link_len = plen;
         }
         links.insert(subnet->getID());
index 92464b51d62113d0a2783e1c371b69ee74ebfd36..dcd4db83132bd1aa95d178be814fbc64d437c9a6 100644 (file)
@@ -392,6 +392,7 @@ CfgSubnets6::getLinks(const IOAddress& link_addr, uint8_t& link_len) const {
         }
         uint8_t plen = subnet->get().second;
         if (!link_len_set || (plen < link_len)) {
+            link_len_set = true;
             link_len = plen;
         }
         links.insert(subnet->getID());