Skip to content

Commit 62b4902

Browse files
committed
[#1333] Checkpoint: code done - unit tests to update
1 parent f3074c9 commit 62b4902

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/lib/dhcpsrv/cfg_subnets4.cc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,19 +398,17 @@ CfgSubnets4::selectSubnet(const std::string& iface,
398398
Subnet4Ptr subnet_selected;
399399

400400
// First, try subnet specific interface name.
401-
if (!(*subnet)->getIface().empty()) {
402-
if ((*subnet)->getIface() == iface) {
403-
subnet_selected = (*subnet);
404-
}
401+
if ((*subnet)->getIface(Network4::Inheritance::NONE) == iface) {
402+
subnet_selected = (*subnet);
405403

406404
} else {
407405
// Interface not specified for a subnet, so let's try if
408406
// we can match with shared network specific setting of
409407
// the interface.
410408
SharedNetwork4Ptr network;
411409
(*subnet)->getSharedNetwork(network);
412-
if (network && !network->getIface().empty() &&
413-
(network->getIface() == iface)) {
410+
if (network &&
411+
(network->getIface(Network4::Inheritance::NONE) == iface)) {
414412
subnet_selected = (*subnet);
415413
}
416414
}

src/lib/dhcpsrv/network.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class Network : public virtual isc::data::StampedElement,
251251
util::Optional<std::string>
252252
getIface(const Inheritance& inheritance = Inheritance::ALL) const {
253253
return (getProperty<Network>(&Network::getIface, iface_name_,
254-
inheritance, "interface"));
254+
inheritance));
255255
};
256256

257257
/// @brief Sets information about relay

0 commit comments

Comments
 (0)