diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2022-08-12 14:49:16 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2022-08-12 14:49:16 +0000 |
commit | fbc32b0f00f23ab9c4f91506e631838033f150be (patch) | |
tree | 58b8e3e8956551aa24d55d6a6fca43cc8750f867 /usr.bin/netstat | |
parent | c5809ba8cfd83d3a6df37582a7645dc07eb9240e (diff) |
There are some places in ip and ip6 input where operations fail due
to out of memory. Use a generic idropped counter for those.
OK mvs@
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/inet.c | 3 | ||||
-rw-r--r-- | usr.bin/netstat/inet6.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 98994cb373a..2157946fc19 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.c,v 1.173 2021/12/05 22:36:19 deraadt Exp $ */ +/* $OpenBSD: inet.c,v 1.174 2022/08/12 14:49:15 bluhm Exp $ */ /* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */ /* @@ -612,6 +612,7 @@ ip_stats(char *name) p(ips_outswcsum, "\t%lu output datagram%s software-checksummed\n"); p(ips_notmember, "\t%lu multicast packet%s which we don't join\n"); p(ips_wrongif, "\t%lu packet%s received on wrong interface\n"); + p(ips_idropped, "\t%lu input packet%s dropped due to no bufs, etc.\n"); #undef p #undef p1 } diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c index 6f307e68d86..38d63988b03 100644 --- a/usr.bin/netstat/inet6.c +++ b/usr.bin/netstat/inet6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet6.c,v 1.55 2021/01/26 18:22:35 deraadt Exp $ */ +/* $OpenBSD: inet6.c,v 1.56 2022/08/12 14:49:15 bluhm Exp $ */ /* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */ /* * Copyright (c) 1983, 1988, 1993 @@ -481,6 +481,8 @@ ip6_stats(char *name) p1(ip6s_forward_cachehit, "\t%llu forward cache hit\n"); p1(ip6s_forward_cachemiss, "\t%llu forward cache miss\n"); + p(ip6s_idropped, + "\t%llu input packet%s dropped due to no bufs, etc.\n"); #undef p #undef p1 } |