diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2003-05-12 01:25:33 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2003-05-12 01:25:33 +0000 |
commit | 4e1a3e6db441cb67c340c3d1fd13c9f1afcb96a1 (patch) | |
tree | 795327f86f48dfc5eba3746a29ed6c42d8188a6d /sbin/pfctl/pfctl.c | |
parent | 03cf287269743a3ba7ad0bac6bfd4e03e3c3da27 (diff) |
Adaptive timeout value scaling. Allows to reduce timeout values as the
number of state table entries grows, so entries time out faster before
the table fills up. Works both globally and per-rule. ok frantzen@
Diffstat (limited to 'sbin/pfctl/pfctl.c')
-rw-r--r-- | sbin/pfctl/pfctl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 3e7067cb981..b7b70cdc45b 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.170 2003/05/10 00:45:24 henning Exp $ */ +/* $OpenBSD: pfctl.c,v 1.171 2003/05/12 01:25:31 dhartmei Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -795,7 +795,12 @@ pfctl_show_timeouts(int dev) pt.timeout = pf_timeouts[i].timeout; if (ioctl(dev, DIOCGETTIMEOUT, &pt)) err(1, "DIOCGETTIMEOUT"); - printf("%-20s %10ds\n", pf_timeouts[i].name, pt.seconds); + printf("%-20s %10d", pf_timeouts[i].name, pt.seconds); + if (i >= PFTM_ADAPTIVE_START && i <= PFTM_ADAPTIVE_END) + printf(" states"); + else + printf("s"); + printf("\n"); } return (0); |