diff options
author | Marcin Siodelski <marcin@isc.org> | 2017-10-17 11:23:37 +0200 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2017-10-17 11:23:37 +0200 |
commit | 62f0e9a53a0f099f1ac9d3b718a51b0b7c4fe3db (patch) | |
tree | 354f7077b8c2e832ef9e85cbc8a68f81f6a0ab39 /src/lib/dhcpsrv/cfg_subnets4.cc | |
parent | [5376] Assign configured server identifier in outbound messages. (diff) | |
download | kea-62f0e9a53a0f099f1ac9d3b718a51b0b7c4fe3db.tar.xz kea-62f0e9a53a0f099f1ac9d3b718a51b0b7c4fe3db.zip |
[5376] Accept explicitly configured server identifiers in inbound msgs.
Diffstat (limited to 'src/lib/dhcpsrv/cfg_subnets4.cc')
-rw-r--r-- | src/lib/dhcpsrv/cfg_subnets4.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/dhcpsrv/cfg_subnets4.cc b/src/lib/dhcpsrv/cfg_subnets4.cc index e4aa7bf578..0e47c6d0fc 100644 --- a/src/lib/dhcpsrv/cfg_subnets4.cc +++ b/src/lib/dhcpsrv/cfg_subnets4.cc @@ -68,6 +68,13 @@ CfgSubnets4::getByPrefix(const std::string& subnet_text) const { return ((subnet_it != index.cend()) ? (*subnet_it) : ConstSubnet4Ptr()); } +bool +CfgSubnets4::hasSubnetWithServerId(const asiolink::IOAddress& server_id) const { + const auto& index = subnets_.get<SubnetServerIdIndexTag>(); + auto subnet_it = index.find(server_id); + return (subnet_it != index.cend()); +} + Subnet4Ptr CfgSubnets4::selectSubnet4o6(const SubnetSelector& selector) const { |