summaryrefslogtreecommitdiff
path: root/usr.bin/systat
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2008-09-01 23:30:09 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2008-09-01 23:30:09 +0000
commit4f7357f6ef09f021a47dea632eee625f94e09144 (patch)
tree9f6656b311d91c162f9f0a27950e9fb71999c7a4 /usr.bin/systat
parent1affb2997563f7f2f93eb6223cf40e0f3a9d7157 (diff)
Display direction In/Out/Any for rule display, not just In/Out.
ok canacar@
Diffstat (limited to 'usr.bin/systat')
-rw-r--r--usr.bin/systat/pftop.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/systat/pftop.c b/usr.bin/systat/pftop.c
index e902bafd0a4..e69e117bcd0 100644
--- a/usr.bin/systat/pftop.c
+++ b/usr.bin/systat/pftop.c
@@ -1,4 +1,4 @@
-/* $Id: pftop.c,v 1.4 2008/07/16 10:23:39 canacar Exp $ */
+/* $Id: pftop.c,v 1.5 2008/09/01 23:30:08 sthen Exp $ */
/*
* Copyright (c) 2001, 2007 Can Erkin Acar
* Copyright (c) 2001 Daniel Hartmeier
@@ -1281,7 +1281,13 @@ print_rule(struct pf_rule *pr)
print_fld_size(FLD_BYTES, pr->bytes[0] + pr->bytes[1]);
print_fld_uint(FLD_RULE, pr->nr);
- print_fld_str(FLD_DIR, pr->direction == PF_OUT ? "Out" : "In");
+ if (pr->direction == PF_OUT)
+ print_fld_str(FLD_DIR, "Out");
+ else if (pr->direction == PF_IN)
+ print_fld_str(FLD_DIR, "In");
+ else
+ print_fld_str(FLD_DIR, "Any");
+
if (pr->quick)
print_fld_str(FLD_QUICK, "Quick");