diff options
Diffstat (limited to 'src/rpc/net.cpp')
-rw-r--r-- | src/rpc/net.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index b85c7b2e1a..c23becd4a9 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -494,8 +494,11 @@ UniValue setban(const UniValue& params, bool fHelp) if (params[0].get_str().find("/") != string::npos) isSubnet = true; - if (!isSubnet) - netAddr = CNetAddr(params[0].get_str()); + if (!isSubnet) { + CNetAddr resolved; + LookupHost(params[0].get_str().c_str(), resolved, false); + netAddr = resolved; + } else subNet = CSubNet(params[0].get_str()); |