]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: add inet ingress support
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 7 Oct 2020 23:14:48 +0000 (01:14 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 11 Oct 2020 23:57:34 +0000 (01:57 +0200)
commit2a3e0391a5836526e016d6faa498d9b5fccb21ea
tree4d7c09995972f512f85ba4b2ab302dd2986c1456
parent9a7f2921c6f1fb1c4ecda31ede29aa8780bee112
netfilter: nf_tables: add inet ingress support

This patch adds a new ingress hook for the inet family. The inet ingress
hook emulates the IP receive path code, therefore, unclean packets are
drop before walking over the ruleset in this basechain.

This patch also introduces the nft_base_chain_netdev() helper function
to check if this hook is bound to one or more devices (through the hook
list infrastructure). This check allows to perform the same handling for
the inet ingress as it would be a netdev ingress chain from the control
plane.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_tables.h
include/net/netfilter/nf_tables_ipv4.h
include/net/netfilter/nf_tables_ipv6.h
net/netfilter/nf_tables_api.c
net/netfilter/nft_chain_filter.c