Please ignore this patch. The solution is: hook.attach_point = bpf_tc_attach_point(BPF_TC_INGRESS | BPF_TC_EGRESS)