https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288680
Bug ID: 288680
Summary: netstat delivered count can be corrupt (negative)
Product: Base System
Version: 13.5-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
The following illustrates the issue:
# netstat -s -p udp
udp:
1 datagram received
0 with incomplete header
0 with bad data length field
0 with bad checksum
0 with no checksum
1 dropped due to no socket
1 broadcast/multicast datagram undelivered
0 dropped due to full socket buffers
0 not for hashed pcb
18446744073709551615 delivered
0 datagrams output
0 times multicast source filter matched
The delivered count is calculated here:
https://github.com/freebsd/freebsd-src/blob/releng/13.5/usr.bin/netstat/inet.c#L938
The "udps_noport" count already includes the "udps_noportbcast" count.
The "duplicate" subtraction corrupts the "delivered" count.
--
You are receiving this mail because:
You are the assignee for the bug.