Skip to content
Commit d01b59c9 authored by Xuesen Huang's avatar Xuesen Huang Committed by Daniel Borkmann
Browse files

bpf: Add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH



bpf_skb_adjust_room sets the inner_protocol as skb->protocol for packets
encapsulation. But that is not appropriate when pushing Ethernet header.

Add an option to further specify encap L2 type and set the inner_protocol
as ETH_P_TEB.

Suggested-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarXuesen Huang <huangxuesen@kuaishou.com>
Signed-off-by: default avatarZhiyong Cheng <chengzhiyong@kuaishou.com>
Signed-off-by: default avatarLi Wang <wangli09@kuaishou.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarWillem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/bpf/20210304064046.6232-1-hxseverything@gmail.com
parent bce86231
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment