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:
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user