aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-05-14 17:40:35 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-05-14 17:52:51 +0200
commit91dace35a1c7821675c369d60d1e88b2ed638842 (patch)
treebff12d156a2fbe1c8b06e72a0394015469df3b4c /src/init.cpp
parent55bb0cfbb6841372e4969b598f04dfc15a7687c0 (diff)
Do not listen on blocked networks
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 81a414a71d..9b12ab0aa4 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -619,9 +619,11 @@ bool AppInit2()
} else {
struct in_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
- fBound |= Bind(CService(in6addr_any, GetListenPort()));
+ if (!IsLimited(NET_IPV6))
+ fBound |= Bind(CService(in6addr_any, GetListenPort()));
#endif
}
if (!fBound)