From 0c24bfcd0ddcc574bfd24dccffe790161a2c064c Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 10 Sep 2019 20:32:08 +0200 Subject: [PATCH] shell_commands: fix ping6 response check for multicast --- sys/shell/commands/sc_gnrc_icmpv6_echo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/shell/commands/sc_gnrc_icmpv6_echo.c b/sys/shell/commands/sc_gnrc_icmpv6_echo.c index 576068bb9d75..0d410a650437 100644 --- a/sys/shell/commands/sc_gnrc_icmpv6_echo.c +++ b/sys/shell/commands/sc_gnrc_icmpv6_echo.c @@ -338,7 +338,10 @@ 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) { + return; + } + if (!ipv6_addr_is_multicast(&data->host) && !ipv6_addr_equal(from, &data->host)) { return; }