summaryrefslogtreecommitdiff
path: root/service/OneService.cpp
diff options
context:
space:
mode:
authorJoseph Henry <josephjah@gmail.com>2017-02-21 17:55:00 -0800
committerJoseph Henry <josephjah@gmail.com>2017-02-21 17:55:00 -0800
commit946e413997560d1bb714e6f7099429b18f9fecee (patch)
tree19f6030dfe2290bb81e58c58c5f7c1ec41ad32ef /service/OneService.cpp
parente4135ffb351020b135695ac800c7ac33d1200c1e (diff)
downloadinfinitytier-946e413997560d1bb714e6f7099429b18f9fecee.tar.gz
infinitytier-946e413997560d1bb714e6f7099429b18f9fecee.zip
properly fill out ifcfg files. also removed route re-add code for synology
Diffstat (limited to 'service/OneService.cpp')
-rw-r--r--service/OneService.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/service/OneService.cpp b/service/OneService.cpp
index dc3e0ed1..81950e26 100644
--- a/service/OneService.cpp
+++ b/service/OneService.cpp
@@ -1087,18 +1087,17 @@ public:
fprintf(stderr,"ERROR: unable to remove ip address %s" ZT_EOL_S, ip->toString().c_str());
}
}
- for(std::vector<InetAddress>::iterator ip(newManagedIps.begin());ip!=newManagedIps.end();++ip) {
#ifdef __SYNOLOGY__
- if (!n.tap->addIp(*ip))
- fprintf(stderr,"ERROR: unable to add ip address %s" ZT_EOL_S, ip->toString().c_str());
+ if (!n.tap->addIpSyn(newManagedIps))
+ fprintf(stderr,"ERROR: unable to add ip addresses to ifcfg" ZT_EOL_S);
#else
+ for(std::vector<InetAddress>::iterator ip(newManagedIps.begin());ip!=newManagedIps.end();++ip) {
if (std::find(n.managedIps.begin(),n.managedIps.end(),*ip) == n.managedIps.end()) {
-
if (!n.tap->addIp(*ip))
fprintf(stderr,"ERROR: unable to add ip address %s" ZT_EOL_S, ip->toString().c_str());
- }
-#endif
+ }
}
+#endif
n.managedIps.swap(newManagedIps);
}