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

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

netfilter: nf_tables: remove nhooks field from struct nft_af_info



We already validate the hook through bitmask, so this check is
superfluous. When removing this, this patch is also fixing a bug in the
new flowtable codebase, since ctx->afi points to the table family
instead of the netdev family which is where the flowtable is really
hooked in.

Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 61ad6408
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -973,7 +973,6 @@ enum nft_af_flags {
 *
 *	@list: used internally
 *	@family: address family
 *	@nhooks: number of hooks in this family
 *	@owner: module owner
 *	@tables: used internally
 *	@flags: family flags
@@ -981,7 +980,6 @@ enum nft_af_flags {
struct nft_af_info {
	struct list_head		list;
	int				family;
	unsigned int			nhooks;
	struct module			*owner;
	struct list_head		tables;
	u32				flags;
+0 −1
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ nft_do_chain_bridge(void *priv,

static struct nft_af_info nft_af_bridge __read_mostly = {
	.family		= NFPROTO_BRIDGE,
	.nhooks		= NF_BR_NUMHOOKS,
	.owner		= THIS_MODULE,
};

+0 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ nft_do_chain_arp(void *priv,

static struct nft_af_info nft_af_arp __read_mostly = {
	.family		= NFPROTO_ARP,
	.nhooks		= NF_ARP_NUMHOOKS,
	.owner		= THIS_MODULE,
};

+0 −1
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ static unsigned int nft_do_chain_ipv4(void *priv,

static struct nft_af_info nft_af_ipv4 __read_mostly = {
	.family		= NFPROTO_IPV4,
	.nhooks		= NF_INET_NUMHOOKS,
	.owner		= THIS_MODULE,
};

+0 −1
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ static unsigned int nft_do_chain_ipv6(void *priv,

static struct nft_af_info nft_af_ipv6 __read_mostly = {
	.family		= NFPROTO_IPV6,
	.nhooks		= NF_INET_NUMHOOKS,
	.owner		= THIS_MODULE,
};

Loading