mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-11 15:27:57 +00:00
Do not listen on blocked networks
This commit is contained in:
parent
55bb0cfbb6
commit
91dace35a1
@ -619,9 +619,11 @@ bool AppInit2()
|
|||||||
} else {
|
} else {
|
||||||
struct in_addr inaddr_any;
|
struct in_addr inaddr_any;
|
||||||
inaddr_any.s_addr = INADDR_ANY;
|
inaddr_any.s_addr = INADDR_ANY;
|
||||||
fBound |= Bind(CService(inaddr_any, GetListenPort()));
|
if (!IsLimited(NET_IPV4))
|
||||||
|
fBound |= Bind(CService(inaddr_any, GetListenPort()));
|
||||||
#ifdef USE_IPV6
|
#ifdef USE_IPV6
|
||||||
fBound |= Bind(CService(in6addr_any, GetListenPort()));
|
if (!IsLimited(NET_IPV6))
|
||||||
|
fBound |= Bind(CService(in6addr_any, GetListenPort()));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (!fBound)
|
if (!fBound)
|
||||||
|
Loading…
Reference in New Issue
Block a user