diff --git a/bpf/bpf_lxc.c b/bpf/bpf_lxc.c index 5b0f5944b7e4..ac45dfd351d4 100644 --- a/bpf/bpf_lxc.c +++ b/bpf/bpf_lxc.c @@ -319,7 +319,7 @@ static __always_inline int ipv6_l3_from_lxc(struct __ctx_buff *ctx, #ifdef ENABLE_ROUTING to_host: - if (is_defined(ENABLE_HOST_REDIRECT)) { + if (is_defined(HOST_REDIRECT_TO_INGRESS)) { union macaddr host_mac = HOST_IFINDEX_MAC; ret = ipv6_l3(ctx, l3_off, (__u8 *) &router_mac.addr, (__u8 *) &host_mac.addr, METRIC_EGRESS); @@ -330,7 +330,7 @@ static __always_inline int ipv6_l3_from_lxc(struct __ctx_buff *ctx, HOST_IFINDEX, reason, monitor); cilium_dbg_capture(ctx, DBG_CAPTURE_DELIVERY, HOST_IFINDEX); - return redirect(HOST_IFINDEX, 0); + return redirect(HOST_IFINDEX, BPF_F_INGRESS); } #endif @@ -671,7 +671,7 @@ static __always_inline int handle_ipv4_from_lxc(struct __ctx_buff *ctx, #ifdef ENABLE_ROUTING to_host: - if (is_defined(ENABLE_HOST_REDIRECT)) { + if (is_defined(HOST_REDIRECT_TO_INGRESS)) { union macaddr host_mac = HOST_IFINDEX_MAC; ret = ipv4_l3(ctx, l3_off, (__u8 *) &router_mac.addr, (__u8 *) &host_mac.addr, ip4); @@ -682,11 +682,7 @@ static __always_inline int handle_ipv4_from_lxc(struct __ctx_buff *ctx, reason, monitor); cilium_dbg_capture(ctx, DBG_CAPTURE_DELIVERY, HOST_IFINDEX); -#ifdef HOST_REDIRECT_TO_INGRESS return redirect(HOST_IFINDEX, BPF_F_INGRESS); -#else - return redirect(HOST_IFINDEX, 0); -#endif } #endif