From 34c1023ba77799d94c8f3de546d187c430ed6a50 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 1 Feb 2019 11:37:30 -0800 Subject: Wrong criteria was wrong. Now with less wrong. --- controller/EmbeddedNetworkController.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'controller') 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;rkrouteCount;++rk) { - if ( (!nc->routes[rk].via.ss_family) && (reinterpret_cast(&(nc->routes[rk].target))->containsAddress(ip)) ) + if (reinterpret_cast(&(nc->routes[rk].target))->containsAddress(ip)) routedNetmaskBits = reinterpret_cast(&(nc->routes[rk].target))->netmaskBits(); } -- cgit v1.2.3