[PATCH] ping.c : fix min/max packet size usage
Denis Vlasenko
vda.linux at googlemail.com
Wed Feb 28 15:14:19 PST 2007
On Wednesday 28 February 2007 20:44, Florian Fainelli wrote:
> Hi all,
>
> An OpenWrt user reported that using packet size lower than 15, you could
> trigger the following bug :
>
> ping -s 1 -c 1 192.168.0.1
> PING 192.168.0.1 (192.168.0.1): 1 data bytes
> 9 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=291869364.5 ms
>
> The following patch adds maximum length checking for ICMP packets, as
> well as minimum usable size. Also, I noticed that datalen was not used
> when generating packets, when not specified, datalen is initialized to
> DEFDATALEN.
Thanks!
Unfortunately after 1.4.1 ping and ping6 got merged into one ping.c
(saving kilobytes of code) and your patch doesn't apply to current svn.
Care to rediff?
ping.c from current svn is attached.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ping.c
Type: text/x-csrc
Size: 20563 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20070301/f15aa685/attachment-0001.c
More information about the busybox
mailing list