aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2017-11-03 17:42:56 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2017-11-03 17:46:23 +0000
commitb227943e66c7839dca713be60f6cdaf70ba9413e (patch)
tree665564ac46a8c049ade6030db9d6d3147980d395
parente00162301b243aff8d0e2760367243edf222a150 (diff)
Exported PDU: apply EXP_PDU_TAG_COL_PROT_TEXT whatever the next_prot_type tag
The include file suggests that it will always fill the protocol column if present. Let's make that happen. Change-Id: I265e2f4d1c2dcd7cf2ff121499694cde14a595f3 Reviewed-on: https://code.wireshark.org/review/24220 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r--epan/dissectors/packet-exported_pdu.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/epan/dissectors/packet-exported_pdu.c b/epan/dissectors/packet-exported_pdu.c
index 695358c731..ae75ce6a98 100644
--- a/epan/dissectors/packet-exported_pdu.c
+++ b/epan/dissectors/packet-exported_pdu.c
@@ -347,7 +347,11 @@ dissect_exported_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
case EXPORTED_PDU_NEXT_PROTO_STR:
proto_handle = find_dissector(proto_name);
if (proto_handle) {
- col_clear(pinfo->cinfo, COL_PROTOCOL);
+ if (col_proto_str) {
+ col_add_str(pinfo->cinfo, COL_PROTOCOL, col_proto_str);
+ } else {
+ col_clear(pinfo->cinfo, COL_PROTOCOL);
+ }
call_dissector_with_data(proto_handle, payload_tvb, pinfo, tree, dissector_data);
}
break;
@@ -355,7 +359,11 @@ dissect_exported_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
{
heur_dtbl_entry_t *heur_diss = find_heur_dissector_by_unique_short_name(proto_name);
if (heur_diss) {
- col_clear(pinfo->cinfo, COL_PROTOCOL);
+ if (col_proto_str) {
+ col_add_str(pinfo->cinfo, COL_PROTOCOL, col_proto_str);
+ } else {
+ col_clear(pinfo->cinfo, COL_PROTOCOL);
+ }
call_heur_dissector_direct(heur_diss, payload_tvb, pinfo, tree, dissector_data);
}
break;
@@ -364,9 +372,10 @@ dissect_exported_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
{
dis_tbl = find_dissector_table(dissector_table);
if (dis_tbl) {
- col_clear(pinfo->cinfo, COL_PROTOCOL);
if (col_proto_str) {
- col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "%s",col_proto_str);
+ col_add_str(pinfo->cinfo, COL_PROTOCOL, col_proto_str);
+ } else {
+ col_clear(pinfo->cinfo, COL_PROTOCOL);
}
dissector_try_uint_new(dis_tbl, dissector_table_val, payload_tvb, pinfo, tree, FALSE, dissector_data);
}