mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-19 21:03:57 -07:00
Fix for GitHub issue #36 on OSX... results in a duplicate entry for IPv6 link-local but seems okay... need to test on OSX 10.6 though.
This commit is contained in:
parent
117e6fb356
commit
64231aa3f0
3 changed files with 102 additions and 21 deletions
|
@ -148,10 +148,15 @@ public:
|
|||
for(std::set<InetAddress>::iterator i(allIps.begin());i!=allIps.end();++i)
|
||||
addIP(*i);
|
||||
std::set<InetAddress> myIps(ips());
|
||||
bool haveV6LinkLocal = false;
|
||||
for(std::set<InetAddress>::iterator i(myIps.begin());i!=myIps.end();++i) {
|
||||
if (!allIps.count(*i))
|
||||
if ((i->isV6())&&(i->isLinkLocal()))
|
||||
haveV6LinkLocal = true;
|
||||
else if (!allIps.count(*i))
|
||||
removeIP(*i);
|
||||
}
|
||||
if (!haveV6LinkLocal)
|
||||
addIP(InetAddress::makeIpv6LinkLocal(_mac));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue