ping: use ICMP_MINLEN
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 23 Jan 2010 11:52:40 +0000 (12:52 +0100)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 23 Jan 2010 11:53:40 +0000 (12:53 +0100)
no code changes

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
networking/ping.c

index 4e770bdbdf5bc26c5fa82b30052a9a811d69080f..23b39f2e2dd59f6f68bc0d09a09313e86ac1afda 100644 (file)
@@ -162,7 +162,7 @@ static void ping6(len_and_sockaddr *lsa)
                                bb_perror_msg("recvfrom");
                        continue;
                }
-               if (c >= 8) {                   /* icmp6_hdr */
+               if (c >= ICMP_MINLEN) {                 /* icmp6_hdr */
                        pkt = (struct icmp6_hdr *) packet;
                        if (pkt->icmp6_type == ICMP6_ECHO_REPLY)
                                break;