-
Notifications
You must be signed in to change notification settings - Fork 3.7k
wireguard: avoid in-kernel conntrack for wireguard connections #41809
Copy link
Copy link
Closed
Labels
area/iptablesImpacts how Cilium interacts with iptables.Impacts how Cilium interacts with iptables.feature/wireguardRelates to Cilium's Wireguard featureRelates to Cilium's Wireguard featurekind/enhancementThis would improve or streamline existing functionality.This would improve or streamline existing functionality.kind/performanceThere is a performance impact of this.There is a performance impact of this.pinnedThese issues are not marked stale by our issue bot.These issues are not marked stale by our issue bot.
Description
Background:
Cilium has been installing no-track rules for its own IPsec traffic for a long time, and recently also started to exclude its own overlay traffic (#38782). But its own Wireguard traffic is still unncessarily tracked by the kernel:
kubectl exec -it -n kube-system cilium-hm9wh -- cat /proc/net/nf_conntrack | grep udp
ipv4 2 udp 17 116 src=172.18.0.2 dst=172.18.0.3 sport=51871 dport=51871 src=172.18.0.3 dst=172.18.0.2 sport=51871 dport=51871 [ASSURED] mark=0 secctx=system_u:object_r:unlabeled_t:s0 zone=0 use=2
Proposal:
Also exclude Wireguard from in-kernel conntrack. On egress this could simply re-use IPsec's mark-based matching.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/iptablesImpacts how Cilium interacts with iptables.Impacts how Cilium interacts with iptables.feature/wireguardRelates to Cilium's Wireguard featureRelates to Cilium's Wireguard featurekind/enhancementThis would improve or streamline existing functionality.This would improve or streamline existing functionality.kind/performanceThere is a performance impact of this.There is a performance impact of this.pinnedThese issues are not marked stale by our issue bot.These issues are not marked stale by our issue bot.