aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2010-04-05 07:37:04 +0000
committerAnders Broman <anders.broman@ericsson.com>2010-04-05 07:37:04 +0000
commitb3607a98ae8e5cf55ebe6da3dddea66903ed4450 (patch)
tree4c3874f9245acac7d9bf5695fd99d9c9cb731929 /epan
parentfa1b1e91430bfb2833a907fe965741af384ff29c (diff)
From Toshihiro KATAOKA:
The decoded MSISDN AVP in 3GPP diameter AVP and the decoded MSISDN IE in 3GPP GTPv2 IE are not correct. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4638 svn path=/trunk/; revision=32377
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-diameter_3gpp.c13
-rw-r--r--epan/dissectors/packet-gtpv2.c15
2 files changed, 25 insertions, 3 deletions
diff --git a/epan/dissectors/packet-diameter_3gpp.c b/epan/dissectors/packet-diameter_3gpp.c
index f561865b42..c989a4c5c4 100644
--- a/epan/dissectors/packet-diameter_3gpp.c
+++ b/epan/dissectors/packet-diameter_3gpp.c
@@ -43,6 +43,7 @@
#include "packet-gsm_map.h"
#include "packet-gsm_a_common.h"
+#include "packet-e164.h"
#include "packet-e212.h"
/* Initialize the protocol and registered fields */
@@ -54,6 +55,7 @@ static int hf_diameter_3gpp_ipaddr = -1;
static int hf_diameter_3gpp_mbms_required_qos_prio = -1;
static int hf_diameter_3gpp_tmgi = -1;
static int hf_diameter_mbms_service_id = -1;
+static int hf_diameter_address_digits = -1;
static gint diameter_3gpp_msisdn_ett = -1;
static gint diameter_3gpp_tmgi_ett = -1;
@@ -69,11 +71,15 @@ dissect_diameter_3gpp_msisdn(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tr
proto_item* item;
proto_tree *sub_tree;
int offset = 0;
+ const char *digit_str;
item = proto_tree_add_item(tree, hf_diameter_3gpp_msisdn, tvb, offset, 6, FALSE);
sub_tree = proto_item_add_subtree(item,diameter_3gpp_msisdn_ett);
- dissect_gsm_map_msisdn(tvb, pinfo, sub_tree);
+ dissect_e164_cc(tvb, sub_tree, offset, TRUE);
+
+ digit_str = unpack_digits(tvb, 1);
+ proto_tree_add_string(sub_tree, hf_diameter_address_digits, tvb, 1, -1, digit_str);
return tvb_length(tvb);
@@ -222,6 +228,11 @@ proto_register_diameter_3gpp(void)
FT_UINT24, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
+ { &hf_diameter_address_digits,
+ { "Address digits", "diameter.3gpp.address_digits",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
};
/* Setup protocol subtree array */
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c
index 49311e7958..682fc0008c 100644
--- a/epan/dissectors/packet-gtpv2.c
+++ b/epan/dissectors/packet-gtpv2.c
@@ -40,6 +40,7 @@
#include "packet-gsm_a_common.h"
#include "packet-gsm_map.h"
+#include "packet-e164.h"
#include "packet-e212.h"
/*GTPv2 Message->GTP Header(SB)*/
@@ -109,6 +110,7 @@ static int hf_gtpv2_ambr_down= -1;
static int hf_gtpv2_ip_address_ipv4= -1;
static int hf_gtpv2_ip_address_ipv6= -1;
static int hf_gtpv2_mei= -1;
+static int hf_gtpv2_address_digits = -1;
static int hf_gtpv2_bearer_qos_pvi= -1;
static int hf_gtpv2_bearer_qos_pl= -1;
@@ -626,9 +628,13 @@ dissect_gtpv2_mei(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
* Editor's note: MSISDN coding will be defined in TS 24.301.
*/
static void
-dissect_gtpv2_msisdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
+dissect_gtpv2_msisdn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
{
- dissect_gsm_map_msisdn(tvb, pinfo, tree);
+ const char *digit_str;
+
+ dissect_e164_cc(tvb, tree, 0, TRUE);
+ digit_str = unpack_digits(tvb, 1);
+ proto_tree_add_string(tree, hf_gtpv2_address_digits, tvb, 1, -1, digit_str);
}
/*
@@ -2215,6 +2221,11 @@ void proto_register_gtpv2(void)
FT_UINT8, BASE_DEC, VALS(gtpv2_node_type_vals), 0x0,
NULL, HFILL}
},
+ { &hf_gtpv2_address_digits,
+ { "Address digits", "gtpv2.address_digits",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
};