Skip to content

Commit 55f3657

Browse files
Geliang Tangintel-lab-lkp
authored andcommitted
mptcp: Handle TCP_MAXSEG getsockopt in common case
This patch simplifies MPTCP's TCP_MAXSEG getsockopt handling by moving it to the common case where other TCP options are processed. Previously it was handled separately after the main switch statement. The change: - Moves TCP_MAXSEG case into the main switch block - Removes redundant separate handling - Maintains identical functionality This improves code consistency without altering behavior. Signed-off-by: Geliang Tang <[email protected]>
1 parent 9a3f944 commit 55f3657

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

net/mptcp/sockopt.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,7 @@ static int mptcp_getsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
14041404
case TCP_FASTOPEN_CONNECT:
14051405
case TCP_FASTOPEN_KEY:
14061406
case TCP_FASTOPEN_NO_COOKIE:
1407+
case TCP_MAXSEG:
14071408
return mptcp_getsockopt_first_sf_only(msk, SOL_TCP, optname,
14081409
optval, optlen);
14091410
case TCP_INQ:
@@ -1428,9 +1429,6 @@ static int mptcp_getsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
14281429
return mptcp_put_int_option(msk, optval, optlen, msk->notsent_lowat);
14291430
case TCP_IS_MPTCP:
14301431
return mptcp_put_int_option(msk, optval, optlen, 1);
1431-
case TCP_MAXSEG:
1432-
return mptcp_getsockopt_first_sf_only(msk, SOL_TCP, optname,
1433-
optval, optlen);
14341432
}
14351433
return -EOPNOTSUPP;
14361434
}

0 commit comments

Comments
 (0)