Added logic to show blocked IPv6 addresses
This commit is contained in:
parent
5fb892eb55
commit
428ba970c1
13
src/api.hpp
13
src/api.hpp
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user