summaryrefslogtreecommitdiff
path: root/dummy_ebpf_2/src/tc_prog_kernel.c
diff options
context:
space:
mode:
authortongzongzhen <[email protected]>2024-09-02 18:07:11 +0800
committertongzongzhen <[email protected]>2024-09-02 18:07:11 +0800
commit5bfc9eb0c647c7362dbca2e4fc586f33cfe0cf72 (patch)
tree1d55c11ce9d3763a37af86dd8feef7e71688d7d1 /dummy_ebpf_2/src/tc_prog_kernel.c
parentc2cc02d2036076a01cf0d8d69d40829cb2e7fb6c (diff)
redirect to egress stillHEADmaster
Diffstat (limited to 'dummy_ebpf_2/src/tc_prog_kernel.c')
-rw-r--r--dummy_ebpf_2/src/tc_prog_kernel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dummy_ebpf_2/src/tc_prog_kernel.c b/dummy_ebpf_2/src/tc_prog_kernel.c
index 7c58ff6..fb8a6ca 100644
--- a/dummy_ebpf_2/src/tc_prog_kernel.c
+++ b/dummy_ebpf_2/src/tc_prog_kernel.c
@@ -72,7 +72,8 @@ int tc_redirect_map_func(struct __sk_buff *skb) {
}
// Redirect the packet to the endpoint referenced by map at index key.
- action = bpf_redirect(*ifindex, BPF_F_INGRESS);
+ // action = bpf_redirect(*ifindex, BPF_F_INGRESS);
+ action = bpf_redirect(*ifindex, 0);
if (action != TC_ACT_REDIRECT) {
bpf_printk("bpf_redirect_map failed. return code:%d", ret);
}