8000 v1.16 Backports 2024-10-25 by tklauser · Pull Request #35543 · cilium/cilium · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

v1.16 Backports 2024-10-25 #35543

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

Merged
merged 11 commits into from
Oct 25, 2024
Merged

v1.16 Backports 2024-10-25 #35543

merged 11 commits into from
Oct 25, 2024

Conversation

tklauser
Copy link
Member
@tklauser tklauser commented Oct 25, 2024

Once this PR is merged, a GitHub action will update the labels of these PRs:

 33998 34755 35349 35306 35390 35293 35173

marseel and others added 5 commits October 25, 2024 14:11
[ upstream commit 5e59656 ]

Before, we were always printing nil from previous err rather than
current ferr.

Fixes: #28163

Signed-off-by: Marcel Zieba <marcel.zieba@isovalent.com>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
[ upstream commit decd610 ]

The referenced helper doesn't exist any longer.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
[ upstream commit 60ebfbf ]

The VXLAN helpers currently assume that the outer packet has a L2 header,
but this isn't necessarily true. Instead of hard-coding the `struct ethhdr`
length, let the caller use ETH_HLEN instead (which can be either 14 or 0).

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
[ upstream commit 4f51bad ]

Determine the L4 offset just once, so that we don't have to revalidate
the IPv4 header after rewriting the MAC addresses.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
[ upstream commit 1ede9d9 ]

Cilium is currently affected by a bug that causes traffic matched by network
policies to be incorrectly dropped when running in either ENI mode (both AWS
and AlibabaCloud) or AWS VPC CNI chaining mode, if the cluster ID is 128-255
(and 384-511 when maxConnectedClusters=511) [1]. Let's add validation both
at the helm level and in the agent itself to prevent users from configuring
Cilium in a configuration which is known to be broken.

[1]: #21330

Suggested-by: Joe Stringer <joe@cilium.io>
Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
@tklauser tklauser added kind/backports This PR provides functionality previously merged into master. backport/1.16 This PR represents a backport for Cilium 1.16.x of a PR that was merged to main. labels Oct 25, 2024
@tklauser tklauser marked this pull request as ready for review October 25, 2024 12:18
@tklauser tklauser requested a review from a team as a code owner October 25, 2024 12:19
@tklauser
Copy link
Member Author

/test-backport-1.16

Copy link
Member
@giorio94 giorio94 left a comment

Choose a reason for hiding this comment

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

My commit looks good. Thanks!

@julianwiedmann
Copy link
Member

oh, netlink build failures :(. For reference, Andre fixed this up in main with f6031e2.

jrife and others added 6 commits October 25, 2024 14:31
[ upstream commit 1de792c ]

[ backporter's note: due to update of vishvananda/netlink also pull in
  relevant changes from commit f6031e2 ("fix(deps): update all go
  dependencies main") adjusting to the changed mask type (uint32 instead
  of int). ]

When using endpoint routes with veth, cil_to_container runs before the
veth driver scrubs the packet (i.e. clears skb->mark). In netkit mode,
cil_to_container is executed after scrubbing the packet. This causes
traffic from originating from the host to be miscategorized leading to
cases like GH-34042 where enabling netkit causes liveness+readiness
probes to fail.

To address this, the IFLA_NETKIT_SCRUB and IFLA_NETKIT_PEER_SCRUB flags
were recently introduced to configure whether or not netkit scrubs the
packet when xmiting to the primary or peer devices, respectively. Set
IFLA_NETKIT_SCRUB to NETKIT_SCRUB_NONE to ensure that any mark set in
the host namespace is passed to cil_to_container when using netkit with
endpoint routes. Set IFLA_NETKIT_PEER_SCRUB to NETKIT_SCRUB_DEFAULT to
ensure that the mark is always cleared before running cil_from_container
and passing the packet on to the host namespace.

Signed-off-by: Jordan Rife <jrife@google.com>
Link: https://lore.kernel.org/bpf/20241004101335.117711-1-daniel@iogearbox.net/T/#u
Fixes: #35060
Fixes: #34042
Fixes: #33875
Fixes: 6895341 ("cilium, connector: Add netkit connector")
[ upstream commit b418310 ]

Seems like the config option has been renamed in the inital PR while it
was reviewed but this instance has been missed.

See #32733

Signed-off-by: Matthias Baur <m.baur@syseleven.de>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
[ upstream commit 6170030 ]

It turns out that ForEachService() does a lot of allocation to convert
an EndpointSlices in to an Endpoints; this is wasteful if the caller
does not need the endpoints.

Instead, yield the EndpointSlices directly, so the caller may generate
the endpoints if desired.

Signed-off-by: Casey Callendrello <cdc@isovalent.com>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
[ upstream commit e9756ef ]

We already track whether or not a given CNP / CCNP has a ToServices
selector. We can use this bit to skip resolving ToServices entirely
(and thus iterating over all known services) when no ToServices
selectors are present.

Signed-off-by: Casey Callendrello <cdc@isovalent.com>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
[ upstream commit a55178f ]

This commit fixes the pod-to-pod traffic being dropped because of using a
higher MTU value. This is caused by a non-configuration of the default route
from proxy, in the routing table n. 2005 respectively. While the pod-to-pod
default route MTU is being adjusted according to the IPSec overhead and the
adjusted size of the authentication key, the from-proxy route is not changed
as well leading to connectivity issues when both ingress and egress policies
are in-place.

Fixes: #33168

Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
[ upstream commit 3ccd76a ]

This commit extends the routes tests to check that, according to the previous
commit, the default route in the table 2005 is correctly installed with the
provided MTU. This is particularly useful as when enabling both ingress
and egress policies with IPSec, the default route has a lower MTU since
it needs to account also for the encryption overhead.
With this commit, in the tests we make sure that, when provided, the correct
value is used rather than the default one.

Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
@tklauser tklauser force-pushed the 8000 pr/v1.16-backport-2024-10-25-02-11 branch from 06cf02b to 4e84ea1 Compare October 25, 2024 12:32
@tklauser
Copy link
Member Author

oh, netlink build failures :(. For reference, Andre fixed this up in main with f6031e2.

Thanks. I've pulled these fixes into the commit updating the netlink lib.

@tklauser
Copy link
Member Author

/test-backport-1.16

@tklauser tklauser enabled auto-merge October 25, 2024 12:36
Copy link
Contributor
@smagnani96 smagnani96 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for dropping cli changes from the commits 👍

@tklauser tklauser added this pull request to the merge queue Oct 25, 2024
Merged via the queue into v1.16 with commit e174eba Oct 25, 2024
280 of 281 checks passed
@tklauser tklauser deleted the pr/v1.16-backport-2024-10-25-02-11 branch October 25, 2024 16:12
smagnani96 added a commit to smagnani96/cilium that referenced this pull request Nov 4, 2024
This commit enables the `pod-to-pod-with-l7-policy-encryption` cli
connectivity test from v1.15, after the successful backports of cilium#35173 in:

* v1.15: cilium#35586
* v1.16: cilium#35543

While enabling the test, in this commit we split the version check logic
(that is independent from the IP family used) from the check for running
IPv6+IPsec (that should be prevented due to a current limitation of
having a flaky plain-text packet in the test suite, tracked in cilium#35485).

Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
smagnani96 added a commit to smagnani96/cilium that referenced this pull request Nov 5, 2024
This commit enables the `pod-to-pod-with-l7-policy-encryption` cli
connectivity test for v1.15 and v1.16, after the backports of cilium#35173 in:

* v1.15: cilium#35586
* v1.16: cilium#35543

While enabling the test, in this commit we split the version check logic
(that is independent from the IP family used) from the check for running
IPv6+IPsec (that should be prevented due to a current limitation of
having a flaky plain-text packet in the test suite, tracked in cilium#35485).

Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
github-merge-queue bot pushed a commit that referenced this pull request Nov 22, 2024
This commit enables the `pod-to-pod-with-l7-policy-encryption` cli
connectivity test for v1.15 and v1.16, after the backports of #35173 in:

* v1.15: #35586
* v1.16: #35543

While enabling the test, in this commit we split the version check logic
(that is independent from the IP family used) from the check for running
IPv6+IPsec (that should be prevented due to a current limitation of
having a flaky plain-text packet in the test suite, tracked in #35485).

Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.16 This PR represents a backport for Cilium 1.16.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
0