-
Notifications
You must be signed in to change notification settings - Fork 3.4k
adjust encryption bit while tracing outgoing wireguard-encrypted packets #35354
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
adjust encryption bit while tracing outgoing wireguard-encrypted packets #35354
Conversation
8488357
to
467b26b
Compare
/test |
467b26b
to
606136b
Compare
606136b
to
906365a
Compare
/test |
906365a
to
4722e91
Compare
4722e91
to
3fd8fdd
Compare
/test |
This commit adjusts the tracing reason on the egress path when WireGuard is active. In cilium#35183 we erroneously potentially override the trace reason with Wireguard and HostFirewall enabled: while the latter could modify the trace structure after a successful ct lookup, the WireGuard code would simply ignore that value with either just TRACE_REASON_ENCRYPTED or TRACE_REASON_UNKNOWN. With this commit, the WireGuard path set at most just the TRACE_REASON_ENCRYPTED bit only after checking that the packet is WireGuard-encrypted, preserving the previous tracing reason. Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
3fd8fdd
to
d0c3307
Compare
As discussed offline, I just dropped the respective commits and left only the first fix. |
/test |
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.
Thank you!
With this PR we just set the tracing encryption bit rather than overwriting trace reasons, causing potential loss of information. Offending commit hash 8a67387, PR #35183.
NOTE: backport shouldn't be needed since the offending commit made it to pre-release only https://github.com/cilium/cilium/releases/tag/v1.17.0-pre.2.