Update netlink library to not set XFRMA_IF_ID = 0 by default#18506
Update netlink library to not set XFRMA_IF_ID = 0 by default#18506gandro merged 2 commits intocilium:masterfrom
Conversation
|
/test-runtime Job 'Cilium-PR-Runtime-net-next' failed and has not been observed before, so may be related to your PR: Click to show.Test NameFailure OutputIf it is a flake, comment |
|
Regarding backport labels, the test doesn't exist in v1.10. |
pchaigno
left a comment
There was a problem hiding this comment.
Nice catch! How did you find this so quickly?
|
|
There is another legitimate failure in I think this needs to be fixed in the netlink library to only set the |
Restore the original netns on test exit or failure and also check errors on these operations. Also make sure to unlock the OS thread and close the test netns on test failure (i.e. using defer, not only at test exit). Fixes: 70e5c58 ("test: add unit tests for `cilium encrypt` and subcommands") Signed-off-by: Tobias Klauser <tobias@cilium.io>
3215287 to
11bf1df
Compare
11bf1df to
facba9e
Compare
|
Dropped the second commit explicitly setting |
…tlink As of Linux kernel commit torvalds/linux@68ac0f3810e7 ("xfrm: state and policy should fail if XFRMA_IF_ID 0"), specifying xfrm if_id = 0 leads to EINVAL being returned. So far, the netlink library always specified the XFRMA_IF_ID netlink attribute, regardless of its value. Upstream PR vishvananda/netlink#727 changed this behavior to only set XFRMA_IF_ID in case XfrmState.Ifid or XfrmPolicy.Ifid are != 0 to fix the issue. Updated using: go get github.com/vishvananda/netlink@main go mod tidy go mod vendor Signed-off-by: Tobias Klauser <tobias@cilium.io>
facba9e to
dd7334b
Compare
|
/test-runtime |
|
Runtime tests are passing. Reviews are in. Marking ready to merge. |
|
We also need to backport this to v1.10 to fix the EKS workflow there (cf. https://github.com/cilium/cilium/runs/5405780998?check_suite_focus=true hit in #18835). |
|
The title is a bit misleading here. IIRC, this pull request doesn't only fix the test. |
Good point. The title still stems from the initial fix which was made before the actual cause of the issue was known. I'll change the PR title/description accordingly. |
(previous PR title:
Fix EncryptStatusSuite.TestCountUniqueIPsecKeys)As of Linux kernel commit torvalds/linux@68ac0f3810e7 ("xfrm: state and
policy should fail if XFRMA_IF_ID 0"), specifying xfrm if_id = 0 leads
to EINVAL being returned. So far, the netlink library always specified
the XFRMA_IF_ID netlink attribute, regardless of its value. Upstream PR
vishvananda/netlink#727 changed this behavior to
only set XFRMA_IF_ID in case XfrmState.Ifid or XfrmPolicy.Ifid are != 0
to fix the issue.
Updated using:
Fixes: #18500