When two visors share the same public IP address (e.g., on the same LAN behind NAT), transports between them should be handled specially to avoid suboptimal routing: Routes that include hops between same-IP visors create unnecessary loops
Current State
- The Address Resolver already detects same-IP visors and sets IsLocal: true in VisorData (see pkg/address-resolver/api/api.go:307-309)
- The transport network client uses this flag for connection optimization
- However, the Transport Discovery (TPD) does not store or expose this information
- Local route calculation has no awareness of same-IP transports
Proposed Solution
- TPD: Add is_local or same_ip flag to transport entries (don't modify
/all-transports ; only /metrics)
- At registration time, TPD could query AR for both edges' IPs and compare
- Or accept the flag from the registering visor
- Route calculation: Filter or deprioritize same-IP transports
- Route finder should exclude these from routes to external destinations
- Local route calculation should do the same
- Routes including transports between visors at the same public ip address could still be used when the destination is on the same IP or at user discretion - but by default not used.
Related
- VisorData.IsLocal flag: pkg/transport/network/addrresolver/client.go:74
- Same-IP detection: pkg/address-resolver/api/api.go:307-311
- Transport Entry struct: pkg/transport/entry.go:33
When two visors share the same public IP address (e.g., on the same LAN behind NAT), transports between them should be handled specially to avoid suboptimal routing: Routes that include hops between same-IP visors create unnecessary loops
Current State
Proposed Solution
/all-transports; only/metrics)-
At registration time, TPD could query AR for both edges' IPs and compare-
Oraccept the flag from the registering visor- Route finder should exclude these from routes to external destinations
- Local route calculation should do the same
- Routes including transports between visors at the same public ip address could still be used when the destination is on the same IP or at user discretion - but by default not used.
Related