svn commit: r226530 - head/sys/contrib/pf/net

Bjoern A. Zeeb bz at FreeBSD.org
Wed Oct 19 08:57:17 UTC 2011


Author: bz
Date: Wed Oct 19 08:57:17 2011
New Revision: 226530
URL: http://svn.freebsd.org/changeset/base/226530

Log:
  Fix a bug when NPFSYNC > 0 that on FreeBSD we would always return
  and never remove state.
  
  This fixes the problem some people are seeing that state is removed when pf
  is loaded as a module but not in situations when compiled into the kernel.
  
  Reported by:	many on freebsd-pf
  Tested by:	flo
  MFC after:	3 days

Modified:
  head/sys/contrib/pf/net/pf.c

Modified: head/sys/contrib/pf/net/pf.c
==============================================================================
--- head/sys/contrib/pf/net/pf.c	Wed Oct 19 08:52:14 2011	(r226529)
+++ head/sys/contrib/pf/net/pf.c	Wed Oct 19 08:57:17 2011	(r226530)
@@ -1626,8 +1626,8 @@ pf_free_state(struct pf_state *cur)
 
 #if NPFSYNC > 0
 #ifdef __FreeBSD__
-	if (pfsync_state_in_use_ptr != NULL)
-		pfsync_state_in_use_ptr(cur);
+	if (pfsync_state_in_use_ptr != NULL &&
+		pfsync_state_in_use_ptr(cur))
 #else
 	if (pfsync_state_in_use(cur))
 #endif


More information about the svn-src-all mailing list