From owner-svn-src-all@FreeBSD.ORG Wed Oct 19 08:57:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96F2B1065672; Wed, 19 Oct 2011 08:57:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 872A28FC13; Wed, 19 Oct 2011 08:57:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9J8vHbY013032; Wed, 19 Oct 2011 08:57:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9J8vHBJ013030; Wed, 19 Oct 2011 08:57:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201110190857.p9J8vHBJ013030@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 19 Oct 2011 08:57:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226530 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2011 08:57:17 -0000 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