From 569deb7215937270e93361b42f549c6c1fbb6d60 Mon Sep 17 00:00:00 2001 From: Yoshiyuki Kurauchi Date: Wed, 22 Apr 2020 21:05:31 +0900 Subject: [PATCH] PFCP: Fix lengths of fields in Remote GTP-U Peer Fix the field length of "Length of Destination Interface field" and "Length of Network Instance field" which should be two-octet long but only one in the current codes. Change-Id: Id303b92812bb2551ec570ec807d602d0fb44f27a Signed-off-by: Yoshiyuki Kurauchi Reviewed-on: https://code.wireshark.org/review/36908 Petri-Dish: Anders Broman Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-pfcp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/epan/dissectors/packet-pfcp.c b/epan/dissectors/packet-pfcp.c index 2af36e957e..a4e8d09d27 100644 --- a/epan/dissectors/packet-pfcp.c +++ b/epan/dissectors/packet-pfcp.c @@ -4557,8 +4557,8 @@ dissect_pfcp_remote_gtp_u_peer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* DI (if present)*/ if (flags & 0x4) { /* Length of Destination Interface field */ - proto_tree_add_item_ret_uint(tree, hf_pfcp_remote_gtp_u_peer_length_di, tvb, offset, 1, ENC_BIG_ENDIAN, &length_di); - offset += 1; + proto_tree_add_item_ret_uint(tree, hf_pfcp_remote_gtp_u_peer_length_di, tvb, offset, 2, ENC_BIG_ENDIAN, &length_di); + offset += 2; /* Destination Interface */ offset += decode_pfcp_destination_interface(tvb, pinfo, tree, item, offset, length_di); @@ -4566,8 +4566,8 @@ dissect_pfcp_remote_gtp_u_peer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* NI (if present)*/ if (flags & 0x8) { /* Length of Network Instance field */ - proto_tree_add_item_ret_uint(tree, hf_pfcp_remote_gtp_u_peer_length_ni, tvb, offset, 1, ENC_BIG_ENDIAN, &length_ni); - offset += 1; + proto_tree_add_item_ret_uint(tree, hf_pfcp_remote_gtp_u_peer_length_ni, tvb, offset, 2, ENC_BIG_ENDIAN, &length_ni); + offset += 2; /* Network Instance */ offset += decode_pfcp_network_instance(tvb, pinfo, tree, item, offset, length_ni); @@ -10466,12 +10466,12 @@ proto_register_pfcp(void) }, { &hf_pfcp_remote_gtp_u_peer_length_di, { "Length of Destination Interface field", "pfcp.node_id_length_di", - FT_UINT8, BASE_DEC, NULL, 0, + FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } }, { &hf_pfcp_remote_gtp_u_peer_length_ni, { "Length of Network Instance field", "pfcp.node_id_length_ni", - FT_UINT8, BASE_DEC, NULL, 0, + FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } }, { &hf_pfcp_ur_seqn,