aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/discv5/net_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-04-091-2/+2
|
* p2p, swarm, trie: avoid copying slices in loops (#17265)Oleg Kovalov2018-08-071-1/+1
|
* p2p: fix some golint warnings (#16577)kiel barry2018-05-081-10/+10
|
* p2p, p2p/discover, p2p/discv5: implement UDP port sharing (#15200)Felföldi Zsolt2018-01-221-1/+1
| | | | | | | | | | | | | | | This commit affects p2p/discv5 "topic discovery" by running it on the same UDP port where the old discovery works. This is realized by giving an "unhandled" packet channel to the old v4 discovery packet handler where all invalid packets are sent. These packets are then processed by v5. v5 packets are always invalid when interpreted by v4 and vice versa. This is ensured by adding one to the first byte of the packet hash in v5 packets. DiscoveryV5Bootnodes is also changed to point to new bootnodes that are implementing the changed packet format with modified hash. Existing and new v5 bootnodes are both running on different ports ATM.
* all: gofmt -w -sFelix Lange2017-01-061-13/+13
|
* p2p, p2p/discover, p2p/discv5: add IP network restriction featureFelix Lange2016-11-231-1/+1
| | | | | | The p2p packages can now be configured to restrict all communication to a certain subset of IP networks. This feature is meant to be used for private networks.
* p2p/discover, p2p/discv5: prevent relay of invalid IPs and low portsFelix Lange2016-11-231-12/+15
| | | | | | | | | | | | | | | | | | | | | 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.
* p2p/discv5: added new topic discovery packageZsolt Felfoldi2016-11-091-0/+371