don't crash if the icmp request came in fragmented. this will happen because ipoput4 will assert if bp->next for a less-than-medialen packet. example of how to trigger ping -s 1500 target;. in my case i was getting two frags of 1492 and 8 bytes. Notes: Thu Mar 29 14:29:53 EDT 2012 geoff probably icmp6.c needs the same fix. Reference: /n/sources/patch/applied/icmp-frag Date: Tue Mar 13 06:25:59 CET 2012 Signed-off-by: quanstro@quanstro.net Reviewed-by: geoff --- /sys/src/9/ip/icmp.c Tue Mar 13 06:23:45 2012 +++ /sys/src/9/ip/icmp.c Tue Mar 13 06:23:42 2012 @@ -366,7 +366,7 @@ case EchoRequest: if (iplen < n) bp = trimblock(bp, 0, iplen); - r = mkechoreply(bp); + r = mkechoreply(concatblock(bp)); ipriv->out[EchoReply]++; ipoput4(icmp->f, r, 0, MAXTTL, DFLTTOS, nil); break;