diff options
author | brunoerg <brunoely.gc@gmail.com> | 2022-09-13 18:19:40 -0300 |
---|---|---|
committer | brunoerg <brunoely.gc@gmail.com> | 2023-05-30 16:27:21 -0300 |
commit | fb3e812277041f239b97b88689a5076796d75b9b (patch) | |
tree | bfaeb888b221b38215901edf332fe54bec7ec4fd /src/httpserver.cpp | |
parent | 71300489af362c3fed4736de6bffab4d758b6a84 (diff) |
p2p: return `CSubNet` in `LookupSubNet`
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r-- | src/httpserver.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 128c4e3c56..e4ba6c3a95 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -173,8 +173,7 @@ static bool InitHTTPAllowList() rpc_allow_subnets.push_back(CSubNet{LookupHost("127.0.0.1", false).value(), 8}); // always allow IPv4 local subnet rpc_allow_subnets.push_back(CSubNet{LookupHost("::1", false).value()}); // always allow IPv6 localhost for (const std::string& strAllow : gArgs.GetArgs("-rpcallowip")) { - CSubNet subnet; - LookupSubNet(strAllow, subnet); + const CSubNet subnet{LookupSubNet(strAllow)}; if (!subnet.IsValid()) { uiInterface.ThreadSafeMessageBox( strprintf(Untranslated("Invalid -rpcallowip 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), |