Commit a03c99b2 authored by Florian Westphal's avatar Florian Westphal Committed by David S. Miller

mptcp: setsockopt: SO_DEBUG and no-op options

Handle SO_DEBUG and set it on all subflows.
Ignore those values not implemented on TCP sockets.
Acked-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6f0d7198
......@@ -77,6 +77,9 @@ static void mptcp_sol_socket_sync_intval(struct mptcp_sock *msk, int optname, in
bool slow = lock_sock_fast(ssk);
switch (optname) {
case SO_DEBUG:
sock_valbool_flag(ssk, SOCK_DBG, !!val);
break;
case SO_KEEPALIVE:
if (ssk->sk_prot->keepalive)
ssk->sk_prot->keepalive(ssk, !!val);
......@@ -150,6 +153,7 @@ static int mptcp_setsockopt_sol_socket_int(struct mptcp_sock *msk, int optname,
case SO_KEEPALIVE:
mptcp_sol_socket_sync_intval(msk, optname, val);
return 0;
case SO_DEBUG:
case SO_MARK:
case SO_PRIORITY:
case SO_SNDBUF:
......@@ -246,9 +250,21 @@ static int mptcp_setsockopt_sol_socket(struct mptcp_sock *msk, int optname,
case SO_RCVBUFFORCE:
case SO_MARK:
case SO_INCOMING_CPU:
case SO_DEBUG:
return mptcp_setsockopt_sol_socket_int(msk, optname, optval, optlen);
case SO_LINGER:
return mptcp_setsockopt_sol_socket_linger(msk, optval, optlen);
case SO_NO_CHECK:
case SO_DONTROUTE:
case SO_BROADCAST:
case SO_BSDCOMPAT:
case SO_PASSCRED:
case SO_PASSSEC:
case SO_RXQ_OVFL:
case SO_WIFI_STATUS:
case SO_NOFCS:
case SO_SELECT_ERR_QUEUE:
return 0;
}
return sock_setsockopt(sk->sk_socket, SOL_SOCKET, optname, optval, optlen);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment