aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2017-10-21 13:25:06 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2017-10-21 12:10:06 +0000
commit85820a835426059b31479107ddfb660ff5067807 (patch)
tree2ec0a915bf562de3110c228111ae58958a36e974
parent0d9b8eaf088628255e64343462ac0e2e90c66c67 (diff)
Diameter 3GPP: call XML dissector for Civic-Address AVP payload
Bug: 14142 Change-Id: Iccf5c375087cabd08aa551af8e6586e18684252a Reviewed-on: https://code.wireshark.org/review/24008 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-diameter_3gpp.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/epan/dissectors/packet-diameter_3gpp.c b/epan/dissectors/packet-diameter_3gpp.c
index bb7f86b..7c80417 100644
--- a/epan/dissectors/packet-diameter_3gpp.c
+++ b/epan/dissectors/packet-diameter_3gpp.c
@@ -1120,7 +1120,7 @@ dissect_diameter_3gpp_user_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
if(length < 38)
return length;
- if (tvb_strncaseeql(tvb, 0, "<?xml", 5) == 0) {
+ if (tvb_strncaseeql(tvb, 0, "<?xml", 5) == 0 && xml_handle) {
call_dissector(xml_handle, tvb, pinfo, tree);
}
@@ -2182,6 +2182,25 @@ dissect_diameter_3gpp_eutran_positioning_data(tvbuff_t *tvb, packet_info *pinfo,
return dissect_lcsap_Positioning_Data_PDU(tvb, pinfo, tree, NULL);
}
+/* AVP Code: 2556 Civic-Address */
+static int
+dissect_diameter_3gpp_civic_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+{
+ int length = tvb_reported_length(tvb);
+
+ /* If there is less than 38 characters this is not XML
+ * <?xml version="1.0" encoding="UTF-8"?>
+ */
+ if(length < 38)
+ return length;
+
+ if (tvb_strncaseeql(tvb, 0, "<?xml", 5) == 0 && xml_handle) {
+ call_dissector(xml_handle, tvb, pinfo, tree);
+ }
+
+ return length;
+}
+
/* AVP Code: 2819 RAN-NAS-Release-Cause*/
static const value_string ran_nas_prot_type_vals[] = {
@@ -2538,6 +2557,9 @@ proto_reg_handoff_diameter_3gpp(void)
/* AVP Code: 2516 EUTRAN-Positioning-Data */
dissector_add_uint("diameter.3gpp", 2516, create_dissector_handle(dissect_diameter_3gpp_eutran_positioning_data, proto_diameter_3gpp));
+ /* AVP Code: 2556 Civic-Address */
+ dissector_add_uint("diameter.3gpp", 2556, create_dissector_handle(dissect_diameter_3gpp_civic_address, proto_diameter_3gpp));
+
/* AVP Code: 2819 RAN-NAS-Release-Cause */
dissector_add_uint("diameter.3gpp", 2819, create_dissector_handle(dissect_diameter_3gpp_ran_nas_release_cause, proto_diameter_3gpp));