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

Commit 32537e91 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso
Browse files

netfilter: nf_tables: rename struct nf_chain_type



Use nft_ prefix. By when I added chain types, I forgot to use the
nftables prefix. Rename enum nft_chain_type to enum nft_chain_types too,
otherwise there is an overlap.

Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 9124a20d
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -868,7 +868,7 @@ struct nft_chain {
	char				*name;
};

enum nft_chain_type {
enum nft_chain_types {
	NFT_CHAIN_T_DEFAULT = 0,
	NFT_CHAIN_T_ROUTE,
	NFT_CHAIN_T_NAT,
@@ -876,7 +876,7 @@ enum nft_chain_type {
};

/**
 * 	struct nf_chain_type - nf_tables chain type info
 * 	struct nft_chain_type - nf_tables chain type info
 *
 * 	@name: name of the type
 * 	@type: numeric identifier
@@ -885,9 +885,9 @@ enum nft_chain_type {
 * 	@hook_mask: mask of valid hooks
 * 	@hooks: array of hook functions
 */
struct nf_chain_type {
struct nft_chain_type {
	const char			*name;
	enum nft_chain_type		type;
	enum nft_chain_types		type;
	int				family;
	struct module			*owner;
	unsigned int			hook_mask;
@@ -895,7 +895,7 @@ struct nf_chain_type {
};

int nft_chain_validate_dependency(const struct nft_chain *chain,
				  enum nft_chain_type type);
				  enum nft_chain_types type);
int nft_chain_validate_hooks(const struct nft_chain *chain,
                             unsigned int hook_flags);

@@ -917,7 +917,7 @@ struct nft_stats {
 */
struct nft_base_chain {
	struct nf_hook_ops		ops;
	const struct nf_chain_type	*type;
	const struct nft_chain_type	*type;
	u8				policy;
	u8				flags;
	struct nft_stats __percpu	*stats;
@@ -970,8 +970,8 @@ struct nft_table {
	char				*name;
};

int nft_register_chain_type(const struct nf_chain_type *);
void nft_unregister_chain_type(const struct nf_chain_type *);
int nft_register_chain_type(const struct nft_chain_type *);
void nft_unregister_chain_type(const struct nft_chain_type *);

int nft_register_expr(struct nft_expr_type *);
void nft_unregister_expr(struct nft_expr_type *);
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ nft_do_chain_bridge(void *priv,
	return nft_do_chain(&pkt, priv);
}

static const struct nf_chain_type filter_bridge = {
static const struct nft_chain_type filter_bridge = {
	.name		= "filter",
	.type		= NFT_CHAIN_T_DEFAULT,
	.family		= NFPROTO_BRIDGE,
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ nft_do_chain_arp(void *priv,
	return nft_do_chain(&pkt, priv);
}

static const struct nf_chain_type filter_arp = {
static const struct nft_chain_type filter_arp = {
	.name		= "filter",
	.type		= NFT_CHAIN_T_DEFAULT,
	.family		= NFPROTO_ARP,
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ static unsigned int nft_do_chain_ipv4(void *priv,
	return nft_do_chain(&pkt, priv);
}

static const struct nf_chain_type filter_ipv4 = {
static const struct nft_chain_type filter_ipv4 = {
	.name		= "filter",
	.type		= NFT_CHAIN_T_DEFAULT,
	.family		= NFPROTO_IPV4,
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ static unsigned int nft_nat_ipv4_local_fn(void *priv,
	return nf_nat_ipv4_local_fn(priv, skb, state, nft_nat_do_chain);
}

static const struct nf_chain_type nft_chain_nat_ipv4 = {
static const struct nft_chain_type nft_chain_nat_ipv4 = {
	.name		= "nat",
	.type		= NFT_CHAIN_T_NAT,
	.family		= NFPROTO_IPV4,
Loading