[RPC] extend setban to allow subnets

This commit is contained in:
Jonas Schnelli
2015-05-25 20:03:51 +02:00
committed by Jack Grigg
parent 445cd761c5
commit e521939942
7 changed files with 139 additions and 34 deletions

View File

@@ -1340,6 +1340,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)
{