summaryrefslogtreecommitdiff
path: root/service/OneService.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-11-14 15:29:36 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-11-14 15:29:36 -0800
commitee5bd57d40f793baaf596a038f1446b29b1e86a4 (patch)
tree13baf88681f671ce6ad7fc71d52e8f4478b6e980 /service/OneService.cpp
parente26bee45fb2ed78bc1984886da0ffc48d8f5a102 (diff)
downloadinfinitytier-ee5bd57d40f793baaf596a038f1446b29b1e86a4.tar.gz
infinitytier-ee5bd57d40f793baaf596a038f1446b29b1e86a4.zip
We don't bind to non-local IP for TCP yet, but eliminate double check.
Diffstat (limited to 'service/OneService.cpp')
-rw-r--r--service/OneService.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/service/OneService.cpp b/service/OneService.cpp
index 30e6c938..fcbccd63 100644
--- a/service/OneService.cpp
+++ b/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;