diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-02-18 00:47:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-18 00:47:44 +0800 |
commit | 9fd76e33af367752160ab0e33d1097e1e9aff6e4 (patch) | |
tree | 2cead3501991bb474f0a50727b625fea75700797 /p2p/discover/udp.go | |
parent | 4e61ed02e2d32aa38f5a2f37b87bc52a71657809 (diff) | |
parent | aeedec4078647c22244552803c88521391224ab1 (diff) | |
download | dexon-9fd76e33af367752160ab0e33d1097e1e9aff6e4.tar dexon-9fd76e33af367752160ab0e33d1097e1e9aff6e4.tar.gz dexon-9fd76e33af367752160ab0e33d1097e1e9aff6e4.tar.bz2 dexon-9fd76e33af367752160ab0e33d1097e1e9aff6e4.tar.lz dexon-9fd76e33af367752160ab0e33d1097e1e9aff6e4.tar.xz dexon-9fd76e33af367752160ab0e33d1097e1e9aff6e4.tar.zst dexon-9fd76e33af367752160ab0e33d1097e1e9aff6e4.zip |
Merge pull request #16109 from karalabe/p2p-bond-check
p2p/discover: validate bond against lastpong, not db presence
Diffstat (limited to 'p2p/discover/udp.go')
-rw-r--r-- | p2p/discover/udp.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/p2p/discover/udp.go b/p2p/discover/udp.go index e40de2c36..524c6e498 100644 --- a/p2p/discover/udp.go +++ b/p2p/discover/udp.go @@ -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 !t.db.hasBond(fromID) { // 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 |