8000 wireguard: attach Ingress program for native routing mode configurations by julianwiedmann · Pull Request #37108 · cilium/cilium · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

wireguard: attach Ingress program for native routing mode configurations #37108

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 1 commit into from
Jan 22, 2025

Conversation

julianwiedmann
Copy link
Member

Without the from-netdev program at cilium_wg0's Ingress hook, received packets drop into the host network stack and are then delivered via cilium_host / cilium_net.

This impacts configurations with BPF Host Routing, as packets are unexpectedly observed by the host stack. It is also different from overlay routing mode (where such packets are subsequently handled by from-overlay and delivered to local endpoints using BPF), or a configuration without encryption (where such packets are delivered to local endpoints by from-netdev at the native device).

Therefore change the condition in NeedBPFHostOnWireGuardDevice() to also consider native routing mode.

Without the `from-netdev` program at cilium_wg0's Ingress hook, received
packets drop into the host network stack and are then delivered via
cilium_host / cilium_net.

This impacts configurations with BPF Host Routing, as packets are
unexpectedly observed by the host stack. It is also different from
overlay routing mode (where such packets are subsequently handled by
`from-overlay` and delivered to local endpoints using BPF), or a
configuration without encryption (where such packets are delivered to
local endpoints by `from-netdev` at the native device).

Therefore change the condition in NeedBPFHostOnWireGuardDevice() to also
consider native routing mode.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
@julianwiedmann julianwiedmann added kind/enhancement This would improve or streamline existing functionality. area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/misc This PR makes changes that have no direct user impact. feature/wireguard Relates to Cilium's Wireguard feature needs-backport/1.17 This PR / issue needs backporting to the v1.17 branch labels Jan 21, 2025
@julianwiedmann julianwiedmann requested review from a team and jschwinger233 and removed request for a team January 21, 2025 07:49
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann marked this pull request as ready for review January 21, 2025 07:50
@julianwiedmann julianwiedmann requested review from a team as code owners January 21, 2025 07:50
asauber
< 8000 strong> asauber approved these changes Jan 21, 2025
Copy link
Member
@asauber asauber left a comment

Choose a reason for hiding this comment

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

nice inline comments

@julianwiedmann julianwiedmann added this pull request to the merge queue Jan 22, 2025
Merged via the queue into cilium:main with commit f928ca2 Jan 22, 2025
78 checks passed
@julianwiedmann julianwiedmann deleted the 1.18-wg-native-routing branch January 22, 2025 06:06
@rastislavs rastislavs mentioned this pull request Jan 24, 2025
14 tasks
@rastislavs rastislavs added backport-pending/1.17 The backport for Cilium 1.17.x for this PR is in progress. and removed needs-backport/1.17 This PR / issue needs backporting to the v1.17 branch labels Jan 24, 2025
@github-actions github-actions bot added backport-done/1.17 The backport for Cilium 1.17.x for this PR is done. and removed backport-pending/1.17 The backport for Cilium 1.17.x for this PR is in progress. labels Jan 24, 2025
@jschwinger233 jschwinger233 added the needs-backport/1.16 This PR / issue needs backporting to the v1.16 branch label Mar 11, 2025
@jschwinger233 jschwinger233 mentioned this pull request Mar 11, 2025
1 task
@jschwinger233 jschwinger233 added the backport-pending/1.16 The backport for Cilium 1.16.x for this PR is in progress. label Mar 11, 2025
@jschwinger233 jschwinger233 added affects/v1.16 This issue affects v1.16 branch needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch and removed needs-backport/1.16 This PR / issue needs backporting to the v1.16 branch labels Mar 11, 2025
@github-actions github-actions bot added backport-done/1.16 The backport for Cilium 1.16.x for this PR is done. and removed backport-pending/1.16 The backport for Cilium 1.16.x for this PR is in progress. labels Mar 13, 2025
@YutaroHayakawa YutaroHayakawa mentioned this pull request Mar 18, 2025
4 tasks
@YutaroHayakawa YutaroHayakawa added backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. and removed needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch labels Mar 18, 2025
@julianwiedmann julianwiedmann added backport/author The backport will be carried out by the author of the PR. affects/v1.15 This issue affects v1.15 branch and removed backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. labels Mar 19, 2025
@github-actions github-actions bot added the backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. label Mar 26, 2025
@julianwiedmann julianwiedmann removed the backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. label Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/v1.15 This issue affects v1.15 branch affects/v1.16 This issue affects v1.16 branch area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. backport/author The backport will be carried out by the author of the PR. backport-done/1.16 The backport for Cilium 1.16.x for this PR is done. backport-done/1.17 The backport for Cilium 1.17.x for this PR is done. feature/wireguard Relates to Cilium's Wireguard feature kind/enhancement This would improve or streamline existing functionality. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0