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

netlink.erl: Fix is_rt_dump #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pespin
Copy link

@pespin pespin commented Nov 3, 2023

https://kernel.org/doc/html/next/userspace-api/netlink/intro.html: """
For GET - NLM_F_ROOT and NLM_F_MATCH are combined into NLM_F_DUMP, and not used separately. NLM_F_ATOMIC is never used. """

This fixes nl_rt_dec() incorrectly entering the is_rt_dump() path when a response for create interface is received, because it has NLM_F_ROOT set but not NLM_F_MATCH, and hence before this patch it would make is_rtp_dump() incorrectly return true.

https://kernel.org/doc/html/next/userspace-api/netlink/intro.html:
"""
For GET - NLM_F_ROOT and NLM_F_MATCH are combined into NLM_F_DUMP,
and not used separately. NLM_F_ATOMIC is never used.
"""

This fixes nl_rt_dec() incorrectly entering the is_rt_dump() path when
a response for create interface is received, because it has NLM_F_ROOT
set but not NLM_F_MATCH, and hence before this patch it would make
is_rtp_dump() incorrectly return true.
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