summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2012-07-10 09:39:26 +0000
committerhenning <henning@openbsd.org>2012-07-10 09:39:26 +0000
commitc4051035a4e434d523153c9469757e459d9748c9 (patch)
tree3d2f63e418c57e8c61258d7225ddb0aff554d4c3
parentdefine a PFSTATE_SCRUBMASK. relying on numeric order of flags is stupid (diff)
downloadwireguard-openbsd-c4051035a4e434d523153c9469757e459d9748c9.tar.xz
wireguard-openbsd-c4051035a4e434d523153c9469757e459d9748c9.zip
use PFSTATE_SCRUBMASK
whenever you see (flags >= ONE_OF_THE_FLAGS), run. that must break sooner or later.
-rw-r--r--sbin/pfctl/pfctl_parser.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c
index d492ffbc1f1..e247b62eded 100644
--- a/sbin/pfctl/pfctl_parser.c
+++ b/sbin/pfctl/pfctl_parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.c,v 1.288 2012/07/10 09:23:56 henning Exp $ */
+/* $OpenBSD: pfctl_parser.c,v 1.289 2012/07/10 09:39:26 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -998,9 +998,7 @@ print_rule(struct pf_rule *r, const char *anchor_call, int opts)
if (r->rule_flag & PFRULE_FRAGMENT)
printf(" fragment");
- /* XXX the scrub_flags mess needs to be cleaned up */
- if ((r->scrub_flags & ~PFSTATE_SETTOS) >= PFSTATE_NODF ||
- r->min_ttl || r->max_mss) {
+ if (r->scrub_flags & PFSTATE_SCRUBMASK || r->min_ttl || r->max_mss) {
printf(" scrub (");
ropts = 1;
if (r->scrub_flags & PFSTATE_NODF) {