diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-09-08 17:48:45 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-11-12 17:58:15 +0100 |
commit | 09c1ae1c01076f64fe0654f371200668306e5e18 (patch) | |
tree | ca15b563a5b6e39b53edafda7818c986cc7e7f4b /src/net.cpp | |
parent | 2f796e5fe7a51e4636600b320dc1995e048b4ba2 (diff) |
torcontrol improvements and fixes
- Force AUTHCOOKIE size to be 32 bytes: This provides protection against
an attack where a process pretends to be Tor and uses the cookie
authentication method to nab arbitrary files such as the
wallet
- torcontrol logging
- fix cookie auth
- add HASHEDPASSWORD auth, fix fd leak when fwrite() fails
- better error reporting when cookie file is not ok
- better init/shutdown flow
- stop advertizing service when disconnected from tor control port
- COOKIE->SAFECOOKIE auth
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index 9d01f2557e..ada4a1bb62 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -263,6 +263,14 @@ bool AddLocal(const CNetAddr &addr, int nScore) return AddLocal(CService(addr, GetListenPort()), nScore); } +bool RemoveLocal(const CService& addr) +{ + LOCK(cs_mapLocalHost); + LogPrintf("RemoveLocal(%s)\n", addr.ToString()); + mapLocalHost.erase(addr); + return true; +} + /** Make a particular network entirely off-limits (no automatic connects to it) */ void SetLimited(enum Network net, bool fLimited) { |