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
1 changed files with 6 additions and 0 deletions
6
peer.go
6
peer.go
|
@ -1150,6 +1150,12 @@ func (p *peer) handleGetAddrMsg(msg *wire.MsgGetAddr) {
|
||||||
return
|
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.
|
// Get the current known addresses from the address manager.
|
||||||
addrCache := p.server.addrManager.AddressCache()
|
addrCache := p.server.addrManager.AddressCache()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue