diff options
| author | Gregory Maxwell <[email protected]> | 2012-05-14 09:22:03 -0700 |
|---|---|---|
| committer | Gregory Maxwell <[email protected]> | 2012-05-14 09:22:03 -0700 |
| commit | a6f18e4686d764a62905b8d8cd316dcbd40bb17d (patch) | |
| tree | bff12d156a2fbe1c8b06e72a0394015469df3b4c /src/net.cpp | |
| parent | Merge pull request #1291 from sipa/canonames (diff) | |
| parent | Do not listen on blocked networks (diff) | |
| download | discoin-a6f18e4686d764a62905b8d8cd316dcbd40bb17d.tar.xz discoin-a6f18e4686d764a62905b8d8cd316dcbd40bb17d.zip | |
Merge pull request #1299 from sipa/ipv6fixes
A few more IPv6-related improvements
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp index 88578cdcb..e48b30095 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -245,14 +245,21 @@ bool AddLocal(const CNetAddr &addr, int nScore) /** Make a particular network entirely off-limits (no automatic connects to it) */ void SetLimited(enum Network net, bool fLimited) { + if (net == NET_UNROUTABLE) + return; LOCK(cs_mapLocalHost); vfLimited[net] = fLimited; } -bool IsLimited(const CNetAddr& addr) +bool IsLimited(enum Network net) { LOCK(cs_mapLocalHost); - return vfLimited[addr.GetNetwork()]; + return vfLimited[net]; +} + +bool IsLimited(const CNetAddr &addr) +{ + return IsLimited(addr.GetNetwork()); } /** vote for a local address */ |