From: mikeb Date: Tue, 20 Jan 2015 17:25:35 +0000 (+0000) Subject: Prevent tables referenced by rules in anchors from getting disabled. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=21c53b85da3dcb5e4f1111559c5d392339542ce7;p=openbsd Prevent tables referenced by rules in anchors from getting disabled. Analysis and patch by Richard Kojedzinszky, thanks! ok henning --- diff --git a/sys/net/pf_table.c b/sys/net/pf_table.c index 9ee25780988..4e43c4ca539 100644 --- a/sys/net/pf_table.c +++ b/sys/net/pf_table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_table.c,v 1.104 2014/12/19 17:14:40 tedu Exp $ */ +/* $OpenBSD: pf_table.c,v 1.105 2015/01/20 17:25:35 mikeb Exp $ */ /* * Copyright (c) 2002 Cedric Berger @@ -1896,6 +1896,7 @@ pfr_setflags_ktable(struct pfr_ktable *kt, int newf) struct pfr_kentryworkq addrq; if (!(newf & PFR_TFLAG_REFERENCED) && + !(newf & PFR_TFLAG_REFDANCHOR) && !(newf & PFR_TFLAG_PERSIST)) newf &= ~PFR_TFLAG_ACTIVE; if (!(newf & PFR_TFLAG_ACTIVE))