From 7fea76c6c04f0ef44ac7a6dd0340a1ac5a18a3dd Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Wed, 22 Jul 2020 17:35:01 +0200 Subject: [PATCH] [#1333] Restored empty check --- src/lib/dhcpsrv/cfg_subnets4.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/dhcpsrv/cfg_subnets4.cc b/src/lib/dhcpsrv/cfg_subnets4.cc index 83870b0018..7c2ad2e98d 100644 --- a/src/lib/dhcpsrv/cfg_subnets4.cc +++ b/src/lib/dhcpsrv/cfg_subnets4.cc @@ -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