Route re-add patch for linux build on Synology devices

This commit is contained in:
Joseph Henry 2017-02-16 16:41:26 -08:00
parent 61b413b57f
commit b5b335a6f8
3 changed files with 12 additions and 1 deletions

View file

@ -1088,12 +1088,17 @@ public:
}
}
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());
#else
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
}
n.managedIps.swap(newManagedIps);
}