]> git.karo-electronics.de Git - karo-tx-linux.git/commit
net: recvmmsg: Strip MSG_WAITFORONE when calling recvmsg
authorAnton Blanchard <anton@samba.org>
Tue, 17 May 2011 19:38:57 +0000 (15:38 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Jun 2011 00:31:26 +0000 (09:31 +0900)
commit9aefae678abf4ba79f97983dd014135c3d46f96a
tree5b7b65f1a51feb73b601a1f6ac51dadabdff949a
parent61d0510ca043687e6671321be87124a4acb4a0cd
net: recvmmsg: Strip MSG_WAITFORONE when calling recvmsg

commit b9eb8b8752804cecbacdb4d24b52e823cf07f107 upstream.

recvmmsg fails on a raw socket with EINVAL. The reason for this is
packet_recvmsg checks the incoming flags:

        err = -EINVAL;
        if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC|MSG_CMSG_COMPAT|MSG_ERRQUEUE))
                goto out;

This patch strips out MSG_WAITFORONE when calling recvmmsg which
fixes the issue.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/socket.c