diff options
-rw-r--r-- | networking/ping.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/ping.c b/networking/ping.c index 4e770bdbd..23b39f2e2 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
@@ -162,7 +162,7 @@ static void ping6(len_and_sockaddr *lsa) | |||
162 | bb_perror_msg("recvfrom"); | 162 | bb_perror_msg("recvfrom"); |
163 | continue; | 163 | continue; |
164 | } | 164 | } |
165 | if (c >= 8) { /* icmp6_hdr */ | 165 | if (c >= ICMP_MINLEN) { /* icmp6_hdr */ |
166 | pkt = (struct icmp6_hdr *) packet; | 166 | pkt = (struct icmp6_hdr *) packet; |
167 | if (pkt->icmp6_type == ICMP6_ECHO_REPLY) | 167 | if (pkt->icmp6_type == ICMP6_ECHO_REPLY) |
168 | break; | 168 | break; |