dht: Apply blocklist to incoming packets

This commit is contained in:
Matt Joiner 2015-04-01 17:37:32 +11:00
parent 97c235440c
commit 4cb3e94a91
1 changed files with 3 additions and 0 deletions

View File

@ -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))
}
}