Ping issue in 1.20+

Tito farmatito at tiscali.it
Thu Jun 27 19:28:33 UTC 2013


On Thursday 27 June 2013 20:13:16 Giovanni Vallesi - TeeBX wrote:
> Hi All,
> after updating from busybox 1.19.4 to 1.20.2 or 1.21.0 I got a strange 
> issue using the ping applet:
> - The first icmp packet is sent and get the target reply as expected.
> - The applet continue sending icmp, but no console output.
> - Interrupting the applet report ping statistics with a large number of 
> missing packets.
> 
> After some network debugging I discovered that the every icmp packet 
> sent after the first one has a wrong checksum. Below the first two 
> captured packets in hex format.
> 
> 161	45.089741	172.31.255.109	172.31.255.1	ICMP request
> (correct checksum 0x5D76)
> 0000   00 a0 f9 2a 28 d0 00 0c 29 9b 9e 39 08 00 45 00  ...*(...)..9..E.
> 0010   00 54 00 00 40 00 40 01 e3 fa ac 1f ff 6d ac 1f  .T.. at .@......m..
> 0020   ff 01 08 00 5d 76 3e 06 00 00 46 7a 16 09 00 00  ....]v>...Fz....
> 0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> 0040   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> 0050   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> 0060   00 00                                            ..
> 
> 170	46.090539	172.31.255.109	172.31.255.1	ICMP request
> (wrong checksum 0xAAB9, expected 0x0830)
> 0000   00 a0 f9 2a 28 d0 00 0c 29 9b 9e 39 08 00 45 00  ...*(...)..9..E.
> 0010   00 54 00 00 40 00 40 01 e3 fa ac 1f ff 6d ac 1f  .T.. at .@......m..
> 0020   ff 01 08 00 aa b9 3e 06 00 01 8c bf 25 09 00 00  ......>.....%...
> 0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> 0040   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> 0050   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> 0060   00 00                                            ..
> 
> Busybox was compiled using gcc 4.5 for x86 or ARM architectures, linked 
> against eglibc 2.13 or uClibc 0.9.30.1, using kernel 3.2.45 for x86 and
> 3.0.62/3.2.21 for ARMs.
> The Busybox 1.19.4 ping applet works on all the above, same issue on all 
> using 1.20.2+.
> 
> My C programming skill are really round to zero but I found that the 
> most significant code change was from this commit:
> - 
> http://git.busybox.net/busybox/commit/?id=e8f36330d9bb27f9f7e66aa6f01ff92c07d86f62
> 
> Essentially a change from a sparse/duplicated in_cksum() function 
> refactoring a common inet_cksum().
> I see that this involve also traceroute and dhcp but, interesting, both 
> works properly for me in all tested version above.
> 
> I tried to revert the most network/ping.c code as before the refactoring 
> (like it was in 1.19.4) and this way the ping applet works again.
> The rude patch/hack is here (busybox-1.21.0-ping_revert.patch):
> - http://code.google.com/p/teebx/source/detail?r=180
> 
> Hope some experienced developer could find the right solution or 
> suggest/pointing me to anything else I'm doing wrong.
> 
> 

Hi,
tested it on BusyBox v1.22.0.git on x86 and it works for me:
1) without option fancy ping:

./busybox ping www.kernel.org
www.kernel.org is alive!

2) with option fancy ping:

./busybox ping www.kernel.org
PING www.kernel.org (198.145.20.140): 56 data bytes
64 bytes from 198.145.20.140: seq=0 ttl=48 time=231.590 ms
64 bytes from 198.145.20.140: seq=1 ttl=48 time=231.037 ms
64 bytes from 198.145.20.140: seq=2 ttl=48 time=230.330 ms
64 bytes from 198.145.20.140: seq=3 ttl=48 time=231.312 ms
64 bytes from 198.145.20.140: seq=4 ttl=48 time=230.826 ms
64 bytes from 198.145.20.140: seq=5 ttl=48 time=231.566 ms
64 bytes from 198.145.20.140: seq=6 ttl=48 time=232.809 ms
64 bytes from 198.145.20.140: seq=7 ttl=48 time=230.938 ms
64 bytes from 198.145.20.140: seq=8 ttl=48 time=231.422 ms
^C
--- www.kernel.org ping statistics ---
9 packets transmitted, 9 packets received, 0% packet loss
round-trip min/avg/max = 230.330/231.314/232.809 ms

You should post your .config file so thatb others can try to reproduce the bug.


Ciao,
Tito




More information about the busybox mailing list