[2164] in Athena Bugs
netstat bug
daemon@ATHENA.MIT.EDU (jtkohl@ATHENA.MIT.EDU)
Thu May 4 10:00:18 1989
From: <jtkohl@ATHENA.MIT.EDU>
Date: Thu, 4 May 89 10:00:00 EDT
To: bugs@ATHENA.MIT.EDU
Path: bloom-beacon!husc6!cs.utexas.edu!uunet!auspex!guy
From: guy@auspex.auspex.com (Guy Harris)
Newsgroups: comp.bugs.4bsd
Subject: "netstat -s" switches "size smaller than min" and "size < length"
Message-ID: <1551@auspex.auspex.com>
Date: 3 May 89 20:48:07 GMT
Reply-To: guy@auspex.auspex.com (Guy Harris)
Organization: Auspex Systems, Santa Clara
Lines: 40
Index: ucb 4.3BSD-tahoe
Description:
"netstat -s" prints "ipstat.ips_tooshort", which is the count of
packets dropped because the data in the packet was less than the
size given in the IP header, with the description "...with size
smaller than minimum", and prints "ipstat.ips_toosmall", which
is the count of packets dropped because they were smaller than
the IP header size, with the description "...with data size <
data length". The descriptions are reversed.
Repeat-By:
Try using "netstat" to figure out why packets are being dropped,
note that the reason given doesn't make any sense, and then
verify that it doesn't make any sense by using a Sniffer to peek
inside the packets. Or just check out "ucb/netstat/inet.c" and
"sys/netinet/ip_input.c" ....
Fix:
Modify "ucb/netstat/inet.c" as follows:
*** inet.c.orig Wed May 3 13:38:55 1989
--- inet.c Wed May 3 13:41:43 1989
***************
*** 243,250 ****
ipstat.ips_total);
printf("\t%u bad header checksum%s\n",
ipstat.ips_badsum, plural(ipstat.ips_badsum));
! printf("\t%u with size smaller than minimum\n", ipstat.ips_tooshort);
! printf("\t%u with data size < data length\n", ipstat.ips_toosmall);
printf("\t%u with header length < data size\n", ipstat.ips_badhlen);
printf("\t%u with data length < header length\n", ipstat.ips_badlen);
printf("\t%u fragment%s received\n",
--- 243,250 ----
ipstat.ips_total);
printf("\t%u bad header checksum%s\n",
ipstat.ips_badsum, plural(ipstat.ips_badsum));
! printf("\t%u with size smaller than minimum\n", ipstat.ips_toosmall);
! printf("\t%u with data size < data length\n", ipstat.ips_tooshort);
printf("\t%u with header length < data size\n", ipstat.ips_badhlen);
printf("\t%u with data length < header length\n", ipstat.ips_badlen);
printf("\t%u fragment%s received\n",