1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

Merge pull request #11933 from miri64/shell/fix/check-sender

shell_commands: check ICMPv6 echo reply sender
This commit is contained in:
Francisco 2019-08-09 16:27:39 +02:00 committed by GitHub
commit 56a6e5d53e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);