shell_commands: check ICMPv6 echo reply sender
Fixes #11519 by checking the source address when an echo reply is received by the `ping6` command.
This commit is contained in:
parent
6e9612f1d1
commit
4a723fe4fd
@ -338,7 +338,8 @@ static void _print_reply(_ping_data_t *data, gnrc_pktsnip_t *icmpv6,
|
||||
uint16_t recv_seq;
|
||||
|
||||
/* not our ping */
|
||||
if (byteorder_ntohs(icmpv6_hdr->id) != data->id) {
|
||||
if ((byteorder_ntohs(icmpv6_hdr->id) != data->id) &&
|
||||
!ipv6_addr_equal(from, &data->host)) {
|
||||
return;
|
||||
}
|
||||
recv_seq = byteorder_ntohs(icmpv6_hdr->seq);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user