Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: ipset: remove unused code

Function never used in current upstream code.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

authored by

stephen hemminger and committed by
Pablo Neira Ayuso
02eca9d2 34ce3240

-29
-1
include/linux/netfilter/ipset/ip_set.h
··· 331 331 const char *name, struct ip_set **set); 332 332 extern void ip_set_put_byindex(struct net *net, ip_set_id_t index); 333 333 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); 335 334 extern ip_set_id_t ip_set_nfnl_get_byindex(struct net *net, ip_set_id_t index); 336 335 extern void ip_set_nfnl_put(struct net *net, ip_set_id_t index); 337 336
-28
net/netfilter/ipset/ip_set_core.c
··· 625 625 */ 626 626 627 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 - 655 - /* 656 628 * Find set by index, reference it once. The reference makes sure the 657 629 * thing pointed to, does not go away under our feet. 658 630 *