The mesh's interface takes over the found tunnel's MTU
Carries MTU from the reported tunnel (mesh-host#28) through inventory, the overlay graph's TakeOver, into the generated config's [Interface]. A tuned path keeps its MTU across the takeover instead of regressing to 1420 and hanging transfers no ping would reveal. Two emit tests; a tunnel with no MTU writes no line.
This commit is contained in:
@@ -130,6 +130,12 @@ func config(node Node, peers []Peer, keyPath string) string {
|
||||
// with an endpoint — the guard's suggested remedy — breaks a NAT'd node's path.
|
||||
fmt.Fprintf(&b, "ListenPort = %d\n", node.TakesOver.Port)
|
||||
}
|
||||
// The MTU the found tunnel carried, when it set one: a path tuned to 1380 (say) stalls TLS
|
||||
// and hangs transfers if the mesh's interface comes up at the 1420 default, and no ping shows
|
||||
// it (novox/hq: a taken tunnel carries its MTU).
|
||||
if node.TakesOver != nil && node.TakesOver.MTU != 0 {
|
||||
fmt.Fprintf(&b, "MTU = %d\n", node.TakesOver.MTU)
|
||||
}
|
||||
// The private key is set from a file the node wrote, so it never appears here and never
|
||||
// travelled. Everything else in this file came from the mesh; this one line is the node's.
|
||||
fmt.Fprintf(&b, "PostUp = wg set %%i private-key %s\n", keyPath)
|
||||
|
||||
Reference in New Issue
Block a user