diff options
author | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-06-29 20:37:22 +0200 |
---|---|---|
committer | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-07-02 20:44:27 +0200 |
commit | 177a0e491449b9accfa0cf17c138147539071358 (patch) | |
tree | 163b252ea7c7204017187f1e0e32ce12831fb7f0 /src/net.cpp | |
parent | 409bccfbf52b531b2a9d60ac2308f56223931a2e (diff) |
Adding CSubNet constructor over a single CNetAddr
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp index ade34f5754..950311ee3a 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -488,7 +488,7 @@ bool CNode::IsBanned(CSubNet subnet) } void CNode::Ban(const CNetAddr& addr, const BanReason &banReason, int64_t bantimeoffset, bool sinceUnixEpoch) { - CSubNet subNet(addr.ToString()+(addr.IsIPv4() ? "/32" : "/128")); + CSubNet subNet(addr); Ban(subNet, banReason, bantimeoffset, sinceUnixEpoch); } @@ -511,7 +511,7 @@ void CNode::Ban(const CSubNet& subNet, const BanReason &banReason, int64_t banti } bool CNode::Unban(const CNetAddr &addr) { - CSubNet subNet(addr.ToString()+(addr.IsIPv4() ? "/32" : "/128")); + CSubNet subNet(addr); return Unban(subNet); } |