Skip to content

Commit 10659cb

Browse files
committed
netfilter: nf_tables: rename to nft_set_lookup_global()
To prepare shorter introduction of shorter function prefix. Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 43a605f commit 10659cb

File tree

5 files changed

+19
-17
lines changed

5 files changed

+19
-17
lines changed

include/net/netfilter/nf_tables.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,11 @@ static inline struct nft_set *nft_set_container_of(const void *priv)
434434
return (void *)priv - offsetof(struct nft_set, data);
435435
}
436436

437-
struct nft_set *nft_set_lookup(const struct net *net,
438-
const struct nft_table *table,
439-
const struct nlattr *nla_set_name,
440-
const struct nlattr *nla_set_id,
441-
u8 genmask);
437+
struct nft_set *nft_set_lookup_global(const struct net *net,
438+
const struct nft_table *table,
439+
const struct nlattr *nla_set_name,
440+
const struct nlattr *nla_set_id,
441+
u8 genmask);
442442

443443
static inline unsigned long nft_set_gc_interval(const struct nft_set *set)
444444
{

net/netfilter/nf_tables_api.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2633,11 +2633,11 @@ static struct nft_set *nf_tables_set_lookup_byid(const struct net *net,
26332633
return ERR_PTR(-ENOENT);
26342634
}
26352635

2636-
struct nft_set *nft_set_lookup(const struct net *net,
2637-
const struct nft_table *table,
2638-
const struct nlattr *nla_set_name,
2639-
const struct nlattr *nla_set_id,
2640-
u8 genmask)
2636+
struct nft_set *nft_set_lookup_global(const struct net *net,
2637+
const struct nft_table *table,
2638+
const struct nlattr *nla_set_name,
2639+
const struct nlattr *nla_set_id,
2640+
u8 genmask)
26412641
{
26422642
struct nft_set *set;
26432643

@@ -2650,7 +2650,7 @@ struct nft_set *nft_set_lookup(const struct net *net,
26502650
}
26512651
return set;
26522652
}
2653-
EXPORT_SYMBOL_GPL(nft_set_lookup);
2653+
EXPORT_SYMBOL_GPL(nft_set_lookup_global);
26542654

26552655
static int nf_tables_set_alloc_name(struct nft_ctx *ctx, struct nft_set *set,
26562656
const char *name)

net/netfilter/nft_dynset.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ static int nft_dynset_init(const struct nft_ctx *ctx,
132132
priv->invert = true;
133133
}
134134

135-
set = nft_set_lookup(ctx->net, ctx->table, tb[NFTA_DYNSET_SET_NAME],
136-
tb[NFTA_DYNSET_SET_ID], genmask);
135+
set = nft_set_lookup_global(ctx->net, ctx->table,
136+
tb[NFTA_DYNSET_SET_NAME],
137+
tb[NFTA_DYNSET_SET_ID], genmask);
137138
if (IS_ERR(set))
138139
return PTR_ERR(set);
139140

net/netfilter/nft_lookup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ static int nft_lookup_init(const struct nft_ctx *ctx,
7171
tb[NFTA_LOOKUP_SREG] == NULL)
7272
return -EINVAL;
7373

74-
set = nft_set_lookup(ctx->net, ctx->table, tb[NFTA_LOOKUP_SET],
75-
tb[NFTA_LOOKUP_SET_ID], genmask);
74+
set = nft_set_lookup_global(ctx->net, ctx->table, tb[NFTA_LOOKUP_SET],
75+
tb[NFTA_LOOKUP_SET_ID], genmask);
7676
if (IS_ERR(set))
7777
return PTR_ERR(set);
7878

net/netfilter/nft_objref.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,9 @@ static int nft_objref_map_init(const struct nft_ctx *ctx,
117117
struct nft_set *set;
118118
int err;
119119

120-
set = nft_set_lookup(ctx->net, ctx->table, tb[NFTA_OBJREF_SET_NAME],
121-
tb[NFTA_OBJREF_SET_ID], genmask);
120+
set = nft_set_lookup_global(ctx->net, ctx->table,
121+
tb[NFTA_OBJREF_SET_NAME],
122+
tb[NFTA_OBJREF_SET_ID], genmask);
122123
if (IS_ERR(set))
123124
return PTR_ERR(set);
124125

0 commit comments

Comments
 (0)