Commit f1fabbe3 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[3242] Use new IfaceMgr::getAddress function in CfgMgr.

parent 3d817285
......@@ -248,14 +248,12 @@ CfgMgr::belongsToSubnet4(const std::string& iface_name) const {
if (iface == NULL) {
isc_throw(isc::BadValue, "interface " << iface_name << " doesn't exist");
}
for (Iface::AddressCollection::const_iterator addr = iface->getAddresses().begin();
addr != iface->getAddresses().end(); ++addr) {
if (addr->isV4()) {
for (Subnet4Collection::const_iterator subnet = subnets4_.begin();
subnet != subnets4_.end(); ++subnet) {
if ((*subnet)->inRange(*addr)) {
return (true);
}
IOAddress addr("::1");
if (iface->getAddress4(addr)) {
for (Subnet4Collection::const_iterator subnet = subnets4_.begin();
subnet != subnets4_.end(); ++subnet) {
if ((*subnet)->inRange(addr)) {
return (true);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment