lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 15 Jul 2022 01:11:12 +0300
From:   Alexander Babayants <babayants.alexander@...il.com>
To:     netdev@...r.kernel.org
Subject: recvmmsg() behaviour with MSG_PEEK flag

(sorry in advance - I'm not sure it is the right mailing list for the
question, if it is not, feel free to redirect me)

The behaviour of recvmmsg() with MSG_PEEK flag confuses me. I'd expect
it to peek multiple messages at once, but it seems to peek only the
first one, filling each of the provided struct msghdr with a copy of
the first message. I do not see if it is documented anywhere, is it a
bug or intended design?

What I want to achieve is to first peek into the socket, get the size
of each message, then allocate appropriate buffers and read the
messages with the second recvmmsg() call. This seems to be a
relatively common pattern for reading single messages via recvmsg(),
and I naively expected it to work with recvmmsg() too.

-- 
Regards,
Alexander Babayants.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ