diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-17 15:00:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-17 15:00:52 +0000 |
commit | 0f157e7d6c4be48f213ea022cb2d6d1316c423c8 (patch) | |
tree | ff4ad271b50a39e23d5a50a54f4bff37342cdc1c /epan/dissectors/packet-json_3gpp.c | |
parent | Adding debian version 4.2.4-1. (diff) | |
download | wireshark-0f157e7d6c4be48f213ea022cb2d6d1316c423c8.tar.xz wireshark-0f157e7d6c4be48f213ea022cb2d6d1316c423c8.zip |
Merging upstream version 4.2.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-json_3gpp.c')
-rw-r--r-- | epan/dissectors/packet-json_3gpp.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/epan/dissectors/packet-json_3gpp.c b/epan/dissectors/packet-json_3gpp.c index 8cb4cadb..d44f9198 100644 --- a/epan/dissectors/packet-json_3gpp.c +++ b/epan/dissectors/packet-json_3gpp.c @@ -30,11 +30,14 @@ #include "packet-gtpv2.h" #include "packet-gsm_a_common.h" #include "packet-json.h" +#include "packet-http.h" #include "packet-http2.h" void proto_register_json_3gpp(void); +void proto_reg_handoff_json_3gpp(void); static int proto_json_3gpp = -1; +static int proto_http = -1; static gint ett_json_base64decoded_eps_ie = -1; static gint ett_json_base64decoded_nas5g_ie = -1; @@ -237,7 +240,7 @@ dissect_base64decoded_nas5g_ie(tvbuff_t* tvb, proto_tree* tree, packet_info* pin static void dissect_3gpp_supportfeatures(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo, int offset, int len, const char* key_str _U_, gboolean use_compact) { - const char *path; + const char *path = NULL; /* TS 29.571 ch5.2.2 * A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500 [25]. @@ -252,9 +255,20 @@ dissect_3gpp_supportfeatures(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo */ /* Exptect to have :path from HTTP2 here, if not return */ - path = http2_get_header_value(pinfo, HTTP2_HEADER_PATH, FALSE); - if (!path) { - path = http2_get_header_value(pinfo, HTTP2_HEADER_PATH, TRUE); + if (proto_is_frame_protocol(pinfo->layers, "http2")) { + path = http2_get_header_value(pinfo, HTTP2_HEADER_PATH, FALSE); + if (!path) { + path = http2_get_header_value(pinfo, HTTP2_HEADER_PATH, TRUE); + } + } else if (proto_is_frame_protocol(pinfo->layers, "http")) { + /* 3GPP TS 29.500 says the service based interfaces use HTTP/2, + * but that doesn't stop implementations like OAI from using + * HTTP/1.1 with a 2.0 version string. + */ + http_req_res_t* curr_req_res = (http_req_res_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_http, 0); + if (curr_req_res) { + path = curr_req_res->request_uri; + } } if (!path) { return; @@ -1287,6 +1301,12 @@ proto_register_json_3gpp(void) register_static_headers(); } +void +proto_reg_handoff_json_3gpp(void) +{ + proto_http = proto_get_id_by_filter_name("http"); +} + /* * Editor modelines - https://www.wireshark.org/tools/modelines.html * |