diff options
| author | Cambda Zhu <[email protected]> | 2023-05-27 04:03:17 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-05-30 05:03:48 +0000 |
| commit | 34dfde4ad87b84d21278a7e19d92b5b2c68e6c4d (patch) | |
| tree | 6060c0b9d42fe2feca0b59235ccb92f4740d7050 /drivers/platform/surface/aggregator/controller.c | |
| parent | tcp: deny tcp_disconnect() when threads are waiting (diff) | |
| download | kernel-34dfde4ad87b84d21278a7e19d92b5b2c68e6c4d.tar.gz kernel-34dfde4ad87b84d21278a7e19d92b5b2c68e6c4d.zip | |
tcp: Return user_mss for TCP_MAXSEG in CLOSE/LISTEN state if user_mss set
This patch replaces the tp->mss_cache check in getting TCP_MAXSEG
with tp->rx_opt.user_mss check for CLOSE/LISTEN sock. Since
tp->mss_cache is initialized with TCP_MSS_DEFAULT, checking if
it's zero is probably a bug.
With this change, getting TCP_MAXSEG before connecting will return
default MSS normally, and return user_mss if user_mss is set.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: Jack Yang <[email protected]>
Suggested-by: Eric Dumazet <[email protected]>
Link: https://lore.kernel.org/netdev/CANn89i+3kL9pYtkxkwxwNMzvC_w3LNUum_2=3u+UyLBmGmifHA@mail.gmail.com/#t
Signed-off-by: Cambda Zhu <[email protected]>
Link: https://lore.kernel.org/netdev/[email protected]/
Reviewed-by: Jason Xing <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/platform/surface/aggregator/controller.c')
0 files changed, 0 insertions, 0 deletions
