Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtnl: fix premature netlink reply receive abort #81

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

jow-
Copy link
Owner

@jow- jow- commented Jun 8, 2022

The nl_recvmsgs() logic in uc_nl_request() incorrectly stopped reading
the socket before the netlink ACK message was handled for non-multipart
replies.

This caused subsequent requests to incorrectly receive the ACK of the
previous request, leading to a failure to receive the actual reply.

Fix this issue by continue reading the socket until either the finish
callback for multipart (dump) messages or the ack callback for non-
multipart messages was received.

This fix is basically the same as the one applied to the nl80211 module
in 54ef6c0 ("nl80211: fix premature netlink reply receive abort").

Signed-off-by: Jo-Philipp Wich jo@mein.io

The nl_recvmsgs() logic in uc_nl_request() incorrectly stopped reading
the socket before the netlink ACK message was handled for non-multipart
replies.

This caused subsequent requests to incorrectly receive the ACK of the
previous request, leading to a failure to receive the actual reply.

Fix this issue by continue reading the socket until either the finish
callback for multipart (dump) messages or the ack callback for non-
multipart messages was received.

This fix is basically the same as the one applied to the nl80211 module
in 54ef6c0 ("nl80211: fix premature netlink reply receive abort").

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
@jow- jow- merged commit 22d3d32 into master Jun 8, 2022
@jow- jow- deleted the rtnl-fix-ack-handling branch June 8, 2022 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant