summaryrefslogtreecommitdiff
path: root/controller
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2019-02-01 11:37:30 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2019-02-01 11:37:30 -0800
commit34c1023ba77799d94c8f3de546d187c430ed6a50 (patch)
treee44024bc8e4fd06fae7f41210f3f3d14866b422e /controller
parent82a21d4b718478a74d124cd311a1e917955a1183 (diff)
downloadinfinitytier-34c1023ba77799d94c8f3de546d187c430ed6a50.tar.gz
infinitytier-34c1023ba77799d94c8f3de546d187c430ed6a50.zip
Wrong criteria was wrong. Now with less wrong.
Diffstat (limited to 'controller')
-rw-r--r--controller/EmbeddedNetworkController.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/controller/EmbeddedNetworkController.cpp b/controller/EmbeddedNetworkController.cpp
index 96dde42f..203dcdd5 100644
--- a/controller/EmbeddedNetworkController.cpp
+++ b/controller/EmbeddedNetworkController.cpp
@@ -1521,12 +1521,9 @@ void EmbeddedNetworkController::_request(
const std::string ips = ipAssignments[i];
InetAddress ip(ips.c_str());
- // IP assignments are only pushed if there is a corresponding local route. We also now get the netmask bits from
- // this route, ignoring the netmask bits field of the assigned IP itself. Using that was worthless and a source
- // of user error / poor UX.
int routedNetmaskBits = -1;
for(unsigned int rk=0;rk<nc->routeCount;++rk) {
- if ( (!nc->routes[rk].via.ss_family) && (reinterpret_cast<const InetAddress *>(&(nc->routes[rk].target))->containsAddress(ip)) )
+ if (reinterpret_cast<const InetAddress *>(&(nc->routes[rk].target))->containsAddress(ip))
routedNetmaskBits = reinterpret_cast<const InetAddress *>(&(nc->routes[rk].target))->netmaskBits();
}