diff options
author | Felix Lange <fjl@twurst.com> | 2016-11-22 01:11:54 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-11-23 05:21:18 +0800 |
commit | a98d1d67d6192df0bd57f608921a82cc508eee18 (patch) | |
tree | 49eb8ce8813e8f53cf7d949b2d7dd0ef575713e8 /p2p/dial_test.go | |
parent | ba2884f3431312c616e21f57deeb03a7c4374d57 (diff) | |
download | go-tangerine-a98d1d67d6192df0bd57f608921a82cc508eee18.tar go-tangerine-a98d1d67d6192df0bd57f608921a82cc508eee18.tar.gz go-tangerine-a98d1d67d6192df0bd57f608921a82cc508eee18.tar.bz2 go-tangerine-a98d1d67d6192df0bd57f608921a82cc508eee18.tar.lz go-tangerine-a98d1d67d6192df0bd57f608921a82cc508eee18.tar.xz go-tangerine-a98d1d67d6192df0bd57f608921a82cc508eee18.tar.zst go-tangerine-a98d1d67d6192df0bd57f608921a82cc508eee18.zip |
p2p/discover, p2p/discv5: prevent relay of invalid IPs and low ports
The discovery DHT contains a number of hosts with LAN and loopback IPs.
These get relayed because some implementations do not perform any checks
on the IP.
go-ethereum already prevented relay in most cases because it verifies
that the host actually exists before adding it to the local table. But
this verification causes other issues. We have received several reports
where people's VPSs got shut down by hosting providers because sending
packets to random LAN hosts is indistinguishable from a slow port scan.
The new check prevents sending random packets to LAN by discarding LAN
IPs sent by Internet hosts (and loopback IPs from LAN and Internet
hosts). The new check also blacklists almost all currently registered
special-purpose networks assigned by IANA to avoid inciting random
responses from services in the LAN.
As another precaution against abuse of the DHT, ports below 1024 are now
considered invalid.
Diffstat (limited to 'p2p/dial_test.go')
0 files changed, 0 insertions, 0 deletions