zebra
zebra copied to clipboard
Zebra should auto-discover its own external IP address
Is your feature request related to a problem? Please describe.
In #1890, we allow users to manually configure an external IP address for Zebra. But we can also detect this address automatically.
Describe the solution you'd like
This ticket depends on #1890. It also uses the unsolicited address advertisements in #1892.
If an IPv4 or IPv6 external address is not configured:
- [x] advertise the internal bind address, if it is a public IP address
- [ ] otherwise, track the IPv4 and IPv6 addresses sent by peers in
Version.address_recv
- [ ] advertise the most popular IPv4 and IPv6 addresses using unsolicited
Addr
messages (see #1892) - [ ] regularly remove addresses from old handshakes, so that nodes which change addresses learn their new addresses more quickly
- but always keep at least one IPv4 or IPv6 address