ping: use ICMP_MINLEN
no code changes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
This commit is contained in:
parent
24dc9ab2f4
commit
dfd38a480b
@ -162,7 +162,7 @@ static void ping6(len_and_sockaddr *lsa)
|
|||||||
bb_perror_msg("recvfrom");
|
bb_perror_msg("recvfrom");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (c >= 8) { /* icmp6_hdr */
|
if (c >= ICMP_MINLEN) { /* icmp6_hdr */
|
||||||
pkt = (struct icmp6_hdr *) packet;
|
pkt = (struct icmp6_hdr *) packet;
|
||||||
if (pkt->icmp6_type == ICMP6_ECHO_REPLY)
|
if (pkt->icmp6_type == ICMP6_ECHO_REPLY)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user