Commit Graph

426 Commits

Author SHA1 Message Date
Joakim Karlsson dee461254b GTPv2: Track Session during Inter RAT Mobility signaling 2023-01-21 14:33:04 +00:00
John Thacker c380f516a2 GTP, GTPv2: Add request/response framenum types
Add the appropriate FT_FRAMENUM string types to the request
and response fields for GTP and GTPv2, so that arrows are
drawn for the related packet symbols.
2023-01-20 00:51:19 +00:00
Joakim Karlsson 56deed1c15 GTPv2: correction of IE MM Context EPS QQ 2023-01-09 15:50:42 +01:00
John Thacker 70ebded081 GTP, GTPv2: Use ENC_APN_STR for FQDN.
Both specifications say: "The FQDN field encoding shall be identical
to the encoding of a FQDN within a DNS message of section 3.1 of IETF
RFC 1035 [31] but excluding the trailing zero byte."

Since it's only one name, that probably means that compression is
impossible, and indeed the dissectors already check and assume that
if the first byte is in the letter range, that it's probably incorrectly
directly encoded as a dotted string instead of DNS-style.

Since compression isn't supported, use ENC_APN_STR to avoid generating
bogus UTF-8 in packets with errors.

Fix #18531
2022-10-24 01:24:57 +00:00
Joakim Karlsson 0f46eef597 gtpv2: Update to 3GPP TS 29.274 V18.0.0 2022-10-06 21:19:49 +00:00
John Thacker d4327d42b0 GTPv2: Add Service Response Time statistics, similar to GTPv1
Add a Service Response Time table for GTPv2, similar to that
for GTPv1. Update the tshark docs to mention it.
2022-09-27 22:06:45 +00:00
John Thacker 1ccf4f3c73 GTP: Use a map for mapping from <teid,address> to frame
For GTP session tracking (off by default), there's a mapping
from <TEID, ADDRESS> to frame numbers. The current implementation
is a tree (converting the address to a string for keys) of linked
lists of the TEIDs. That gets very slow when there's a large number
of TEIDs. Convert it to a map that uses the teid and address,
with the TEID used for the hash.

There's still a reverse lookup (foreach_remove) when TEIDs are reused
or sessions fail, but this still yields over a 10x speedup on a
few moderate sized test files (~50000 GTP-C packets).
2022-09-17 07:39:05 -04:00
John Thacker 8129b9dee8 GTP: Use direct hashing in the session table
The session table maps frames (which are 32 bit uints that
start at 1) to sessions (which are also 32 bit uints that
start at 1), so use GUINT_TO_POINTER and the direct hash
functions instead of creating extra file scope pointers.
2022-09-17 00:49:57 +00:00
Chuck Craft c4f9831412 gtpv2: adjust field size and bitmask for gtpv2.smenb
Closes #18225
2022-07-26 15:20:06 -05:00
João Valverde 8efad466c4 Tools: Fix fix-encoding-args.pl ASCII string validation
Do not require a useless ENC_NA parameter for string encodings.
FT_STRING and FT_STRINGZ types don't have any ndianness.

Follow-up to 6ec429622c.
2022-02-15 11:38:16 +00:00
Anders Broman 33b000148f GTPv2: MM Context handle 0 length IEs 2022-01-27 18:08:34 +00:00
Anders Broman 95e28f7631 GTPv2: Handle thcase where dissect_diameter_3gpp_uli has no data. 2022-01-04 06:24:48 +00:00
Moshe Kaplan 69d54d6f8e Corrects repeated words throughout the code.
Repeated words were found with:
egrep "(\b[a-zA-Z]+) +\1\b" . -Ir
and then manually reviewed.
Non-displayed strings (e.g., in comments)
were also corrected, to ease future review.
2021-12-22 11:01:11 +00:00
João Valverde 22ee2764a7 Replace g_snprintf() with snprintf() (dissectors)
Use macros from inttypes.h with format strings.
2021-12-19 20:25:11 +00:00
Pascal Quantin 4921183e33 GTPv2: fix dissection of 5GS TAC
Fixes #17738
2021-11-19 04:51:05 +00:00
Joakim Karlsson ffdc5622d1 gtpv2: Update to 3GPP TS 29.274 V17.3.0 2021-10-20 11:06:06 +00:00
Martin Mathieson a5df18e51e Fix some spelling errors 2021-10-11 04:44:49 +00:00
Martin Mathieson d8b28f8040 Fix some field mask widths. 2021-10-07 21:33:49 +00:00
Evan Huus 0eda51a646 to_str: scope tvb_ip6_to_str 2021-10-07 13:31:23 -04:00
Evan Huus 07f5472aa7 to_str: scope tvb_ip_to_str 2021-10-07 10:25:12 -04:00
Martin Mathieson d3b016a365 Remove trailing colons from item label names
This is a new check added to check_typed_item_calls.py --label

Ignoring cases where item type is FT_NONE, as fpr tjpse
text was appended that otherwise would lack a colon.
2021-08-23 08:32:56 +00:00
Martin Mathieson 545eab808e Fix some item label names with unbalanced parens/braces/brackets
Spotted by new check added to check_typed_item_calls.py --label
2021-08-14 21:24:13 +01:00
Evan Huus 8ee8808876 First pass pinfo->pool conversion, part 2
Automated find/replace of wmem_packet_scope() with pinfo->pool in all
files where it didn't cause a build failure.
2021-07-21 09:54:57 -04:00
Joakim Karlsson 9ed273e5da JSON: correction of 3gpp ueEpsPdnConnection 2021-07-21 13:09:42 +00:00
Joakim Karlsson 75f53899a9 GTPv2: Add dissect of EN-DC SON Configuration IE in F-Container 2021-07-21 11:49:10 +00:00
Andreas Schultz 9e29ec0940 RADIUS: replace ULI decoder with version from GTPv2
Reuse the DIAMETER dissector for 3GPP-ULI for RADIUS as well.

The DIAMETER dissector for 3GPP-ULI IE is more complete than the RADIUS
version. The format of the IE is the same in RADIUS and DIAMETER.
2021-07-08 08:56:45 +00:00
Andreas Schultz 4992806dba GTPv2: fix decoding of (extended) eNodeB id
3GPP TS 29.274, clause 8.21.7 and 8.21.8 clearly specify a total
length of 6 bytes for these fields.
2021-07-07 17:20:01 +00:00
Joakim Karlsson e22b9733cf GTPv2: make dissect_diameter_3gpp_uli public for custom dissectors 2021-06-16 13:59:44 +02:00
Anders Broman 7e9ac7a4fc GTPv2: Additional RRM Policy Index, add Index to IE tree. 2021-06-07 12:15:35 +02:00
Anders Broman 42cb9643aa GTPv2: Update with new IEs from 3GPP TS 29.274 V17.1.1 (2021-03).
Update dissection of IE names and define the metodes to do dissection.
Only Additional RRM Policy Index is fully dissected.
2021-06-04 12:38:29 +00:00
AndersBroman 754cce9531 Add ENC_APN_STR to handle APN strings 2021-05-20 09:27:53 +00:00
Anders Broman 2fe4f1af76 gtpv2: Use the correct name for Remaining Running Service Gap Timer 2021-05-09 13:03:40 +02:00
Pascal Quantin 98673850a4 GTPv2: add dissection of Mapped UE Usage Type IE
Fixes #17373
2021-05-06 13:52:22 +00:00
Joakim Karlsson 6d72eb7a30 GTPv2: Add dissect of F-Container in Configuration Transfer Tunnel 2021-04-16 11:44:20 +00:00
Martin Mathieson b1838bb950 Make more dissector non-statics static. 2021-02-09 10:55:50 +00:00
Joakim Karlsson 22f4e21cb5 GTPv2: Update IE 8.12 Indication
Change-Id: Ie94427e59b9fb09806718fd3c0429bdf183b8834
2021-01-15 16:57:26 +00:00
Anders Broman 1694820e84 GTPv2: Update IE 8.12 Indication 2020-12-17 12:35:01 +00:00
Anders Broman 16ea22eaa4 F-Container: Try to improve error handling. 2020-12-09 00:44:44 +00:00
Anders Broman e782fb0200 GTPv2: Export dissect_gtpv2_ie_common() 2020-11-26 06:16:49 +00:00
Anders Broman 2999173126 GTPv2: Dissect the content of F-container type 3. 2020-11-24 16:41:50 +01:00
Martin Mathieson d0fe9cae70 GTP and GTPv2: Fix some item lengths.
Fix issues found by running ./tools/check_typed_item_calls.py

epan/dissectors/packet-gtp.c:4414 proto_tree_add_item called for hf_gtp_sel_mode  -  item type is FT_UINT8 but call has len  2
epan/dissectors/packet-gtp.c:6807 proto_tree_add_item called for hf_gtp_rai_rac  -  item type is FT_UINT8 but call has len  2
epan/dissectors/packet-gtp.c:7600 proto_tree_add_item called for hf_gtp_bssgp_cause  -  item type is FT_UINT8 but call has len  2
epan/dissectors/packet-gtpv2.c:3607 proto_tree_add_item called for hf_gtpv2_trace_id  -  item type is FT_UINT16 but call has len  3
epan/dissectors/packet-gtpv2.c:5049 proto_tree_add_item called for hf_gtpv2_trace_id  -  item type is FT_UINT16 but call has len  3
2020-10-18 20:00:39 +01:00
Anders Broman e209253636 Create a cross protocol filter 3gpp.tmsi
It can be useful to track a "call" trough multiple protocols to make
that easier create a cross protocol filter, more may come.
2020-10-14 07:56:26 +00:00
Martin Mathieson 607831d870 Fix more filter field strings.
These appear to be copy/paste errors detected by running
./tools/check_typed_item_calls.py --consecutive

Quite a few issues still remain after this batch.
2020-10-03 22:11:32 +00:00
Martin Mathieson fc64ba242a More dissector spelling fixes. 2020-09-24 16:40:51 +00:00
Martin Mathieson 82827278f7 More dissector string spelling fixes.
Finally, it is becoming difficult to find more.
2020-09-13 09:03:08 +01:00
Pascal Quantin c09cb5c343 GTPv2: fix dissection of Target Identification IE
Closes #16822
2020-09-03 21:54:18 +02:00
Anders Broman 00bf625286 GTpv2: Add expert info for zero length IE
Add an Expert info for zero length 8.76 CSG Information Reporting Action
IE.
2020-09-01 07:30:44 +00:00
Martin Mathieson b8a773dddc Fix some spelling errors in dissector strings.
A first batch of spelling errors, detected using a script that uses
pyspellcheck and a Wireshark-specific dictionary file.
2020-08-29 19:31:11 +00:00
Pascal Quantin f59262b94c GTPv2: fix S103PDF and S1UDF IE dissection
The IPv4 or IPv6 address was not added properly to the tree

Bug: 16777
Change-Id: Ic28138cc1d4c2dc350fb5ff95aa3a5496a293c91
Reviewed-on: https://code.wireshark.org/review/38153
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-08-13 12:47:24 +00:00
Andreas Schultz 0cce968634 GTPv2: validate length of PDN Address Allocation (PAA) IE
PAA is a variable length IE, but it is not extendable (see Table 8.1-1 in
3GPP TS 29.274). For a give type the length therefore has to match and
can not exceed the defined length.

Change-Id: Id65842a7f25018fd3864efd73f74ae583102a681
Reviewed-on: https://code.wireshark.org/review/37984
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-08-10 10:30:57 +00:00