mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-18 21:16:54 +02:00
stupid bug is stupid
This commit is contained in:
parent
ff931e53b5
commit
1fe251d0a0
1 changed files with 2 additions and 2 deletions
|
@ -1318,7 +1318,7 @@ public:
|
|||
froms = _udp[(++_udpPortPickerCounter & 0x4) >> 2].v4s;
|
||||
} else {
|
||||
// If sender specifies a local address, find it by just checking port since right now we always bind wildcard
|
||||
for(int k=1;k<2;++k) {
|
||||
for(int k=1;k<=2;++k) {
|
||||
// Match fast on port only, since right now we always bind wildcard
|
||||
if (reinterpret_cast<const struct sockaddr_in *>(&(_udp[k].v4a))->sin_port == reinterpret_cast<const struct sockaddr_in *>(localAddr)->sin_port) {
|
||||
froms = _udp[k].v4s;
|
||||
|
@ -1370,7 +1370,7 @@ public:
|
|||
} else if (addr->ss_family == AF_INET6) {
|
||||
if (reinterpret_cast<const struct sockaddr_in6 *>(localAddr)->sin6_port != 0) {
|
||||
// If sender specifies a local address, find it by just checking port since right now we always bind wildcard
|
||||
for(int k=1;k<2;++k) {
|
||||
for(int k=1;k<=2;++k) {
|
||||
// Match fast on port only, since right now we always bind wildcard
|
||||
if (reinterpret_cast<const struct sockaddr_in6 *>(&(_udp[k].v6a))->sin6_port == reinterpret_cast<const struct sockaddr_in6 *>(localAddr)->sin6_port) {
|
||||
froms = _udp[k].v6s;
|
||||
|
|
Loading…
Add table
Reference in a new issue