Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f75edf5e authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso
Browse files

netfilter: nf_tables: disabling table hooks always succeeds



nf_tables_table_disable() always succeeds, make this function void.

Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 91c7b38d
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -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,8 +410,7 @@ 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)
			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) {