net: Split resolving out of CSubNet
This commit is contained in:
@@ -1101,7 +1101,8 @@ bool AppInit2(Config& config, boost::thread_group& threadGroup, CScheduler& sche
|
||||
|
||||
if (mapArgs.count("-whitelist")) {
|
||||
BOOST_FOREACH(const std::string& net, mapMultiArgs["-whitelist"]) {
|
||||
CSubNet subnet(net);
|
||||
CSubNet subnet;
|
||||
LookupSubNet(net.c_str(), subnet);
|
||||
if (!subnet.IsValid())
|
||||
return InitError(strprintf(_("Invalid netmask specified in -whitelist: '%s'"), net));
|
||||
CNode::AddWhitelistedRange(subnet);
|
||||
|
||||
Reference in New Issue
Block a user