diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2016-07-03 00:31:38 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2016-07-03 06:23:50 +0000 |
commit | 32e8f077a153175c33d5b58fd8a5919635e4446d (patch) | |
tree | 80e910bc9b005a7dd37bdadd09f60c432352ac88 | |
parent | 791c93f58f838d7d79d3cc35150ba187d9e5e052 (diff) |
ICMP: Avoid "no response found" for multicast ping
Ping-Bug: 12581
Change-Id: I6943d275de988e9de66bc01e2b421901947a5b95
Reviewed-on: https://code.wireshark.org/review/16252
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r-- | epan/dissectors/packet-icmp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c index e679266ae8..6e21bbead8 100644 --- a/epan/dissectors/packet-icmp.c +++ b/epan/dissectors/packet-icmp.c @@ -350,6 +350,10 @@ static const value_string interface_role_str[] = { #define MPLS_STACK_ENTRY_C_TYPE 1 #define MPLS_EXTENDED_PAYLOAD_C_TYPE 1 +/* Return true if the address is in the 224.0.0.0/4 network block */ +#define is_a_multicast_addr(addr) \ + ((g_ntohl(addr) & 0xf0000000) == 0xe0000000) + static conversation_t *_find_or_create_conversation(packet_info * pinfo) { conversation_t *conv = NULL; @@ -977,7 +981,11 @@ static icmp_transaction_t *transaction_start(packet_info * pinfo, icmp_key); } if (icmp_trans == NULL) { - if (PINFO_FD_VISITED(pinfo)) { + if (pinfo->dst.len == 4 && is_a_multicast_addr(*(const guint32 *)(pinfo->dst.data))) { + /* XXX We should support multicast echo requests, but we don't currently */ + /* Note the multicast destination and skip transaction tracking */ + col_append_str(pinfo->cinfo, COL_INFO, " (multicast)"); + } else if (PINFO_FD_VISITED(pinfo)) { /* No response found - add field and expert info */ it = proto_tree_add_item(tree, hf_icmp_no_resp, NULL, 0, 0, ENC_NA); |