good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 32301a4d authored by Péter Szilágyi's avatar Péter Szilágyi
Browse files

p2p/discover: validate bond against lastpong, not db presence

parent 4e61ed02
No related branches found
No related tags found
No related merge requests found
......@@ -613,7 +613,7 @@ func (req *findnode) handle(t *udp, from *net.UDPAddr, fromID NodeID, mac []byte
if expired(req.Expiration) {
return errExpired
}
if t.db.node(fromID) == nil {
if age := time.Since(t.db.lastPong(fromID)); age > nodeDBNodeExpiration {
// No bond exists, we don't process the packet. This prevents
// an attack vector where the discovery protocol could be used
// to amplify traffic in a DDOS attack. A malicious actor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment