A taken tunnel brings its ListenPort, even on a node the hub cannot dial
A home node behind NAT (no Endpoint → not Reachable) that took over a tunnel must still listen on that tunnel's port: its LAN peers dial it there. ListenPort was gated on Reachable, which conflated 'a peer dials me here' with 'the hub can dial me' — so the takeover guard refused overlay-up, and the guard's suggested remedy (re-place with an endpoint) breaks a NAT'd node's path: it stops keepalive and hands the hub a private LAN address to dial. TakeOver now carries the found tunnel's port (already known to the controller), and the interface listens on it when the node is not otherwise reachable. Two tests; Endpoint-reachable nodes keep the old path unchanged.
This commit is contained in:
@@ -50,6 +50,11 @@ type TakeOver struct {
|
||||
Interface string
|
||||
Unit string
|
||||
Config string
|
||||
// Port is the port the found tunnel listened on. The mesh's interface must listen on it too,
|
||||
// even on a node that is not dialable from the hub: a home node's LAN peers dial it there
|
||||
// (novox/hq: a taken tunnel brings its port). Listening is "a peer dials me here"; it is not
|
||||
// "the hub can dial me", which is Reachable — the two were conflated.
|
||||
Port int
|
||||
}
|
||||
|
||||
// HostPrefix is one address as a route: /32 for IPv4, /128 for IPv6.
|
||||
|
||||
Reference in New Issue
Block a user