diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-03-30 14:04:52 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-05-19 12:06:11 +0200 |
commit | f75edf5e9c9773cf6d0bd9b8d50ead41b4984569 (patch) | |
tree | e1d374f818f6b077ed2b7261e1deaeac3937da49 /net | |
parent | netfilter: nf_tables: use new transaction infrastructure to handle chain (diff) | |
download | linux-f75edf5e9c9773cf6d0bd9b8d50ead41b4984569.tar.xz linux-f75edf5e9c9773cf6d0bd9b8d50ead41b4984569.zip |
netfilter: nf_tables: disabling table hooks always succeeds
nf_tables_table_disable() always succeeds, make this function void.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_tables_api.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 7a1149fe2100..5f717032b2a5 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -381,7 +381,7 @@ err: return err; } -static int nf_tables_table_disable(const struct nft_af_info *afi, +static void nf_tables_table_disable(const struct nft_af_info *afi, struct nft_table *table) { struct nft_chain *chain; @@ -391,8 +391,6 @@ static int nf_tables_table_disable(const struct nft_af_info *afi, nf_unregister_hooks(nft_base_chain(chain)->ops, afi->nops); } - - return 0; } static int nf_tables_updtable(struct sock *nlsk, struct sk_buff *skb, @@ -412,9 +410,8 @@ static int nf_tables_updtable(struct sock *nlsk, struct sk_buff *skb, if ((flags & NFT_TABLE_F_DORMANT) && !(table->flags & NFT_TABLE_F_DORMANT)) { - ret = nf_tables_table_disable(afi, table); - if (ret >= 0) - table->flags |= NFT_TABLE_F_DORMANT; + nf_tables_table_disable(afi, table); + table->flags |= NFT_TABLE_F_DORMANT; } else if (!(flags & NFT_TABLE_F_DORMANT) && table->flags & NFT_TABLE_F_DORMANT) { ret = nf_tables_table_enable(afi, table); |