Ping issue in 1.20+
Giovanni Vallesi - TeeBX
giovanni.v at teebx.com
Thu Jun 27 18:13:16 UTC 2013
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.
--
TeeBX VoIP communication platform (coming soon)
http://code.google.com/p/teebx/
-----------------------------------------------
Lightweight++ Business Friendly++ Open++
More information about the busybox
mailing list