aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node_common.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-13 14:16:03 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-20 02:09:58 +0000
commite9abfea165ff49c43f80c2678cda00136f7dc9ca (patch)
tree8dc94db791c678fbeb022b8e3eb87f868a15fdf2 /src/p2p/net_node_common.h
parentMerge pull request #7102 (diff)
downloadmonero-e9abfea165ff49c43f80c2678cda00136f7dc9ca.tar.xz
Optional DNS based blocklist
If enabled, pulls IPs to block on blocklist.moneropulse.*, and blocks then for 8 days (so IPs dropping from the list will eventually get unblocked, and DNS failures don't result in instant clearing of the blocklist). Enable with --enable-dns-blocklist
Diffstat (limited to '')
-rw-r--r--src/p2p/net_node_common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/p2p/net_node_common.h b/src/p2p/net_node_common.h
index f1490a0db..0da758ad4 100644
--- a/src/p2p/net_node_common.h
+++ b/src/p2p/net_node_common.h
@@ -58,7 +58,7 @@ namespace nodetool
virtual uint64_t get_public_connections_count()=0;
virtual void for_each_connection(std::function<bool(t_connection_context&, peerid_type, uint32_t)> f)=0;
virtual bool for_connection(const boost::uuids::uuid&, std::function<bool(t_connection_context&, peerid_type, uint32_t)> f)=0;
- virtual bool block_host(epee::net_utils::network_address address, time_t seconds = 0)=0;
+ virtual bool block_host(epee::net_utils::network_address address, time_t seconds = 0, bool add_only = false)=0;
virtual bool unblock_host(const epee::net_utils::network_address &address)=0;
virtual std::map<std::string, time_t> get_blocked_hosts()=0;
virtual std::map<epee::net_utils::ipv4_network_subnet, time_t> get_blocked_subnets()=0;
@@ -108,7 +108,7 @@ namespace nodetool
{
return false;
}
- virtual bool block_host(epee::net_utils::network_address address, time_t seconds)
+ virtual bool block_host(epee::net_utils::network_address address, time_t seconds, bool add_only)
{
return true;
}