Skip to content

Commit 02eca9d

Browse files
shemmingerummakynes
authored andcommitted
netfilter: ipset: remove unused code
Function never used in current upstream code. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 34ce324 commit 02eca9d

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

include/linux/netfilter/ipset/ip_set.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ extern ip_set_id_t ip_set_get_byname(struct net *net,
331331
const char *name, struct ip_set **set);
332332
extern void ip_set_put_byindex(struct net *net, ip_set_id_t index);
333333
extern const char *ip_set_name_byindex(struct net *net, ip_set_id_t index);
334-
extern ip_set_id_t ip_set_nfnl_get(struct net *net, const char *name);
335334
extern ip_set_id_t ip_set_nfnl_get_byindex(struct net *net, ip_set_id_t index);
336335
extern void ip_set_nfnl_put(struct net *net, ip_set_id_t index);
337336

net/netfilter/ipset/ip_set_core.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -624,34 +624,6 @@ EXPORT_SYMBOL_GPL(ip_set_name_byindex);
624624
* call nfnl_lock for us.
625625
*/
626626

627-
/*
628-
* Find set by name, reference it once. The reference makes sure the
629-
* thing pointed to, does not go away under our feet.
630-
*
631-
* The nfnl mutex is used in the function.
632-
*/
633-
ip_set_id_t
634-
ip_set_nfnl_get(struct net *net, const char *name)
635-
{
636-
ip_set_id_t i, index = IPSET_INVALID_ID;
637-
struct ip_set *s;
638-
struct ip_set_net *inst = ip_set_pernet(net);
639-
640-
nfnl_lock(NFNL_SUBSYS_IPSET);
641-
for (i = 0; i < inst->ip_set_max; i++) {
642-
s = nfnl_set(inst, i);
643-
if (s != NULL && STREQ(s->name, name)) {
644-
__ip_set_get(s);
645-
index = i;
646-
break;
647-
}
648-
}
649-
nfnl_unlock(NFNL_SUBSYS_IPSET);
650-
651-
return index;
652-
}
653-
EXPORT_SYMBOL_GPL(ip_set_nfnl_get);
654-
655627
/*
656628
* Find set by index, reference it once. The reference makes sure the
657629
* thing pointed to, does not go away under our feet.

0 commit comments

Comments
 (0)