diff options
| author | tongzongzhen <[email protected]> | 2024-09-02 18:07:11 +0800 |
|---|---|---|
| committer | tongzongzhen <[email protected]> | 2024-09-02 18:07:11 +0800 |
| commit | 5bfc9eb0c647c7362dbca2e4fc586f33cfe0cf72 (patch) | |
| tree | 1d55c11ce9d3763a37af86dd8feef7e71688d7d1 /dummy_ebpf_2/src/tc_prog_kernel.c | |
| parent | c2cc02d2036076a01cf0d8d69d40829cb2e7fb6c (diff) | |
Diffstat (limited to 'dummy_ebpf_2/src/tc_prog_kernel.c')
| -rw-r--r-- | dummy_ebpf_2/src/tc_prog_kernel.c | 3 |
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); } |
