瀏覽代碼

We don't bind to non-local IP for TCP yet, but eliminate double check.

Adam Ierymenko 8 年之前
父節點
當前提交
ee5bd57d40
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      service/OneService.cpp

+ 1 - 3
service/OneService.cpp

@@ -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;