Hi,
I just came across the problem with ping and egcs. If you do
# ping -s 57 localhost
PING localhost (127.0.0.1): 57 data bytes
^C
--- localhost ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
if the data size is even number, it works OK. I think that
the problem is that EGCS generates bad code in in_cksum()
with -O.
Compiling with -O0 solves the problem as well as applying
following patch fixes it.
I wonder if how many problems like this go unnoticed....
*** ping.c-org Fri Aug 20 09:38:33 1999
--- ping.c Fri Aug 20 09:39:08 1999
***************
*** 944,949 ****
--- 944,950 ----
/* mop up an odd byte, if necessary */
if (nleft == 1) {
*(u_char *)(&answer) = *(u_char *)w ;
+ *((u_char *)(&answer)+1) = 0;
sum += answer;
}
Tammy
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message