mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-20 21:43:08 +00:00
Merge pull request #1430 from zerotier/mac-managed-route-issue-1104
Don't use v6 source addresses for v4 routes
This commit is contained in:
commit
20050662b2
@ -2047,7 +2047,7 @@ public:
|
||||
unsigned int mostMatchingPrefixBits = 0;
|
||||
for(std::set<InetAddress>::const_iterator i(myIps.begin());i!=myIps.end();++i) {
|
||||
const unsigned int matchingPrefixBits = i->matchingPrefixBits(*target);
|
||||
if (matchingPrefixBits >= mostMatchingPrefixBits) {
|
||||
if (matchingPrefixBits >= mostMatchingPrefixBits && ((target->isV4() && i->isV4()) || (target->isV6() && i->isV6()))) {
|
||||
mostMatchingPrefixBits = matchingPrefixBits;
|
||||
src = &(*i);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user