aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2014-11-23 15:12:50 -0800
committerWladimir J. van der Laan <laanwj@gmail.com>2014-11-24 15:33:46 +0100
commitcd5164aba2ff5f0e9f449e2b1bf50198311e8d7f (patch)
tree736b5557ca3c061813c5f6b8c05c79af8e0f7c66
parent25b49b5b45a7b43460c6da4d4cd5d6bc613cfab9 (diff)
downloadbitcoin-cd5164aba2ff5f0e9f449e2b1bf50198311e8d7f.tar.xz
Make -proxy set all network types, avoiding a connect leak.
Previously -proxy was not setting the proxy for IsLimited networks, so if you set your configuration to be onlynet=tor you wouldn't get an IPv4 proxy set. The payment protocol gets its proxy configuration from the IPv4 proxy, and so it would experience a connection leak. This addresses issue #5355 and also clears up a cosmetic bug where getinfo proxy output shows nothing when onlynet=tor is set. Conflicts: src/init.cpp Rebased-From: 3c777141349ad82d679a278df0619968af53c23 Github-Issue: #5358
-rw-r--r--src/init.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp
index de66151710..6f9abcafdc 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -728,11 +728,9 @@ bool AppInit2(boost::thread_group& threadGroup)
if (!addrProxy.IsValid())
return InitError(strprintf(_("Invalid -proxy address: '%s'"), mapArgs["-proxy"]));
- if (!IsLimited(NET_IPV4))
- SetProxy(NET_IPV4, addrProxy, nSocksVersion);
+ SetProxy(NET_IPV4, addrProxy, nSocksVersion);
if (nSocksVersion > 4) {
- if (!IsLimited(NET_IPV6))
- SetProxy(NET_IPV6, addrProxy, nSocksVersion);
+ SetProxy(NET_IPV6, addrProxy, nSocksVersion);
SetNameProxy(addrProxy, nSocksVersion);
}
fProxy = true;