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

Change behavior of Subscribe to non-blocking. Fix test. #941

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

kuroa-me
Copy link
Contributor

@kuroa-me kuroa-me commented Jan 8, 2024

When listening for IPv6 address changes, I found that a netlink socket that is subscribed to a group is not returning from Receive when there is message in the socket. After some researching, I found that libnl suggest setting socket to non-blocking when subscribing to groups. Ref This is probably caused by a bug in kernel.

My test machine runs in 5.10, before, addrSubscribeAt would only exit on timeout; after the patch, it correctly sending addr to channels on each new addr.

Also fixed test related to BareUDP, which requires "bareudp" kmod. Ref

When listening for IPv6 address changes, I found that subscribe is not returning when there is message in the socket. After some researching, I found that libnl suggest setting socket to non-blocking when subscribing to groups. (Ref)[https://www.infradead.org/~tgr/libnl/doc/core.html#:~:text=best%20to%20put%20the%20socket%20in%20non-blocking%20mode]

Also fixed test related to BareUDP, which requires "bareudp" kmod. (Ref)[https://www.kernelconfig.io/config_bareudp]
@aboch
Copy link
Collaborator

aboch commented Mar 1, 2024

LGTM

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.

2 participants