Fix a terrible braino in pfi_maybe_destroy() and unbreak "$pfctl -Fall" with

renamed interfaces.

PR:		kern/77645
Reported by:	Harald Schmalzbauer <harryNOschmalzbauerSPAMde>
Reviewed by:	yongari
MFC after:	3 days
This commit is contained in:
mlaier 2005-02-21 17:20:00 +00:00
parent a448425842
commit 1ad7875704

View File

@ -849,10 +849,13 @@ pfi_maybe_destroy(struct pfi_kif *p)
int i, j, k, s;
struct pfi_kif *q = p->pfik_parent;
#ifdef __FreeBSD__
if ((p->pfik_flags & (PFI_IFLAG_ATTACHED | PFI_IFLAG_GROUP)) ||
((p->pfik_rules > 0 || p->pfik_states > 0) &&
(p->pfik_flags & PFI_IFLAG_PLACEHOLDER) == 0))
#else
if ((p->pfik_flags & (PFI_IFLAG_ATTACHED | PFI_IFLAG_GROUP)) ||
p->pfik_rules > 0 || p->pfik_states > 0)
#ifdef __FreeBSD__
if (!(p->pfik_flags & PFI_IFLAG_PLACEHOLDER))
#endif
return (0);