mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-16 12:06:55 +02:00
We don't bind to non-local IP for TCP yet, but eliminate double check.
This commit is contained in:
parent
e26bee45fb
commit
ee5bd57d40
1 changed files with 1 additions and 3 deletions
|
@ -1259,12 +1259,10 @@ public:
|
|||
|
||||
inline void phyOnTcpAccept(PhySocket *sockL,PhySocket *sockN,void **uptrL,void **uptrN,const struct sockaddr *from)
|
||||
{
|
||||
if ((!from)||(reinterpret_cast<const InetAddress *>(from)->ipScope() != InetAddress::IP_SCOPE_LOOPBACK)) {
|
||||
// Non-Loopback: deny (for now)
|
||||
if (!from) {
|
||||
_phy.close(sockN,false);
|
||||
return;
|
||||
} else {
|
||||
// Loopback == HTTP JSON API request
|
||||
TcpConnection *tc = new TcpConnection();
|
||||
_tcpConnections.insert(tc);
|
||||
tc->type = TcpConnection::TCP_HTTP_INCOMING;
|
||||
|
|
Loading…
Add table
Reference in a new issue