aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/net.cpp
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2016-05-31 13:05:52 -0400
committerCory Fields <cory-nospam-@coryfields.com>2016-07-31 13:24:07 -0400
commit31d6b1d5f0414d8b356d8cb9c99961d8a04d6c0a (patch)
treee1044a96d479c66c639528276d54f674b5103ae8 /src/rpc/net.cpp
parent6caf3ee061a86d89b965dc8a61a95d1f34015805 (diff)
net: Split resolving out of CNetAddr
Diffstat (limited to 'src/rpc/net.cpp')
-rw-r--r--src/rpc/net.cpp7
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());