hartkopp / can-isotp

Linux Kernel Module for ISO 15765-2:2016 CAN transport protocol PLEASE NOTE: This module is part of the mainline Linux kernel since version 5.10
Other
248 stars 71 forks source link

Added MSG_PEEK to the allowed flags check in isotp_recvmsg function #52

Closed derek-will closed 2 years ago

derek-will commented 2 years ago

To be able to get the size of the buffer to allocate for the next message without removing the message from the receive queue, the caller needs to be able to set the flags to MSG_PEEK | MSG_TRUNC.

This patch restores the ability of the caller to set the MSG_PEEK flag in a call to recv which was accidentally removed while adding support for the MSG_TRUNC flag in this commit.