netfilter: nf_tables: add nft_dup expression
This new expression uses the nf_dup engine to clone packets to a given gateway.
Unlike xt_TEE, we use an index to indicate output interface which should be
fine at this stage.
Moreover, change to the preemtion-safe this_cpu_read(nf_skb_duplicated) from
nf_dup_ipv{4,6} to silence a lockdep splat.
Based on the original tee expression from Arturo Borrero Gonzalez, although
this patch has diverted quite a bit from this initial effort due to the
change to support maps.
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
Showing
include/net/netfilter/nft_dup.h
0 → 100644
net/ipv4/netfilter/nft_dup_ipv4.c
0 → 100644
net/ipv6/netfilter/nft_dup_ipv6.c
0 → 100644
想要评论请 注册 或 登录