mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Windows feedback loop fix
This commit is contained in:
parent
70b1b4ecc7
commit
0456a71295
2 changed files with 51 additions and 40 deletions
|
@ -136,7 +136,9 @@ public:
|
|||
PIP_ADAPTER_UNICAST_ADDRESS ua = a->FirstUnicastAddress;
|
||||
while (ua) {
|
||||
InetAddress ip(ua->Address.lpSockaddr);
|
||||
if (ifChecker.shouldBindInterface("",ip)) {
|
||||
char strBuf[128] = { 0 };
|
||||
wcstombs(strBuf, a->FriendlyName, sizeof(strBuf));
|
||||
if (ifChecker.shouldBindInterface(strBuf,ip)) {
|
||||
switch(ip.ipScope()) {
|
||||
default: break;
|
||||
case InetAddress::IP_SCOPE_PSEUDOPRIVATE:
|
||||
|
|
|
@ -2946,7 +2946,8 @@ public:
|
|||
if ((l) && (!l->empty())) {
|
||||
memcpy(result, &((*l)[(unsigned long)_node->prng() % l->size()]), sizeof(struct sockaddr_storage));
|
||||
return 1;
|
||||
} else return 0;
|
||||
}
|
||||
else return 0;
|
||||
}
|
||||
|
||||
inline void tapFrameHandler(uint64_t nwid, const MAC& from, const MAC& to, unsigned int etherType, unsigned int vlanId, const void* data, unsigned int len)
|
||||
|
@ -2966,10 +2967,12 @@ public:
|
|||
|
||||
try {
|
||||
scode = handleControlPlaneHttpRequest(tc->remoteAddr, tc->parser.method, tc->url, tc->headers, tc->readq, data, contentType);
|
||||
} catch (std::exception &exc) {
|
||||
}
|
||||
catch (std::exception& exc) {
|
||||
fprintf(stderr, "WARNING: unexpected exception processing control HTTP request: %s" ZT_EOL_S, exc.what());
|
||||
scode = 500;
|
||||
} catch ( ... ) {
|
||||
}
|
||||
catch (...) {
|
||||
fprintf(stderr, "WARNING: unexpected exception processing control HTTP request: unknown exception" ZT_EOL_S);
|
||||
scode = 500;
|
||||
}
|
||||
|
@ -3024,6 +3027,12 @@ public:
|
|||
if ((ifname[0] == 't') && (ifname[1] == 'a') && (ifname[2] == 'p')) return false; // tap# is probably an OpenVPN tunnel or similar
|
||||
if ((ifname[0] == 'u') && (ifname[1] == 't') && (ifname[2] == 'u') && (ifname[3] == 'n')) return false; // ... as is utun#
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
if ((ifname[0] == 'Z') && (ifname[1] == 'e') && (ifname[2] == 'r') && ifname[3] == 'o' &&
|
||||
(ifname[4] == 'T') && (ifname[5] == 'i') && (ifname[6] == 'e') && (ifname[7] == 'r')) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
Mutex::Lock _l(_localConfig_m);
|
||||
|
|
Loading…
Add table
Reference in a new issue