kern/168200: commit references a PR
dfilter service
dfilter at FreeBSD.ORG
Thu May 31 20:20:06 UTC 2012
The following reply was made to PR kern/168200; it has been noted by GNATS.
From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: kern/168200: commit references a PR
Date: Thu, 31 May 2012 20:10:15 +0000 (UTC)
Author: eri
Date: Thu May 31 20:10:05 2012
New Revision: 236364
URL: http://svn.freebsd.org/changeset/base/236364
Log:
Correct table counter functionality to not panic.
This was caused by not proper initialization of necessary parameters.
PR: 168200
Reviewed by: bz@, glebius@
MFC after: 1 week
Modified:
head/sys/contrib/pf/net/pf_ioctl.c
head/sys/contrib/pf/net/pf_table.c
head/sys/contrib/pf/net/pfvar.h
Modified: head/sys/contrib/pf/net/pf_ioctl.c
==============================================================================
--- head/sys/contrib/pf/net/pf_ioctl.c Thu May 31 19:34:53 2012 (r236363)
+++ head/sys/contrib/pf/net/pf_ioctl.c Thu May 31 20:10:05 2012 (r236364)
@@ -298,7 +298,7 @@ init_zone_var(void)
V_pf_altq_pl = V_pf_pooladdr_pl = NULL;
V_pf_frent_pl = V_pf_frag_pl = V_pf_cache_pl = V_pf_cent_pl = NULL;
V_pf_state_scrub_pl = NULL;
- V_pfr_ktable_pl = V_pfr_kentry_pl = NULL;
+ V_pfr_ktable_pl = V_pfr_kentry_pl = V_pfr_kcounters_pl = NULL;
}
void
@@ -317,6 +317,7 @@ cleanup_pf_zone(void)
UMA_DESTROY(V_pf_cent_pl);
UMA_DESTROY(V_pfr_ktable_pl);
UMA_DESTROY(V_pfr_kentry_pl);
+ UMA_DESTROY(V_pfr_kcounters_pl);
UMA_DESTROY(V_pf_state_scrub_pl);
UMA_DESTROY(V_pfi_addr_pl);
}
@@ -337,6 +338,7 @@ pfattach(void)
UMA_CREATE(V_pf_pooladdr_pl, struct pf_pooladdr, "pfpooladdrpl");
UMA_CREATE(V_pfr_ktable_pl, struct pfr_ktable, "pfrktable");
UMA_CREATE(V_pfr_kentry_pl, struct pfr_kentry, "pfrkentry");
+ UMA_CREATE(V_pfr_kcounters_pl, struct pfr_kcounters, "pfrkcounters");
UMA_CREATE(V_pf_frent_pl, struct pf_frent, "pffrent");
UMA_CREATE(V_pf_frag_pl, struct pf_fragment, "pffrag");
UMA_CREATE(V_pf_cache_pl, struct pf_fragment, "pffrcache");
Modified: head/sys/contrib/pf/net/pf_table.c
==============================================================================
--- head/sys/contrib/pf/net/pf_table.c Thu May 31 19:34:53 2012 (r236363)
+++ head/sys/contrib/pf/net/pf_table.c Thu May 31 20:10:05 2012 (r236364)
@@ -179,7 +179,6 @@ struct pfr_walktree {
VNET_DEFINE(uma_zone_t, pfr_ktable_pl);
VNET_DEFINE(uma_zone_t, pfr_kentry_pl);
VNET_DEFINE(uma_zone_t, pfr_kcounters_pl);
-#define V_pfr_kcounters_pl VNET(pfr_kcounters_pl)
VNET_DEFINE(struct sockaddr_in, pfr_sin);
#define V_pfr_sin VNET(pfr_sin)
VNET_DEFINE(struct sockaddr_in6, pfr_sin6);
Modified: head/sys/contrib/pf/net/pfvar.h
==============================================================================
--- head/sys/contrib/pf/net/pfvar.h Thu May 31 19:34:53 2012 (r236363)
+++ head/sys/contrib/pf/net/pfvar.h Thu May 31 20:10:05 2012 (r236364)
@@ -1868,6 +1868,8 @@ VNET_DECLARE(uma_zone_t, pfr_ktable_pl
#define V_pfr_ktable_pl VNET(pfr_ktable_pl)
VNET_DECLARE(uma_zone_t, pfr_kentry_pl);
#define V_pfr_kentry_pl VNET(pfr_kentry_pl)
+VNET_DECLARE(uma_zone_t, pfr_kcounters_pl);
+#define V_pfr_kcounters_pl VNET(pfr_kcounters_pl)
VNET_DECLARE(uma_zone_t, pf_cache_pl);
#define V_pf_cache_pl VNET(pf_cache_pl)
VNET_DECLARE(uma_zone_t, pf_cent_pl);
_______________________________________________
svn-src-all at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
More information about the freebsd-pf
mailing list