aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2018-04-12 15:44:36 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2018-04-13 16:27:31 +0000
commitb78577f1bce3dcf67729d5703b5ba3e1d7df59fe (patch)
tree54b2cbb6d2f8d6813ec98d983eeb8fe6edcada51 /epan/dissectors
parent55b2016283a08c49599efba951f44ac75a345a3e (diff)
RLC NR: add an expert info for unknown UDP framing tags
Change-Id: I8a103840b3c795ce76c8a1af04a5751d6901e62f Reviewed-on: https://code.wireshark.org/review/26914 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-rlc-nr.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/epan/dissectors/packet-rlc-nr.c b/epan/dissectors/packet-rlc-nr.c
index 320ee037c3..e26bae245f 100644
--- a/epan/dissectors/packet-rlc-nr.c
+++ b/epan/dissectors/packet-rlc-nr.c
@@ -119,6 +119,7 @@ static expert_field ei_rlc_nr_am_sn = EI_INIT;
static expert_field ei_rlc_nr_header_only = EI_INIT;
static expert_field ei_rlc_nr_reserved_bits_not_zero = EI_INIT;
static expert_field ei_rlc_nr_no_per_frame_info = EI_INIT;
+static expert_field ei_rlc_nr_unknown_udp_framing_tag = EI_INIT;
/* Value-strings */
static const value_string direction_vals[] =
@@ -822,8 +823,19 @@ static gboolean dissect_rlc_nr_heur(tvbuff_t *tvb, packet_info *pinfo,
break;
default:
/* It must be a recognised tag */
+ {
+ proto_item *ti;
+ proto_tree *subtree;
+
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "RLC-NR");
+ col_clear(pinfo->cinfo, COL_INFO);
+ ti = proto_tree_add_item(tree, proto_rlc_nr, tvb, offset, tvb_reported_length(tvb), ENC_NA);
+ subtree = proto_item_add_subtree(ti, ett_rlc_nr);
+ proto_tree_add_expert(subtree, pinfo, &ei_rlc_nr_unknown_udp_framing_tag,
+ tvb, offset-1, 1);
+ }
wmem_free(wmem_file_scope(), p_rlc_nr_info);
- return FALSE;
+ return TRUE;
}
} while (tag != RLC_NR_PAYLOAD_TAG);
@@ -1246,7 +1258,8 @@ void proto_register_rlc_nr(void)
{ &ei_rlc_nr_um_data_no_data, { "rlc-nr.um-data.no-data", PI_MALFORMED, PI_ERROR, "UM data PDU doesn't contain any data", EXPFILL }},
{ &ei_rlc_nr_am_data_no_data, { "rlc-nr.am-data.no-data", PI_MALFORMED, PI_ERROR, "AM data PDU doesn't contain any data", EXPFILL }},
{ &ei_rlc_nr_context_mode, { "rlc-nr.mode.invalid", PI_MALFORMED, PI_ERROR, "Unrecognised RLC Mode set", EXPFILL }},
- { &ei_rlc_nr_no_per_frame_info, { "rlc-nr.no_per_frame_info", PI_UNDECODED, PI_ERROR, "Can't dissect NR RLC frame because no per-frame info was attached!", EXPFILL }},
+ { &ei_rlc_nr_no_per_frame_info, { "rlc-nr.no-per-frame-info", PI_UNDECODED, PI_ERROR, "Can't dissect NR RLC frame because no per-frame info was attached!", EXPFILL }},
+ { &ei_rlc_nr_unknown_udp_framing_tag, { "rlc-nr.unknown-udp-framing-tag", PI_UNDECODED, PI_WARN, "Unknown UDP framing tag, aborting dissection", EXPFILL }}
};
module_t *rlc_nr_module;