diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-12-09 15:43:17 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-01-08 18:01:22 +0100 |
commit | c2f9eafee9aaeedaad9eadbf47913f4681d723df (patch) | |
tree | ae05f60c0f5df4d1459ec7d301f8c8c1e1af174e /net/netfilter/nf_tables_inet.c | |
parent | c974a3a36468d1947c96f0c694c8a1b2e7810043 (diff) | |
download | linux-stable-c2f9eafee9aaeedaad9eadbf47913f4681d723df.tar.gz linux-stable-c2f9eafee9aaeedaad9eadbf47913f4681d723df.tar.bz2 linux-stable-c2f9eafee9aaeedaad9eadbf47913f4681d723df.zip |
netfilter: nf_tables: remove hooks from family definition
They don't belong to the family definition, move them to the filter
chain type definition instead.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_tables_inet.c')
-rw-r--r-- | net/netfilter/nf_tables_inet.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/netfilter/nf_tables_inet.c b/net/netfilter/nf_tables_inet.c index edd7829a5753..313987e2b1fe 100644 --- a/net/netfilter/nf_tables_inet.c +++ b/net/netfilter/nf_tables_inet.c @@ -74,13 +74,6 @@ static struct nft_af_info nft_af_inet __read_mostly = { .family = NFPROTO_INET, .nhooks = NF_INET_NUMHOOKS, .owner = THIS_MODULE, - .hooks = { - [NF_INET_LOCAL_IN] = nft_do_chain_inet, - [NF_INET_LOCAL_OUT] = nft_inet_output, - [NF_INET_FORWARD] = nft_do_chain_inet, - [NF_INET_PRE_ROUTING] = nft_do_chain_inet, - [NF_INET_POST_ROUTING] = nft_do_chain_inet, - }, }; static int __net_init nf_tables_inet_init_net(struct net *net) @@ -121,6 +114,13 @@ static const struct nf_chain_type filter_inet = { (1 << NF_INET_FORWARD) | (1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_POST_ROUTING), + .hooks = { + [NF_INET_LOCAL_IN] = nft_do_chain_inet, + [NF_INET_LOCAL_OUT] = nft_inet_output, + [NF_INET_FORWARD] = nft_do_chain_inet, + [NF_INET_PRE_ROUTING] = nft_do_chain_inet, + [NF_INET_POST_ROUTING] = nft_do_chain_inet, + }, }; static int __init nf_tables_inet_init(void) |