diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-29 10:47:53 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-07-16 11:35:53 +0000 |
commit | 65c40049633f0c5db3c24af8716bb683520f368c (patch) | |
tree | 9531d5d4c2cfa4e5a5b1ac35cea13af1b173ccbe /src/p2p/net_node_common.h | |
parent | p2p: store network address directly in blocked host list (diff) | |
download | monero-65c40049633f0c5db3c24af8716bb683520f368c.tar.xz |
allow blocking whole subnets
Diffstat (limited to 'src/p2p/net_node_common.h')
-rw-r--r-- | src/p2p/net_node_common.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/p2p/net_node_common.h b/src/p2p/net_node_common.h index e5e746e5b..34d151f5f 100644 --- a/src/p2p/net_node_common.h +++ b/src/p2p/net_node_common.h @@ -57,6 +57,7 @@ namespace nodetool virtual bool block_host(const epee::net_utils::network_address &address, time_t seconds = 0)=0; virtual bool unblock_host(const epee::net_utils::network_address &address)=0; virtual std::map<epee::net_utils::network_address, time_t> get_blocked_hosts()=0; + virtual std::map<epee::net_utils::ipv4_network_subnet, time_t> get_blocked_subnets()=0; virtual bool add_host_fail(const epee::net_utils::network_address &address)=0; virtual void add_used_stripe_peer(const t_connection_context &context)=0; virtual void remove_used_stripe_peer(const t_connection_context &context)=0; @@ -116,6 +117,10 @@ namespace nodetool { return std::map<epee::net_utils::network_address, time_t>(); } + virtual std::map<epee::net_utils::ipv4_network_subnet, time_t> get_blocked_subnets() + { + return std::map<epee::net_utils::ipv4_network_subnet, time_t>(); + } virtual bool add_host_fail(const epee::net_utils::network_address &address) { return true; |