-
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
cilium: v1.11 backport for ipsec key rotation #27552
Conversation
[upstream commit bba3dfc] [backporter's notes: This was applied manually because it was mostly conflicts and even patch had some trouble.] On key update we only update the policy for our local node. But with latest round of changes we need to update for all nodes in the node cache. With out this we would rely on the validation interval timer to sync the nodes policy before we remove the old policy. This may or may not happen depending on how large the cluster is. Further I've seen us miss it even on relatively small clusters say around 30 nodes so seems its not entirely reliable to count on. Rather than rely on some external to ipsec timer to fire and sync the policies and to do it hopefully in our time window lets just force the nodeUpdate() call on all nodes in the cache when we get the key rotate event. Signed-off-by: John Fastabend <john.fastabend@gmail.com>
@jrfastab the title of the first commit is |
We expect that for any fix on older branches, the following steps also take place:
|
@ti-mo I did the backport before the main PR was merged so I didn't have a commit to add yet. But yes will have one. |
[upstream commit 4f3bc9f] [backporter's note: Had to apply manually because of many conflicts.] The cilium_encrypt_map is used to determine what key the datapath should use. This is done by setting the mark value of the skb and then in the XFRM policy the mark value is matched to designate what encryption policy/state to use. However, on key rotation we have an issue where the map entry with the key is updated before the xfrm policy is plumbed. The result is its possible to mark the skb with a value that will have no matching xfrm policy and result in a policy block error and drop the skb. To resolve ensure we do setup in the correct order and only set the min key in the cilium_encrypt_map after the policy has been updated. Signed-off-by: John Fastabend <john.fastabend@gmail.com>
beda21e
to
e3c2e31
Compare
/test-backport-1.11 |
@joestringer That 1.18-kernel-4.9 test failure looks unrelated to the patches. Also added upstream commits now that we have upstream PR merged. |
/test-1.18-4.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack on behalf of tophat
Backport of PR #27319