When printing timeouts with "pfctl -st", pfctl incorrectly tags one of the "adaptive" counts with a "s"econds suffix. This is because it uses the array index to determine what suffix to add, which is incorrect when the pf_timeouts array order does not match the order of the timeouts in the kernel. This patch makes pfctl use the timeout id rather than the array index to decide which suffix to use, which corrects this. Chris Pascoe 2004/07/19 Index: pfctl.c =================================================================== RCS file: /cvs/src/sbin/pfctl/pfctl.c,v retrieving revision 1.218 diff -u -r1.218 pfctl.c --- pfctl.c 16 Jul 2004 23:44:24 -0000 1.218 +++ pfctl.c 19 Jul 2004 21:46:11 -0000 @@ -776,7 +776,8 @@ 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");