Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: return error if an incomplete message was read
If recvmsg indicates that the message read was truncated libnl retries to read the complete message after increasing the message buffer. This only works if the message flags MSG_PEEK | MSG_TRUNC are set. If NL_MSG_PEEK is not enabled on the nl_sock structure, flags are left empty and the rest of the truncated message is discarded, hence a subsequent recvmsg returns the next message (in case of a multipart message, the NLMSG_DONE) is read and returned. This patch aborts message processing if the message was truncated and the NL_MSG_PEEK flags was not activated for the nl_sock structure. http://lists.infradead.org/pipermail/libnl/2015-June/001888.html [thaller@redhat.com: add NL_CAPABILITY_NL_RECV_FAIL_TRUNK_NO_PEEK] Signed-off-by: Thomas Egerer <hakke_007@gmx.de> Signed-off-by: Thomas Haller <thaller@redhat.com>
- Loading branch information
1 parent
e206c25
commit bbdcaea
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters