disallow -f and -r being used together. one can't send as fast as possible and with a random delay simultaneously and this results in the following crash reported on the list: acid: stk() nrand(n=0x0)+0x18 /sys/src/libc/port/nrand.c:13 sender(msglen=0x40,n=0x20,interval=0x0,fd=0x6)+0x151 /sys/src/cmd/ip/ping.c:268 main(argv=0xdfffefa4,argc=0x1)+0x212 /sys/src/cmd/ip/ping.c:571 _main+0x31 /sys/src/libc/386/main9.s:16 Reference: /n/sources/patch/sorry/ping-rf Date: Mon Mar 9 14:29:10 CET 2009 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/ip/ping.c Mon Mar 9 14:24:42 2009 +++ /sys/src/cmd/ip/ping.c Mon Mar 9 14:24:41 2009 @@ -532,6 +532,10 @@ break; } ARGEND; + if(flood && rint){ + fprint(2, "-f and -r are not compatable\n"); + usage(); + } if(msglen < proto->iphdrsz + ICMP_HDRSIZE) msglen = proto->iphdrsz + ICMP_HDRSIZE; if(msglen < 64) --- /sys/man/8/ping Mon Mar 9 14:24:49 2009 +++ /sys/man/8/ping Mon Mar 9 14:24:48 2009 @@ -83,7 +83,9 @@ adds the IP source and destination addresses to each report. .TP .B f -send messages as fast as possible (flood). +send messages as fast as possible (flood). This flag +is not compatable with +.BR -r . .TP .B i sets the time between messages @@ -104,7 +106,9 @@ .TP .B r randomizes the delay with a minimum extra delay of 0 ms and a -maximum extra delay of the selected interval. +maximum extra delay of the selected interval. This flag +is not compatable with +.BR -f . .TP .B s sets the length of the message to be