summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/cfg_subnets6.cc
diff options
context:
space:
mode:
authorMarcin Siodelski <marcin@isc.org>2019-05-23 18:15:01 +0200
committerMarcin Siodelski <marcin@isc.org>2019-05-24 08:54:29 +0200
commitdf1ace626ddc5d6635ea90507235366ff11ac6a0 (patch)
tree4a35694dfa50e9f4cd0aa22758b6226d9f22bb34 /src/lib/dhcpsrv/cfg_subnets6.cc
parent[#620,!332] Network level relay address is taken into account for subnet selc... (diff)
downloadkea-df1ace626ddc5d6635ea90507235366ff11ac6a0.tar.xz
kea-df1ace626ddc5d6635ea90507235366ff11ac6a0.zip
[#620,!332] Addressed review comments.
Diffstat (limited to 'src/lib/dhcpsrv/cfg_subnets6.cc')
-rw-r--r--src/lib/dhcpsrv/cfg_subnets6.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/dhcpsrv/cfg_subnets6.cc b/src/lib/dhcpsrv/cfg_subnets6.cc
index aa86bbd8c3..d30b212fe5 100644
--- a/src/lib/dhcpsrv/cfg_subnets6.cc
+++ b/src/lib/dhcpsrv/cfg_subnets6.cc
@@ -250,26 +250,26 @@ CfgSubnets6::selectSubnet(const asiolink::IOAddress& address,
// If the specified address matches a relay address, return this
// subnet.
if ((*subnet)->hasRelays()) {
- if (!(*subnet)->hasRelayAddress(address) ||
- !(*subnet)->clientSupported(client_classes)) {
+ if (!(*subnet)->hasRelayAddress(address)) {
continue;
}
} else {
SharedNetwork6Ptr network;
(*subnet)->getSharedNetwork(network);
- if (!network || !network->hasRelayAddress(address) ||
- !network->clientSupported(client_classes)) {
+ if (!network || !network->hasRelayAddress(address)) {
continue;
}
}
- // The relay address is matching the one specified for a subnet
- // or a shared network.
- LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE,
- DHCPSRV_CFGMGR_SUBNET6_RELAY)
- .arg((*subnet)->toText()).arg(address.toText());
- return (*subnet);
+ if ((*subnet)->clientSupported(client_classes)) {
+ // The relay address is matching the one specified for a subnet
+ // or its shared network.
+ LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE,
+ DHCPSRV_CFGMGR_SUBNET6_RELAY)
+ .arg((*subnet)->toText()).arg(address.toText());
+ return (*subnet);
+ }
}
}