mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
Ignore getaddr requests from outbound peers.
This change reduces fingerprinting attacks and mimics Bitcoin Core commit dca799e1db6e319fdd47e0bfdb038eab0efabb85
This commit is contained in:
parent
2cc85ef428
commit
dea7ef364c
6
peer.go
6
peer.go
@ -1150,6 +1150,12 @@ func (p *peer) handleGetAddrMsg(msg *wire.MsgGetAddr) {
|
||||
return
|
||||
}
|
||||
|
||||
// Do not accept getaddr requests from outbound peers. This reduces
|
||||
// fingerprinting attacks.
|
||||
if !p.inbound {
|
||||
return
|
||||
}
|
||||
|
||||
// Get the current known addresses from the address manager.
|
||||
addrCache := p.server.addrManager.AddressCache()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user