Go-ethereum: Reject enode URLs with `[::]` or `0.0.0.0` addresses

Created on 27 Aug 2018  路  2Comments  路  Source: ethereum/go-ethereum

If Geth cannot figure out the external IP address of a node via UPnP, it will list the enode url with a placeholder of either [::] (ipv6) or 0.0.0.0 (ipv4). Geth however doesn't (AFAIK) validate this field when a user does an admin.addPeer or other peer management routine. We should probable reject these and print a nice warning so the user has a clue what's wrong.

Most helpful comment

@karalabe I'd like to fix it :)

All 2 comments

@karalabe I'd like to fix it :)

Closing this because the current behavior is as follows:

  • If an incomplete URL is passed as bootnode, geth doesn't start.
  • If an incomplete URL is used with admin_addPeer, the IP is resolved through the DHT.
Was this page helpful?
0 / 5 - 0 ratings