summaryrefslogtreecommitdiffstats
path: root/sbin/pfctl/pfctl_parser.c
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2012-09-18 10:11:52 +0000
committerhenning <henning@openbsd.org>2012-09-18 10:11:52 +0000
commit08263cb1b79db2a3882e28adb4bf1ab2f466a144 (patch)
treebab510e3b895c2a2d154b32cfb3e96b830b5337b /sbin/pfctl/pfctl_parser.c
parentPrint the wieght in the show rib detail output. OK sthen@, henning@ (diff)
downloadwireguard-openbsd-08263cb1b79db2a3882e28adb4bf1ab2f466a144.tar.xz
wireguard-openbsd-08263cb1b79db2a3882e28adb4bf1ab2f466a144.zip
prio 0 is valid, therefore, I chose an "impossible" value for prio meaning
"not set" and used a PF_PRIO_NOTSET define for it. now that means that everything that creates a struct pf_rule doesn't get away with bzero'ing it, which turned out to be not so nice. so get rid of PF_PRIO_NOTSET, instead, make a rule+state flag PFSTATE_SETPRIO which indicates wether the prio should be set. ok benno claudio mikeb
Diffstat (limited to 'sbin/pfctl/pfctl_parser.c')
-rw-r--r--sbin/pfctl/pfctl_parser.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c
index e247b62eded..5b81642b5e8 100644
--- a/sbin/pfctl/pfctl_parser.c
+++ b/sbin/pfctl/pfctl_parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.c,v 1.289 2012/07/10 09:39:26 henning Exp $ */
+/* $OpenBSD: pfctl_parser.c,v 1.290 2012/09/18 10:11:53 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -843,11 +843,10 @@ print_rule(struct pf_rule *r, const char *anchor_call, int opts)
if (r->tos)
printf(" tos 0x%2.2x", r->tos);
- if (r->set_prio[0] != PF_PRIO_NOTSET ||
- r->scrub_flags & PFSTATE_SETTOS) {
+ if (r->scrub_flags & PFSTATE_SETMASK) {
char *comma = "";
printf(" set (");
- if (r->set_prio[0] != PF_PRIO_NOTSET) {
+ if (r->scrub_flags & PFSTATE_SETPRIO) {
if (r->set_prio[0] == r->set_prio[1])
printf("%s prio %u", comma, r->set_prio[0]);
else