diff --git a/epan/dissectors/packet-nas_eps.c b/epan/dissectors/packet-nas_eps.c index 23c881203a..6578ad84f3 100644 --- a/epan/dissectors/packet-nas_eps.c +++ b/epan/dissectors/packet-nas_eps.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "packet-gsm_map.h" #include "packet-gsm_a_common.h" #include "packet-e212.h" @@ -3478,9 +3479,8 @@ de_esm_pdn_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, { guint32 curr_offset; guint8 pdn_type; - ws_in6_addr interface_id; + guint8 interface_id[8]; - memset(&interface_id, 0, sizeof(interface_id)); curr_offset = offset; pdn_type = tvb_get_guint8(tvb, offset) & 0x7; @@ -3500,8 +3500,10 @@ de_esm_pdn_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, * contains an IPv6 interface identifier. Bit 8 of octet 4 represents the most significant bit * of the IPv6 interface identifier and bit 1 of octet 11 the least significant bit. */ - tvb_memcpy(tvb, (guint8*)&interface_id.bytes[8], curr_offset, 8); - proto_tree_add_ipv6(tree, hf_nas_eps_esm_pdn_ipv6_if_id, tvb, curr_offset, 8, &interface_id); + tvb_memcpy(tvb, interface_id, curr_offset, 8); + proto_tree_add_bytes_format_value(tree, hf_nas_eps_esm_pdn_ipv6_if_id, tvb, curr_offset, 8, NULL, + "::%x:%x:%x:%x", pntoh16(&interface_id[0]), pntoh16(&interface_id[2]), + pntoh16(&interface_id[4]), pntoh16(&interface_id[6])); curr_offset+=8; break; case 3: @@ -3512,8 +3514,10 @@ de_esm_pdn_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, * significant bit. Bit 8 of octet 12 represents the most significant bit of the IPv4 address * and bit 1 of octet 15 the least significant bit. */ - tvb_memcpy(tvb, (guint8*)&interface_id.bytes[8], curr_offset, 8); - proto_tree_add_ipv6(tree, hf_nas_eps_esm_pdn_ipv6_if_id, tvb, curr_offset, 8, &interface_id); + tvb_memcpy(tvb, interface_id, curr_offset, 8); + proto_tree_add_bytes_format_value(tree, hf_nas_eps_esm_pdn_ipv6_if_id, tvb, curr_offset, 8, NULL, + "::%x:%x:%x:%x", pntoh16(&interface_id[0]), pntoh16(&interface_id[2]), + pntoh16(&interface_id[4]), pntoh16(&interface_id[6])); curr_offset+=8; proto_tree_add_item(tree, hf_nas_eps_esm_pdn_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN); curr_offset+=4; @@ -8087,7 +8091,7 @@ proto_register_nas_eps(void) }, { &hf_nas_eps_esm_pdn_ipv6_if_id, {"PDN IPv6 if id", "nas_eps.esm.pdn_ipv6_if_id", - FT_IPv6, BASE_NONE, NULL, 0x0, + FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} }, { &hf_nas_eps_esm_eplmnc,