From 87e4ca37d50259766571236991879c402e20a4fa Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Thu, 8 Nov 2018 21:54:40 +0000 Subject: [PATCH] pf: Prevent tables referenced by rules in anchors from getting disabled. PR: 183198 Obtained from: OpenBSD MFC after: 2 weeks --- sys/netpfil/pf/pf_table.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netpfil/pf/pf_table.c b/sys/netpfil/pf/pf_table.c index 0e43c0b846c8..85f2b0173549 100644 --- a/sys/netpfil/pf/pf_table.c +++ b/sys/netpfil/pf/pf_table.c @@ -1754,6 +1754,7 @@ pfr_setflags_ktable(struct pfr_ktable *kt, int newf) PF_RULES_WASSERT(); if (!(newf & PFR_TFLAG_REFERENCED) && + !(newf & PFR_TFLAG_REFDANCHOR) && !(newf & PFR_TFLAG_PERSIST)) newf &= ~PFR_TFLAG_ACTIVE; if (!(newf & PFR_TFLAG_ACTIVE))