Skip to content

Commit 5e6a3ce

Browse files
xemuldavem330
authored andcommitted
tcp: Report mss_clamp with TCP_MAXSEG option in repair mode
The mss_clamp is the only connection-time negotiated option which cannot be obtained from the user space. Make the TCP_MAXSEG sockopt report one in the repair mode. Signed-off-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c0e88ff commit 5e6a3ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/ipv4/tcp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,6 +2659,8 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
26592659
val = tp->mss_cache;
26602660
if (!val && ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_LISTEN)))
26612661
val = tp->rx_opt.user_mss;
2662+
if (tp->repair)
2663+
val = tp->rx_opt.mss_clamp;
26622664
break;
26632665
case TCP_NODELAY:
26642666
val = !!(tp->nonagle&TCP_NAGLE_OFF);

0 commit comments

Comments
 (0)