Skip to content
Commit f6ad6acc authored by Willem de Bruijn's avatar Willem de Bruijn Committed by Daniel Borkmann
Browse files

selftests/bpf: expand test_tc_tunnel with SIT encap



So far, all BPF tc tunnel testcases encapsulate in the same network
protocol. Add an encap testcase that requires updating skb->protocol.

The 6in4 tunnel encapsulates an IPv6 packet inside an IPv4 tunnel.
Verify that bpf_skb_net_grow correctly updates skb->protocol to
select the right protocol handler in __netif_receive_skb_core.

The BPF program should also manually update the link layer header to
encode the right network protocol.

Changes v1->v2
  - improve documentation of non-obvious logic

Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
Tested-by: default avatarAlan Maguire <alan.maguire@oracle.com>
Acked-by: default avatarYonghong Song <yhs@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 1b00e0df
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment