p2p: ignore empty IP from DNS block list

ie, if the list ends in ;
This commit is contained in:
moneromooo-monero 2021-01-01 12:30:14 +00:00
parent a1eca8ca7e
commit f208d98492
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -2014,6 +2014,8 @@ namespace nodetool
boost::split(ips, record, boost::is_any_of(";")); boost::split(ips, record, boost::is_any_of(";"));
for (const auto &ip: ips) for (const auto &ip: ips)
{ {
if (ip.empty())
continue;
const expect<epee::net_utils::network_address> parsed_addr = net::get_network_address(ip, 0); const expect<epee::net_utils::network_address> parsed_addr = net::get_network_address(ip, 0);
if (!parsed_addr) if (!parsed_addr)
{ {