-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Investigate workaround in privileged tests for netlink.RuleAdd() returning EINVAL #14383
Comments
For quicker future reference: we'd like to replace the c.Assert(netlink.RuleAdd(&netlink.Rule{
Src: &net.IPNet{IP: net.ParseIP("172.2.0.2"), Mask: net.CIDRMask(32, 32)},
Priority: linux_defaults.RulePriorityEgress,
Table: dummy.Index,
}), IsNil) |
This can be useful to trace netlink requests to the kernel: https://github.com/socketpair/nltrace |
Alternatively, the recent enough strace version should help you to compare both netlink requests. If that doesn't work, then https://docs.pyroute2.org/debug.html might be useful. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
The default value of a netlink.Rule does not seem to be useful. netlink.NewRule must be used instead. Fixes: cilium#14383 Signed-off-by: Timo Beckers <timo@isovalent.com>
@christarazi Turns out the default value of netlink.Rule cannot be used: #26486. |
The default value of a netlink.Rule does not seem to be useful. netlink.NewRule must be used instead. Fixes: #14383 Signed-off-by: Timo Beckers <timo@isovalent.com>
See #14337 (comment). For now the workaround is to shell out to
ip rule add
instead of using the netlink library.The text was updated successfully, but these errors were encountered: