topology: simplify local address configuration #4489
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The router interface section of the topology.json file previously had two fields to specify the local address of the router:
The idea was that normally only
public
is supplied. When behind NAT, thenbind
could override the IP address on which the router binds locally, andpublic
would be the address that is visible to the remote router. The only place where this could be relevant is the router BFD keep-alive messages, as these contain the local address of the router in the SCION address header. There is, however, no check that enforces that this matches the underlay address.In practice, if
bind
is supplied, the IP ofpublic
has simply been ignored.This change replaces
public
andbind
with a newlocal
field. The old fields are deprecated, but still processed for backwards compatibility.The
local
support omitting the IP to bind on any local IP. This was previously possible only by explicitly configuring a zero IP address.Aside:
net.UDPAddr
tonetip.AddrPort
. Note that this changes the representation in the json dump of the/topology
status page.