mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
encap-forward: Change SKB packet type
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
This commit is contained in:
@ -19,6 +19,9 @@ SEC("classifier") int tc_encap(struct __sk_buff *skb)
|
||||
|
||||
// encap_ipv6(ctx);
|
||||
encap_ipv4(data, data_end);
|
||||
|
||||
if (bpf_skb_change_type(skb, PACKET_OTHERHOST))
|
||||
goto out;
|
||||
ret = BPF_OK;
|
||||
out:
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user