Ping issue in 1.20+
Denys Vlasenko
vda.linux at googlemail.com
Thu Jun 27 21:49:27 UTC 2013
On Thursday 27 June 2013 20:13, 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 ..
Please add debugging prints to inet_cksum() function - for one,
let's find out the value of nleft, addr[0], and the return value.
(IOW, let's find out whether we checksum over the correct buffer,
and whether we produce the same xsum we see in tcpdump.)
> 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 looked at it again and it look ok.
--
vda
More information about the busybox
mailing list