[RPC] extend setban to allow subnets

This commit is contained in:
Jonas Schnelli
2015-05-25 20:03:51 +02:00
parent e8b93473f1
commit 433fb1a95d
7 changed files with 139 additions and 34 deletions

View File

@@ -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)
{