aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/main.cpp
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2020-10-28 23:47:42 +0000
committerHoward Chu <hyc@symas.com>2020-11-11 12:19:13 +0000
commita8cd073fcc504de51b8f56766757f0295b68e066 (patch)
tree4f8ffcc0cae9a3965d661a9acf4c3e1b6c037909 /src/daemon/main.cpp
parentMerge pull request #6997 (diff)
downloadmonero-a8cd073fcc504de51b8f56766757f0295b68e066.tar.xz
Add rpc-restricted-bind-ip option
Fixes #6369
Diffstat (limited to '')
-rw-r--r--src/daemon/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp
index 3db8fbcb4..d413906df 100644
--- a/src/daemon/main.cpp
+++ b/src/daemon/main.cpp
@@ -66,10 +66,12 @@ uint16_t parse_public_rpc_port(const po::variables_map &vm)
}
std::string rpc_port_str;
+ std::string rpc_bind_address = command_line::get_arg(vm, cryptonote::rpc_args::descriptors().rpc_bind_ip);
const auto &restricted_rpc_port = cryptonote::core_rpc_server::arg_rpc_restricted_bind_port;
if (!command_line::is_arg_defaulted(vm, restricted_rpc_port))
{
rpc_port_str = command_line::get_arg(vm, restricted_rpc_port);
+ rpc_bind_address = command_line::get_arg(vm, cryptonote::rpc_args::descriptors().rpc_restricted_bind_ip);
}
else if (command_line::get_arg(vm, cryptonote::core_rpc_server::arg_restricted_rpc))
{
@@ -86,7 +88,6 @@ uint16_t parse_public_rpc_port(const po::variables_map &vm)
throw std::runtime_error("invalid RPC port " + rpc_port_str);
}
- const auto rpc_bind_address = command_line::get_arg(vm, cryptonote::rpc_args::descriptors().rpc_bind_ip);
const auto address = net::get_network_address(rpc_bind_address, rpc_port);
if (!address) {
throw std::runtime_error("failed to parse RPC bind address");