Skip to content

[1.17] bpf: always mark decrypted wireguard traffic#39498

Closed
rgo3 wants to merge 1 commit intov1.17from
pr/rgo3/1.17-wg-ingress-mark
Closed

[1.17] bpf: always mark decrypted wireguard traffic#39498
rgo3 wants to merge 1 commit intov1.17from
pr/rgo3/1.17-wg-ingress-mark

Conversation

@rgo3
Copy link
Copy Markdown
Contributor

@rgo3 rgo3 commented May 12, 2025

This PR is a manual backport needed for #39239. This is needed for upgrade scenarios, where a future version of cilium (1.18) expects this mark to be there. To achieve this, we always need to attach cil_from_netdev to the wireguard device. As NeedBPFHostOnWireGuardDevice then becomes obsolete, we remove it entirely from the code base.

@maintainer-s-little-helper maintainer-s-little-helper bot added backport/1.17 This PR represents a backport for Cilium 1.17.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. labels May 12, 2025
@rgo3
Copy link
Copy Markdown
Contributor Author

rgo3 commented May 12, 2025

/test

@rgo3 rgo3 changed the title bpf: always mark decrypted wireguard traffic [1.17] bpf: always mark decrypted wireguard traffic May 12, 2025
@rgo3 rgo3 force-pushed the pr/rgo3/1.17-wg-ingress-mark branch from 16ae59e to 1d4a784 Compare May 12, 2025 14:12
@rgo3
Copy link
Copy Markdown
Contributor Author

rgo3 commented May 12, 2025

/ci-e2e-upgrade

@rgo3 rgo3 force-pushed the pr/rgo3/1.17-wg-ingress-mark branch from 1d4a784 to 0cbeb8a Compare May 28, 2025 11:41
@rgo3
Copy link
Copy Markdown
Contributor Author

rgo3 commented May 28, 2025

/ci-e2e-upgrade

@rgo3 rgo3 force-pushed the pr/rgo3/1.17-wg-ingress-mark branch from 15a7414 to a2b2070 Compare June 3, 2025 13:29
@rgo3
Copy link
Copy Markdown
Contributor Author

rgo3 commented Jun 3, 2025

/ci-e2e-upgrade

@rgo3 rgo3 force-pushed the pr/rgo3/1.17-wg-ingress-mark branch from a2b2070 to 450f889 Compare June 4, 2025 10:50
@rgo3
Copy link
Copy Markdown
Contributor Author

rgo3 commented Jun 4, 2025

/test

Copy link
Copy Markdown
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.

Thanks Robin. Left a couple of comments for reviewers, feel free to solve them when needed 😃

// Cleanup also calls map from v1.18 after downgrade.
cleanCallsMaps(fmt.Sprintf("cilium_calls_wireguard_%d", device.Attrs().Index))
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For reviewers: all this logic is not needed anymore, as it will always be executed in attachNetworkDevices() in case WG is enabled. In case it is disabled it is not needed: the interface has been teared down.

@rgo3 rgo3 force-pushed the pr/rgo3/1.17-wg-ingress-mark branch from 450f889 to 942bf73 Compare June 11, 2025 15:06
@rgo3
Copy link
Copy Markdown
Contributor Author

rgo3 commented Jun 11, 2025

/test

To always mark decrypted wireguard traffic we need to always attach
cil_from_netdev to the wireguard device, which is changed in this
commit. This is needed for upgrade scenarios, where a future version of
cilium (1.18) expects this mark to be there.

Signed-off-by: Robin Gögge <[email protected]>
@rgo3 rgo3 force-pushed the pr/rgo3/1.17-wg-ingress-mark branch from 942bf73 to 7f1fb0b Compare June 13, 2025 12:02
@rgo3
Copy link
Copy Markdown
Contributor Author

rgo3 commented Jun 13, 2025

/test

@rgo3
Copy link
Copy Markdown
Contributor Author

rgo3 commented Jul 2, 2025

This isn't needed anymore since #39239 didn't make it into 1.18

@rgo3 rgo3 closed this Jul 2, 2025
@rgo3 rgo3 deleted the pr/rgo3/1.17-wg-ingress-mark branch January 9, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.17 This PR represents a backport for Cilium 1.17.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.

3 participants