1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00

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
This commit is contained in:
Bjoern A. Zeeb 2011-10-19 08:57:17 +00:00
parent 8552ee4b89
commit 18d97aa11c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226530

View File

@ -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