diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2018-04-12 15:31:47 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2018-04-13 16:27:02 +0000 |
commit | 55b2016283a08c49599efba951f44ac75a345a3e (patch) | |
tree | 994f103e5dbfd24669e9d0e559b1c0b42c263628 /epan/dissectors | |
parent | 75a63c6dfa0f4adc81bbceb415a326f32c49e3d4 (diff) |
MAC NR: add an expert info for unknown UDP framing tags
Change-Id: I03013e02856508179d1d75ece5d5c215b947eeb4
Reviewed-on: https://code.wireshark.org/review/26913
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-mac-nr.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/epan/dissectors/packet-mac-nr.c b/epan/dissectors/packet-mac-nr.c index efa285360f..ffbc7e3156 100644 --- a/epan/dissectors/packet-mac-nr.c +++ b/epan/dissectors/packet-mac-nr.c @@ -247,6 +247,7 @@ static int ett_mac_nr_me_phr_entry = -1; static expert_field ei_mac_nr_no_per_frame_data = EI_INIT; static expert_field ei_mac_nr_sdu_length_different_from_dissected = EI_INIT; +static expert_field ei_mac_nr_unknown_udp_framing_tag = EI_INIT; static dissector_handle_t nr_rrc_bcch_bch_handle; @@ -1861,8 +1862,19 @@ static gboolean dissect_mac_nr_heur(tvbuff_t *tvb, packet_info *pinfo, continue; default: /* It must be a recognised tag */ + { + proto_item *ti; + proto_tree *subtree; + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "MAC-NR"); + col_clear(pinfo->cinfo, COL_INFO); + ti = proto_tree_add_item(tree, proto_mac_nr, tvb, offset, tvb_reported_length(tvb), ENC_NA); + subtree = proto_item_add_subtree(ti, ett_mac_nr); + proto_tree_add_expert(subtree, pinfo, &ei_mac_nr_unknown_udp_framing_tag, + tvb, offset-1, 1); + } wmem_free(wmem_file_scope(), p_mac_nr_info); - return FALSE; + return TRUE; } } while (tag != MAC_NR_PAYLOAD_TAG); @@ -3113,6 +3125,7 @@ void proto_register_mac_nr(void) static ei_register_info ei[] = { { &ei_mac_nr_no_per_frame_data, { "mac-nr.no_per_frame_data", PI_UNDECODED, PI_WARN, "Can't dissect NR MAC frame because no per-frame info was attached!", EXPFILL }}, { &ei_mac_nr_sdu_length_different_from_dissected, { "mac-nr.sdu-length-different-from-dissected", PI_UNDECODED, PI_WARN, "Something is wrong with sdu length or dissection is wrong", EXPFILL }}, + { &ei_mac_nr_unknown_udp_framing_tag, { "mac-nr.unknown-udp-framing-tag", PI_UNDECODED, PI_WARN, "Unknown UDP framing tag, aborting dissection", EXPFILL }} }; module_t *mac_nr_module; |