Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!security!genrad!grkermit!masscomp!clyde!floyd!harpo!seismo!hao!hplabs!sri-unix!mike@brl-vgr From: mike%brl-vgr@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: Fix for 20% loss of ICMP Packets Message-ID: <14586@sri-arpa.UUCP> Date: Wed, 14-Dec-83 03:55:38 EST Article-I.D.: sri-arpa.14586 Posted: Wed Dec 14 03:55:38 1983 Date-Received: Sat, 17-Dec-83 01:22:03 EST Lines: 89 From: Michael John Muuss Index: sys/netinet/ip_icmp.c 4.2BSD Description: When using a "ping" program to send ICMP_ECHO packets onto the network, a steady 20% of them are lost, regardless of interface, including the software loopback driver. The problem is that ip_icmp is incorrectly looking in the sequence number and ID field of the ICMP header, as if this was an "error advice" packet much like ICMP_REDIRECT. Repeat-By: Ping the loopback device. Ping program availible on request. (Pitty that one was not included with 4.2) Fix: A little code has to be rearranged in ip_icmp.c, around line 200+. ******* ORIGINAL CODE ******* goto free; /* not yet implemented: ignore */ #endif case ICMP_REDIRECT: case ICMP_ECHOREPLY: case ICMP_TSTAMPREPLY: case ICMP_IREQREPLY: if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp)) { icmpstat.icps_badlen++; goto free; } /* * Short circuit routing redirects to force * immediate change in the kernel's routing * tables. The message is also handed to anyone * listening on a raw socket (e.g. the routing * daemon for use in updating it's tables). */ if (icp->icmp_type == ICMP_REDIRECT) { icmpsrc.sin_addr = icp->icmp_ip.ip_dst; icmpdst.sin_addr = icp->icmp_gwaddr; rtredirect((struct sockaddr *)&icmpsrc, (struct sockaddr *)&icmpdst); } icmpsrc.sin_addr = ip->ip_src; icmpdst.sin_addr = ip->ip_dst; raw_input(dtom(icp), &icmproto, (struct sockaddr *)&icmpsrc, (struct sockaddr *)&icmpdst); return; default: goto free; ********** Correct code ********** goto free; /* not yet implemented: ignore */ #endif case ICMP_R