]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1333] Restored empty check
authorFrancis Dupont <fdupont@isc.org>
Wed, 22 Jul 2020 15:35:01 +0000 (17:35 +0200)
committerFrancis Dupont <fdupont@isc.org>
Tue, 15 Sep 2020 17:51:42 +0000 (19:51 +0200)
src/lib/dhcpsrv/cfg_subnets4.cc

index 83870b00189abd85a0966f2a3ff0b067f01b8f38..7c2ad2e98d4430784d0681a2b1a6d019c7d37fa9 100644 (file)
@@ -398,8 +398,10 @@ CfgSubnets4::selectSubnet(const std::string& iface,
         Subnet4Ptr subnet_selected;
 
         // First, try subnet specific interface name.
-       if ((*subnet)->getIface(Network4::Inheritance::NONE) == iface) {
-            subnet_selected = (*subnet);
+        if (!(*subnet)->getIface(Network4::Inheritance::NONE).empty()) {
+            if ((*subnet)->getIface(Network4::Inheritance::NONE) == iface) {
+                subnet_selected = (*subnet);
+            }
 
         } else {
             // Interface not specified for a subnet, so let's try if