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

zebra: Don't bind netns ID netlink socket to mcast groups #16854

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

Conversation

leonshaw
Copy link
Contributor

The netlink socket in zebra_ns_id_get() is only used to get netns id. There's no need to subscribe to multicast groups. In some heavy-loaded cases, unexpected notification races with normal reply message and causes failure:

zebra[110338]: [NMNEE-JJKPF][EC 4043309094] netlink recvmsg: bad sequence number 505ac8 (expected 66ea845f)

BTW, to subscribe to RTNLGRP_NSID, nl_groups should be 1 << (RTNLGRP_NSID - 1). This code has never worked as expected.

The netlink socket in `zebra_ns_id_get()` is only used to get netns id.
There's no need to subscribe to multicast groups. In some heavy-loaded
cases, unexpected notification races with normal reply message and
causes failure:

    zebra[110338]: [NMNEE-JJKPF][EC 4043309094] netlink recvmsg: bad sequence number 505ac8 (expected 66ea845f)

BTW, to subscribe to RTNLGRP_NSID, `nl_groups` should be
`1 << (RTNLGRP_NSID - 1)`. This code has never worked as expected.

Signed-off-by: Xiao Liang <[email protected]>
Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good ...

@donaldsharp
Copy link
Member

@pguibert6WIND please take a look at this and decide if this is right or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants