summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2016-06-30 01:32:12 +0000
committerbz <bz@FreeBSD.org>2016-06-30 01:32:12 +0000
commit47f08657c282849689c77271bcd8d2d51be8e80b (patch)
treebeaccc0c6808dbc7b9625682593655a1cd80ab12 /sys/contrib
parent94125daa1728385d847e6f0dccf14041d864a3ca (diff)
downloadFreeBSD-src-47f08657c282849689c77271bcd8d2d51be8e80b.zip
FreeBSD-src-47f08657c282849689c77271bcd8d2d51be8e80b.tar.gz
Remove unused global variables as well as unused memory
allocations from ipfilter in preparation for VNET support. Suggested by: cy (see D7000) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Approved by: re (gjb)
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/ipfilter/netinet/ip_fil.h1
-rw-r--r--sys/contrib/ipfilter/netinet/ip_fil_freebsd.c17
-rw-r--r--sys/contrib/ipfilter/netinet/ip_nat.c5
3 files changed, 0 insertions, 23 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h
index 0ae18e1..b065139 100644
--- a/sys/contrib/ipfilter/netinet/ip_fil.h
+++ b/sys/contrib/ipfilter/netinet/ip_fil.h
@@ -1710,7 +1710,6 @@ typedef struct ipf_main_softc_s {
#ifndef _KERNEL
extern int ipf_check __P((void *, struct ip *, int, void *, int, mb_t **));
-extern int (*ipf_checkp) __P((ip_t *, int, void *, int, mb_t **));
extern struct ifnet *get_unit __P((char *, int));
extern char *get_ifname __P((struct ifnet *));
extern int ipfioctl __P((ipf_main_softc_t *, int, ioctlcmd_t,
diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
index 5a4ed6c..f97e433 100644
--- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
+++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
@@ -99,10 +99,8 @@ MALLOC_DEFINE(M_IPFILTER, "ipfilter", "IP Filter packet filter data structures")
# endif
-static int (*ipf_savep) __P((void *, ip_t *, int, void *, int, struct mbuf **));
static int ipf_send_ip __P((fr_info_t *, mb_t *));
static void ipf_timer_func __P((void *arg));
-int ipf_locks_done = 0;
ipf_main_softc_t ipfmain;
@@ -110,10 +108,6 @@ ipf_main_softc_t ipfmain;
# if defined(NETBSD_PF)
# include <net/pfil.h>
# endif /* NETBSD_PF */
-/*
- * We provide the ipf_checkp name just to minimize changes later.
- */
-int (*ipf_checkp) __P((void *, ip_t *ip, int hlen, void *ifp, int out, mb_t **mp));
static eventhandler_tag ipf_arrivetag, ipf_departtag, ipf_clonetag;
@@ -221,11 +215,6 @@ ipfattach(softc)
}
- if (ipf_checkp != ipf_check) {
- ipf_savep = ipf_checkp;
- ipf_checkp = ipf_check;
- }
-
bzero((char *)ipfmain.ipf_selwait, sizeof(ipfmain.ipf_selwait));
softc->ipf_running = 1;
@@ -268,12 +257,6 @@ ipfdetach(softc)
#endif
callout_drain(&softc->ipf_slow_ch);
-#ifndef NETBSD_PF
- if (ipf_checkp != NULL)
- ipf_checkp = ipf_savep;
- ipf_savep = NULL;
-#endif
-
ipf_fini_all(softc);
softc->ipf_running = -2;
diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/sys/contrib/ipfilter/netinet/ip_nat.c
index 5d0e972..ec06b0f 100644
--- a/sys/contrib/ipfilter/netinet/ip_nat.c
+++ b/sys/contrib/ipfilter/netinet/ip_nat.c
@@ -133,8 +133,6 @@ static const char rcsid[] = "@(#)$FreeBSD$";
#define NBUMPSIDEDF(y,x)do { softn->ipf_nat_stats.ns_side[y].x++; \
DT1(x, fr_info_t *, fin); } while (0)
-frentry_t ipfnatblock;
-
static ipftuneable_t ipf_nat_tuneables[] = {
/* nat */
{ { (void *)offsetof(ipf_nat_softc_t, ipf_nat_lock) },
@@ -275,9 +273,6 @@ static void ipf_nat_tabmove __P((ipf_nat_softc_t *, nat_t *));
int
ipf_nat_main_load()
{
- bzero((char *)&ipfnatblock, sizeof(ipfnatblock));
- ipfnatblock.fr_flags = FR_BLOCK|FR_QUICK;
- ipfnatblock.fr_ref = 1;
return 0;
}
OpenPOWER on IntegriCloud