Skip to content
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

bpf: lxc: don't take RevDNAT tailcall for service backend's ICMP messages #32155

Merged
merged 1 commit into from
May 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions bpf/bpf_lxc.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ static __always_inline int handle_ipv6_from_lxc(struct __ctx_buff *ctx, __u32 *d
} else
# endif /* ENABLE_DSR */
/* See comment in handle_ipv4_from_lxc(). */
if (ct_state->node_port) {
if (ct_state->node_port && lb_is_svc_proto(tuple->nexthdr)) {
send_trace_notify(ctx, TRACE_TO_NETWORK, SECLABEL_IPV6,
*dst_sec_identity, 0, 0,
trace.reason, trace.monitor);
Expand Down Expand Up @@ -1009,8 +1009,11 @@ static __always_inline int handle_ipv4_from_lxc(struct __ctx_buff *ctx, __u32 *d
/* This handles reply traffic for the case where the nodeport EP
* is local to the node. We'll do the tail call to perform
* the reverse DNAT.
*
* This codepath currently doesn't support revDNAT for ICMP,
* so make sure that we only send TCP/UDP/SCTP down this way.
*/
if (ct_state->node_port) {
if (ct_state->node_port && lb_is_svc_proto(tuple->nexthdr)) {
send_trace_notify(ctx, TRACE_TO_NETWORK, SECLABEL_IPV4,
*dst_sec_identity, 0, 0,
trace.reason, trace.monitor);
Expand Down