diff --git a/src/stratum.cpp b/src/stratum.cpp index c4e2fc161..5d20e8a7c 100644 --- a/src/stratum.cpp +++ b/src/stratum.cpp @@ -123,10 +123,8 @@ namespace { // better to use anonymous namespace for helper routines if (mapMultiArgs.count("-stratumallowip")) { const std::vector& vAllow = mapMultiArgs["-stratumallowip"]; for(const std::string& strAllow : vAllow) { - CNetAddr netaddr; - // todo: v6 - LookupHost(strAllow.c_str(), netaddr, false); - CSubNet subnet(netaddr); + CSubNet subnet; + LookupSubNet(strAllow.c_str(), subnet); if (!subnet.IsValid()) { uiInterface.ThreadSafeMessageBox( strprintf("Invalid -stratumallowip subnet specification: %s. Valid are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24).", strAllow),