diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2004-07-19 22:04:01 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2004-07-19 22:04:01 +0000 |
commit | 15253854c7126c4d8305156ace3778da156b4bad (patch) | |
tree | 3e6e9bf607f9e96dc226c64c18729a93d745cbd0 /sbin | |
parent | 92edaed1a7a96a6d7dcd3a888cd33d4d1f6fdebe (diff) |
print the correct labels when displaying timeouts with pfctl (eg, pfctl -st).
From Chris Pascoe.
ok dhartmei@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pfctl/pfctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 61927181590..cdb5888a84a 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.218 2004/07/16 23:44:24 frantzen Exp $ */ +/* $OpenBSD: pfctl.c,v 1.219 2004/07/19 22:04:00 dlg Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -776,7 +776,8 @@ pfctl_show_timeouts(int dev, int opts) if (ioctl(dev, DIOCGETTIMEOUT, &pt)) err(1, "DIOCGETTIMEOUT"); printf("%-20s %10d", pf_timeouts[i].name, pt.seconds); - if (i >= PFTM_ADAPTIVE_START && i <= PFTM_ADAPTIVE_END) + if (pf_timeouts[i].timeout >= PFTM_ADAPTIVE_START && + pf_timeouts[i].timeout <= PFTM_ADAPTIVE_END) printf(" states"); else printf("s"); |