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: nodeport: fix up trace point in to-overlay NAT paths #24886

Merged
merged 1 commit into from
Apr 18, 2023
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
11 changes: 7 additions & 4 deletions bpf/lib/nodeport.h
Original file line number Diff line number Diff line change
Expand Up @@ -1272,11 +1272,14 @@ int tail_handle_snat_fwd_ipv6(struct __ctx_buff *ctx)
#if defined(TUNNEL_MODE) && defined(IS_BPF_OVERLAY)
union v6addr addr = { .p1 = 0 };

obs_point = TRACE_TO_OVERLAY;
BPF_V6(addr, ROUTER_IP);
#else
union v6addr addr = IPV6_DIRECT_ROUTING;
#endif

#ifdef IS_BPF_OVERLAY
obs_point = TRACE_TO_OVERLAY;
#else
obs_point = TRACE_TO_NETWORK;
#endif

Expand Down Expand Up @@ -1330,7 +1333,7 @@ int tail_handle_nat_fwd_ipv6(struct __ctx_buff *ctx)
int ret;
enum trace_point obs_point;

#if defined(TUNNEL_MODE) && defined(IS_BPF_OVERLAY)
#ifdef IS_BPF_OVERLAY
obs_point = TRACE_TO_OVERLAY;
#else
obs_point = TRACE_TO_NETWORK;
Expand Down Expand Up @@ -2494,7 +2497,7 @@ int tail_handle_snat_fwd_ipv4(struct __ctx_buff *ctx)

ctx_store_meta(ctx, CB_CLUSTER_ID_EGRESS, 0);

#if defined(TUNNEL_MODE) && defined(IS_BPF_OVERLAY)
#ifdef IS_BPF_OVERLAY
obs_point = TRACE_TO_OVERLAY;
#else
obs_point = TRACE_TO_NETWORK;
Expand Down Expand Up @@ -2563,7 +2566,7 @@ int tail_handle_nat_fwd_ipv4(struct __ctx_buff *ctx)

ctx_store_meta(ctx, CB_CLUSTER_ID_EGRESS, 0);

#if defined(TUNNEL_MODE) && defined(IS_BPF_OVERLAY)
#ifdef IS_BPF_OVERLAY
obs_point = TRACE_TO_OVERLAY;
#else
obs_point = TRACE_TO_NETWORK;
Expand Down