From 4cb3e94a91e0bd2c1659f759d3fb50e55601c552 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 1 Apr 2015 17:37:32 +1100 Subject: [PATCH] dht: Apply blocklist to incoming packets --- dht/dht.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dht/dht.go b/dht/dht.go index 737449e5..1bdb9ab5 100644 --- a/dht/dht.go +++ b/dht/dht.go @@ -572,6 +572,9 @@ func (s *Server) serve() error { logonce.Stderr.Printf("received dht packet exceeds buffer size") continue } + if s.ipBlocked(util.AddrIP(addr)) { + continue + } s.processPacket(b[:n], newDHTAddr(addr)) } } -- 2.48.1