Added logic to show blocked IPv6 addresses

This commit is contained in:
Pavel Odintsov 2020-12-13 18:58:19 +00:00
parent 5fb892eb55
commit 428ba970c1
2 changed files with 14 additions and 1 deletions

View File

@ -12,6 +12,19 @@
writer->Write(reply);
}
// IPv6
std::map<subnet_ipv6_cidr_mask_t, banlist_item_t> ban_list_copy;
// Get whole ban list content atomically
ban_list_ipv6_ng.get_whole_banlist(ban_list_copy);
for (auto itr : ban_list_copy) {
BanListReply reply;
reply.set_ip_address( print_ipv6_cidr_subnet(itr.first) );
writer->Write(reply);
}
return Status::OK;
}

View File

@ -80,7 +80,7 @@ class FastnetmonClient {
std::cerr << "Could not connect to API server. Timeout exceed" << std::endl;
return;
} else {
std::cerr << "RPC failed " + status.error_message();
std::cerr << "RPC failed " + status.error_message() << std::endl;
return;
}
}