bsc/p2p/discover
Felix Lange a98d1d67d6 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.
2016-11-22 22:21:18 +01:00
..
database_test.go p2p/discover: support incomplete node URLs, add Resolve 2015-12-17 23:38:54 +01:00
database.go ethdb, p2p/discover: replace "alloted" with "allotted" (#2785) 2016-07-12 11:42:47 +02:00
node_test.go p2p/discover: support incomplete node URLs, add Resolve 2015-12-17 23:38:54 +01:00
node.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
ntp.go p2p/discover: emphasize warning, add 10 min cooldown 2016-02-24 12:16:28 +02:00
table_test.go p2p/discover, p2p/discv5: prevent relay of invalid IPs and low ports 2016-11-22 22:21:18 +01:00
table.go p2p/discover: prevent bonding self 2016-05-02 18:50:16 +02:00
udp_test.go p2p/discover, p2p/discv5: prevent relay of invalid IPs and low ports 2016-11-22 22:21:18 +01:00
udp.go p2p/discover, p2p/discv5: prevent relay of invalid IPs and low ports 2016-11-22 22:21:18 +01:00