From cb9d80f4940ee5d4b7c7cad7418a6c893c6c4279 Mon Sep 17 00:00:00 2001 From: Paolo Abeni Date: Fri, 23 Apr 2021 11:17:05 -0700 Subject: mptcp: implement dummy MSG_ERRQUEUE support mptcp_recvmsg() currently silently ignores MSG_ERRQUEUE, returning input data instead of error cmsg. This change provides a dummy implementation for MSG_ERRQUEUE - always returns no data. That is consistent with the current lack of a suitable IP_RECVERR setsockopt() support. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller --- net/mptcp/protocol.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'net/mptcp/protocol.c') diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index c14ac2975736..1d5f23bd640c 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1945,6 +1945,10 @@ static int mptcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int target; long timeo; + /* MSG_ERRQUEUE is really a no-op till we support IP_RECVERR */ + if (unlikely(flags & MSG_ERRQUEUE)) + return inet_recv_error(sk, msg, len, addr_len); + if (msg->msg_flags & ~(MSG_WAITALL | MSG_DONTWAIT)) return -EOPNOTSUPP; -- cgit v1.2.3