summaryrefslogtreecommitdiff
path: root/usr.bin/systat/pftop.c
diff options
context:
space:
mode:
authorCan Erkin Acar <canacar@cvs.openbsd.org>2009-04-04 03:29:54 +0000
committerCan Erkin Acar <canacar@cvs.openbsd.org>2009-04-04 03:29:54 +0000
commitbee6a76ab4079fdbd333a020f610066a1bf42d8b (patch)
tree1cba9bc02108f405663c835272b1374c6e66f0b1 /usr.bin/systat/pftop.c
parent8c5a437e4dba334889cddf65721b00377faa5c6f (diff)
Fix the byte order of the rule field in state view.
Reported by Kamil Mielcarek
Diffstat (limited to 'usr.bin/systat/pftop.c')
-rw-r--r--usr.bin/systat/pftop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/systat/pftop.c b/usr.bin/systat/pftop.c
index d4e63f78b78..a3fc1c4cffd 100644
--- a/usr.bin/systat/pftop.c
+++ b/usr.bin/systat/pftop.c
@@ -1,4 +1,4 @@
-/* $Id: pftop.c,v 1.8 2009/01/01 22:50:39 mcbride Exp $ */
+/* $Id: pftop.c,v 1.9 2009/04/04 03:29:53 canacar Exp $ */
/*
* Copyright (c) 2001, 2007 Can Erkin Acar
* Copyright (c) 2001 Daniel Hartmeier
@@ -861,7 +861,7 @@ print_state(struct pfsync_state * s, struct sc_ent * ent)
print_fld_rate(FLD_SA, (s->creation) ?
((double)sz/ntohl((double)s->creation)) : -1);
- print_fld_uint(FLD_RULE, s->rule);
+ print_fld_uint(FLD_RULE, ntohl(s->rule));
if (cachestates && ent != NULL) {
print_fld_rate(FLD_SI, ent->rate);
print_fld_rate(FLD_SP, ent->peak);