mptcp: add SNDTIMEO setsockopt support
authorGeliang Tang <geliang.tang@suse.com>
Wed, 16 Feb 2022 02:11:23 +0000 (18:11 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 17 Feb 2022 04:52:03 +0000 (20:52 -0800)
Add setsockopt support for SO_SNDTIMEO_OLD and SO_SNDTIMEO_NEW to fix this
error reported by the mptcp bpf selftest:

 (network_helpers.c:64: errno: Operation not supported) Failed to set SO_SNDTIMEO
 test_mptcp:FAIL:115

 All error logs:

 (network_helpers.c:64: errno: Operation not supported) Failed to set SO_SNDTIMEO
 test_mptcp:FAIL:115
 Summary: 0/0 PASSED, 0 SKIPPED, 1 FAILED

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/sockopt.c

index dacf3cee00273f303e67ce0d81092f976fad2f2f..f949d22f52bd2cfc813b7b3f33381d1647cc9cd5 100644 (file)
@@ -343,6 +343,8 @@ static int mptcp_setsockopt_sol_socket(struct mptcp_sock *msk, int optname,
        case SO_RCVLOWAT:
        case SO_RCVTIMEO_OLD:
        case SO_RCVTIMEO_NEW:
+       case SO_SNDTIMEO_OLD:
+       case SO_SNDTIMEO_NEW:
        case SO_BUSY_POLL:
        case SO_PREFER_BUSY_POLL:
        case SO_BUSY_POLL_BUDGET: