From 91dace35a1c7821675c369d60d1e88b2ed638842 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 14 May 2012 17:40:35 +0200 Subject: [PATCH] Do not listen on blocked networks --- src/init.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 81a414a71de..9b12ab0aa42 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)