summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2018-06-04 11:07:12 -0700
committerGrant Limberg <grant.limberg@zerotier.com>2018-06-11 09:53:00 -0700
commit4199c56e99ca68b0f7aa01aeab04ceff7e8ece1d (patch)
treec18702f31c1063f86029dbdc23af33a07e08a089
parenta9ca26c6985d10d1c86a33c56b06c1ae679cda0f (diff)
downloadinfinitytier-4199c56e99ca68b0f7aa01aeab04ceff7e8ece1d.tar.gz
infinitytier-4199c56e99ca68b0f7aa01aeab04ceff7e8ece1d.zip
cant compare character arrays with ==
-rw-r--r--service/OneService.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/service/OneService.cpp b/service/OneService.cpp
index 04d8c8df..091beacc 100644
--- a/service/OneService.cpp
+++ b/service/OneService.cpp
@@ -1608,11 +1608,13 @@ public:
// Nuke applied routes that are no longer in n.config.routes[] and/or are not allowed
for(std::list< SharedPtr<ManagedRoute> >::iterator mr(n.managedRoutes.begin());mr!=n.managedRoutes.end();) {
bool haveRoute = false;
+
if ( (checkIfManagedIsAllowed(n,(*mr)->target())) && (((*mr)->via().ss_family != (*mr)->target().ss_family)||(!matchIpOnly(myIps,(*mr)->via()))) ) {
for(unsigned int i=0;i<n.config.routeCount;++i) {
const InetAddress *const target = reinterpret_cast<const InetAddress *>(&(n.config.routes[i].target));
const InetAddress *const via = reinterpret_cast<const InetAddress *>(&(n.config.routes[i].via));
- if ( ((*mr)->target() == *target) && ( ((via->ss_family == target->ss_family)&&((*mr)->via().ipsEqual(*via))) || (tapdev == (*mr)->device()) ) ) {
+
+ if ( ((*mr)->target() == *target) && ( ((via->ss_family == target->ss_family)&&((*mr)->via().ipsEqual(*via))) || (strcmp(tapdev,(*mr)->device())) ) ) {
haveRoute = true;
break;
}