diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-09-04 23:00:37 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-09-04 23:00:37 +0000 |
commit | 5d67dfc96b3244904b97ad6a2cecad03c7e2c1e3 (patch) | |
tree | 986f297d2500aee07793d6d4735fccbce488a0ec /usr.bin/netstat | |
parent | 0c6afb74ebc45f551768700794ad3235f7259bbf (diff) |
Fix netstat output of uses of current SYN cache left.
TCP syn cache variable scs_use is basically counting packet insertions
into syn cache. Prefer type long to exclude overflow on fast
machines. Due to counting downwards from a limit, it can become
negative. Copy it out as tcps_sc_uses_left via sysctl, and print
it as signed long long integer.
OK mvs@
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/inet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index a677d22a377..94089d5b8a1 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.c,v 1.178 2023/07/07 09:15:13 yasuoka Exp $ */ +/* $OpenBSD: inet.c,v 1.179 2023/09/04 23:00:36 bluhm Exp $ */ /* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */ /* @@ -498,7 +498,7 @@ tcp_stats(char *name) "\t%llu entr%s in current SYN cache, limit is %llu\n"); p2b(tcps_sc_bucket_maxlen, tcps_sc_bucket_limit, "\t%llu longest bucket length in current SYN cache, limit is %llu\n"); - p(tcps_sc_uses_left, "\t%llu use%s of current SYN cache left\n"); + p(tcps_sc_uses_left, "\t%lld use%s of current SYN cache left\n"); p(tcps_sack_recovery_episode, "\t%llu SACK recovery episode%s\n"); p(tcps_sack_rexmits, |