From 946e413997560d1bb714e6f7099429b18f9fecee Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 21 Feb 2017 17:55:00 -0800 Subject: properly fill out ifcfg files. also removed route re-add code for synology --- service/OneService.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'service/OneService.cpp') 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::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::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); } -- cgit v1.2.3