netfilter: nft_meta: add support for slave device ifindex matching
authorFlorian Westphal <fw@strlen.de>
Wed, 18 Dec 2019 11:05:21 +0000 (12:05 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 26 Dec 2019 16:41:34 +0000 (17:41 +0100)
commitc14ceb0ec727187f71a487a592ffa91767fed66e
treeca06929e9f9f81a84050672307eb5552a594899d
parent01a0fc82252d82eda50d4e1252b826a3ef7afb3d
netfilter: nft_meta: add support for slave device ifindex matching

Allow to match on vrf slave ifindex or name.

In case there was no slave interface involved, store 0 in the
destination register just like existing iif/oif matching.

sdif(name) is restricted to the ipv4/ipv6 input and forward hooks,
as it depends on ip(6) stack parsing/storing info in skb->cb[].

Cc: Martin Willi <martin@strongswan.org>
Cc: David Ahern <dsahern@kernel.org>
Cc: Shrijeet Mukherjee <shrijeet@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nf_tables.h
net/netfilter/nft_meta.c