cmd/containerboot: clamp MSS to PMTU for proxy group pods (#19686)
Single-pod ingress/egress proxies already called ClampMSSToPMTU when setting up forwarding rules, but the proxy group (HA) code paths in egressservices.go and ingressservices.go did not. This caused TCP connections through proxy group pods to suffer from MSS/MTU mismatch issues in environments where path MTU discovery is not working. Add ClampMSSToPMTU calls in the egress sync loop (alongside the existing EnsureSNATForDst call) and in addDNATRuleForSvc (alongside the existing EnsureDNATRuleForSvc call), mirroring what the single-pod forwarding rules already do. Also add MSS clamping assertions to TestSyncIngressConfigs and track ClampMSSToPMTU calls in FakeNetfilterRunner. Fixes issue #19812 https://github.com/tailscale/tailscale/issues/19812. Tracking internal ticket TSS-86326. Signed-off-by: Jay Tung <ltung@crusoeenergy.com> Co-authored-by: Jay Tung <ltung@crusoeenergy.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,8 @@ type FakeNetfilterRunner struct {
|
||||
TailscaleServiceIP netip.Addr
|
||||
ClusterIP netip.Addr
|
||||
}
|
||||
// clampedAddrs tracks addresses passed to ClampMSSToPMTU.
|
||||
clampedAddrs []netip.Addr
|
||||
}
|
||||
|
||||
// NewFakeNetfilterRunner creates a new FakeNetfilterRunner.
|
||||
@@ -83,7 +85,15 @@ func (f *FakeNetfilterRunner) DNATWithLoadBalancer(origDst netip.Addr, dsts []ne
|
||||
}
|
||||
func (f *FakeNetfilterRunner) EnsureSNATForDst(src, dst netip.Addr) error { return nil }
|
||||
func (f *FakeNetfilterRunner) DNATNonTailscaleTraffic(tun string, dst netip.Addr) error { return nil }
|
||||
func (f *FakeNetfilterRunner) ClampMSSToPMTU(tun string, addr netip.Addr) error { return nil }
|
||||
func (f *FakeNetfilterRunner) ClampMSSToPMTU(tun string, addr netip.Addr) error {
|
||||
f.clampedAddrs = append(f.clampedAddrs, addr)
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetClampedAddrs returns the addresses passed to ClampMSSToPMTU.
|
||||
func (f *FakeNetfilterRunner) GetClampedAddrs() []netip.Addr {
|
||||
return f.clampedAddrs
|
||||
}
|
||||
func (f *FakeNetfilterRunner) AddMagicsockPortRule(port uint16, network string) error { return nil }
|
||||
func (f *FakeNetfilterRunner) DelMagicsockPortRule(port uint16, network string) error { return nil }
|
||||
func (f *FakeNetfilterRunner) DeletePortMapRuleForSvc(svc, tun string, targetIP netip.Addr, pm PortMap) error {
|
||||
|
||||
Reference in New Issue
Block a user