Re: [PATCH net-next] net: advertise TCP MSS from the configured MTU, not the learned PMTU
From: Jiayuan Chen
Date: Fri Aug 14 2026 - 06:45:34 EST
On 8/14/26 5:21 PM, Eric Dumazet wrote:
On Fri, Aug 14, 2026 at 8:36 AM Jiayuan Chen <jiayuan.chen@xxxxxxxxx> wrote:
The MSS a host puts in its SYN tells the peer how big a segment it may
send us. Right now we can shrink it with a PMTU we learned on our own
send path, which is the wrong direction entirely.
On asymmetric paths this bites - think DSR load balancers, where the
request side goes through a smaller-MTU overlay. We learn a small PMTU
going out, then advertise a small MSS, and the peer stays capped for the
whole connection even though its path back to us is wide. MSS only shows
up in the SYN and never grows back.
On symmetric paths we lose nothing by dropping it either: the peer runs
its own PMTU discovery and usually already knows the real path MTU.
So work out the advertised MSS from the configured route or device MTU
and ignore the learned PMTU. Our send side is unchanged, still clamped by
tcp_current_mss(). Add ip_dst_mtu_configured()/ip6_dst_mtu_configured()
and use them from the two default_advmss() paths.
Signed-off-by: Jiayuan Chen <jiayuan.chen@xxxxxxxxx>
LGTM, but this probably needs Fixes: tags and should be sent to net tree.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Fixes: 164a5e7ad531 ("ipv4: ipv4_default_advmss() should use route mtu")
Cc: stable@xxxxxxxxxxxxxxx
I added the following packetdrill test, please add it in a series.
commit f0c619ca446b669c48b5c2e2c78e23af1a0850b6
Author: Eric Dumazet <edumazet@xxxxxxxxxx>
Thanks Eric, I will do it after cold time.