On 07/07/2019 16:37, wenxu@xxxxxxxxx wrote: > From: wenxu <wenxu@xxxxxxxxx> > > This patch provide a meta vlan to set the vlan tag of the packet. > > for q-in-q outer vlan id 20: > meta vlan set 0x88a8:20 > > set the default 0x8100 vlan type with vlan id 20 > meta vlan set 20 > > Signed-off-by: wenxu <wenxu@xxxxxxxxx> > --- > include/net/netfilter/nft_meta.h | 5 ++++- > include/uapi/linux/netfilter/nf_tables.h | 4 ++++ > net/netfilter/nft_meta.c | 27 +++++++++++++++++++++++++++ > 3 files changed, 35 insertions(+), 1 deletion(-) > So mac_len is (mostly) only updated at receive, how do you deal with the mac header at egress, specifically if it's a locally originating packet ? I think it will be 0 and data will be pointing at the network header, take NF_INET_LOCAL_OUT for example.