aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/Makefile
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2016-10-24 16:56:40 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-11-01 20:50:14 +0100
commitf6d0cbcf09c506b9b022df8f9d7693a7cec3c732 (patch)
tree3474abfd7456053ca87f63f3e957e64d16249e47 /net/netfilter/Makefile
parent254432613c588640f8b8b5c3641a3c27bbe14688 (diff)
downloadlinux-f6d0cbcf09c506b9b022df8f9d7693a7cec3c732.tar.gz
netfilter: nf_tables: add fib expression
Add FIB expression, supported for ipv4, ipv6 and inet family (the latter just dispatches to ipv4 or ipv6 one based on nfproto). Currently supports fetching output interface index/name and the rtm_type associated with an address. This can be used for adding path filtering. rtm_type is useful to e.g. enforce a strong-end host model where packets are only accepted if daddr is configured on the interface the packet arrived on. The fib expression is a native nftables alternative to the xtables addrtype and rp_filter matches. FIB result order for oif/oifname retrieval is as follows: - if packet is local (skb has rtable, RTF_LOCAL set, this will also catch looped-back multicast packets), set oif to the loopback interface. - if fib lookup returns an error, or result points to local, store zero result. This means '--local' option of -m rpfilter is not supported. It is possible to use 'fib type local' or add explicit saddr/daddr matching rules to create exceptions if this is really needed. - store result in the destination register. In case of multiple routes, search set for desired oif in case strict matching is requested. ipv4 and ipv6 behave fib expressions are supposed to behave the same. [ I have collapsed Arnd Bergmann's ("netfilter: nf_tables: fib warnings") http://patchwork.ozlabs.org/patch/688615/ to address fallout from this patch after rebasing nf-next, that was posted to address compilation warnings. --pablo ] Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/Makefile')
-rw-r--r--net/netfilter/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
index c23c3c84416f7..8faa36c0686d9 100644
--- a/net/netfilter/Makefile
+++ b/net/netfilter/Makefile
@@ -96,6 +96,8 @@ obj-$(CONFIG_NFT_LOG) += nft_log.o
obj-$(CONFIG_NFT_MASQ) += nft_masq.o
obj-$(CONFIG_NFT_REDIR) += nft_redir.o
obj-$(CONFIG_NFT_HASH) += nft_hash.o
+obj-$(CONFIG_NFT_FIB) += nft_fib.o
+obj-$(CONFIG_NFT_FIB_INET) += nft_fib_inet.o
# nf_tables netdev
obj-$(CONFIG_NFT_DUP_NETDEV) += nft_dup_netdev.o