aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2022-01-08 13:44:17 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2022-03-28 08:49:13 +0000
commit0b6161db7eff92a37bc6d410ff9c9d5c3ac6f443 (patch)
tree1635f9e22042f3f45d6db184a7a91e87e768021a
parenteb22b73358784341115c83b81eba5303789484b0 (diff)
linux: fix linux_recvmsg() MSG_PEEK flag handling
Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33790 (cherry picked from commit 96c524d8b2c9abe3927abf948fbbd73a7cb42c4a)
-rw-r--r--sys/compat/linux/linux_socket.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index a2b45edf7bdc..d51b9945b434 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -1538,6 +1538,12 @@ linux_recvmsg_common(struct thread *td, l_int s, struct l_msghdr *msghdr,
if (error != 0)
return (error);
+ /*
+ * Pass user-supplied recvmsg() flags in msg_flags field,
+ * following sys_recvmsg() convention.
+ */
+ linux_msghdr.msg_flags = flags;
+
error = linux_to_bsd_msghdr(msg, &linux_msghdr);
if (error != 0)
return (error);