diff options
author | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-05-25 20:03:51 +0200 |
---|---|---|
committer | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-06-17 21:40:55 +0200 |
commit | 433fb1a95d7a96a033d7454e198d274e92108865 (patch) | |
tree | 51e371e3e270d5b7485414549b4e27e19cde1a87 /src/netbase.cpp | |
parent | e8b93473f12ec901f965cd244a7437646ee66c43 (diff) |
[RPC] extend setban to allow subnets
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r-- | src/netbase.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp index e3cb4e706f..b7c77fda6b 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -1330,6 +1330,11 @@ bool operator!=(const CSubNet& a, const CSubNet& b) return !(a==b); } +bool operator<(const CSubNet& a, const CSubNet& b) +{ + return (a.network < b.network || (a.network == b.network && memcmp(a.netmask, b.netmask, 16))); +} + #ifdef WIN32 std::string NetworkErrorString(int err) { |