Commit graph

87721 commits

Author SHA1 Message Date
Martin Mathieson
cb20d4a192 UDPCP: fix indentation 2023-06-10 16:49:00 +00:00
Martin Mathieson
82f4fd84e0 .tools/check_tfs.py: Tighten up check for vals->common tfs 2023-06-10 15:40:19 +00:00
Alexis La Goutte
c251ec9989 wifi-nan: fix wrong offset for NAN availability
Fix 19129
2023-06-09 19:36:35 +00:00
John Thacker
a3806fc69b Qt: Fix crash when changing dfilter macro
The comments claim that UAT_AFFECTS_FIELDS also triggers a redissection,
but it does not. Fortunately, all UATs whose flags have UAT_AFFECTS_FIELDS
also have UAT_AFFECTS_DISSECTION.

dfilter macro expressions are a rare case of a UAT that should trigger
FieldsChanged but not PacketDissectionChanged. (It's slightly
unnecessary to invalidate the custom columns, but perhaps in the
future macros will be possible in custom columns.)

So resolve things by changing the comments to reflect current reality
and making the dfilter macro UAT flags UAT_AFFECTS_FIELDS.

This prevents a crash when removing a dfilter macro thus invalidating
the current filter, and then opening a file (including reloading the
current one.)

Fix #13753
2023-06-09 15:34:44 +00:00
John Thacker
81c3ade8a3 Qt: Remove now unnecessary, crash-prone ByteViewTab tvb_memeql
This code path is no longer necessary because in the PacketDialog
case a separate fixed epan_dissect_t is now passed in
and save (9198448f9d)

Removing the tvb memory comparision is faster and reduces the number
of ways that the PacketDialog can crash after the capture file is
closed, for tvbs with data that was allocated at file scope, or
freed when the file is closed like reassembly.

Related to #14363
2023-06-09 15:07:50 +00:00
Joakim Karlsson
670002cab6 pfcp: add media_type handle
according to TS 29.502, Table 6.1.6.4.1-1: Binary Data Types, pfcp can be sent trough
HTTP multipart message
2023-06-09 14:03:19 +00:00
João Valverde
0b27d3e584 MinGW+NSIS: Remove the Fedora hard-coded cross-build sysroot
Introduce a MINGW_SYSROOT cache variable and --sysroot Python
script option so the installer can be built in other
distributions that do not use Fedora's layout.

Add a few other DLLs and use some shell globs, tested on an
Arch Linux host.

The dependency list should be generated dynamically but we're not
there yet.
2023-06-09 13:58:24 +00:00
João Valverde
5e0c35df51 CMake: Use USE_REPOSITORY with FindWSWinLibs.cmake
This CMake module is specific to Wireshark's 3rd party Windows
repository so make use the correct variable for that, so this
isn't activated in Windows builds that do not use the reppsitory.
2023-06-09 13:57:52 +00:00
João Valverde
f8f85cb9ad CMake: Modernize Qt6 configuration
Use the new COMPONENTS feature of find_papckage() to configure
Qt6. Leave Qt5 using the old method.

In the past using target_link_libraries() with an OBJECT library
wasn't fully supported but I think we are now requiring a modern
enough CMake version.

Besides being cleaner and more modern this also fixes some detection
problems I am experiencing[1].

[1]https://bugreports.qt.io/browse/QTBUG-95791
2023-06-09 13:57:33 +00:00
Ismael Mendez Matamoros
857c08ae26 RTPS: New RTPS elements introduced by Dynamic Certificate Renewal & Revocation
Added dissection of field Secure Data Header's Transformation Key
Revision Id and flag Key Revisions Enabled.
2023-06-09 09:05:24 +00:00
Gilbert Ramirez
68526daf24 Add packet dedup support for live captures too 2023-06-09 07:21:08 +00:00
Gilbert Ramirez
d2c9f1824a Add a preference for ignoring duplicate frames
Sometimes you have a capture file that has many duplicate frames
because of how the capture was made, and its convenient to ignore
the duplicates so you can concentrate on the data and not all
the TCP warnings.

This adds a preference in the "Protocols" section to ignore
duplicates. This currently only works while reading a capture file
*not* during a live capture.
2023-06-09 07:21:08 +00:00
Alexis La Goutte
620828b945 .mailmap: Update AUTHORS 2023-06-09 07:18:24 +00:00
Joakim Karlsson
9d81e79b92 JSON 3GPP: add TS 29.512 ch5.8 Feature negotiation support 2023-06-09 08:39:00 +02:00
Jeff Morriss
aa8c656783 Add an ID3v2 dissector.
Call it from the mpeg-audio dissector.

Fixes #17991.
2023-06-08 22:35:13 +00:00
Gerald Combs
0757c09a01 Qt: Start adding "Event" support to I/O Graphs
Add a default configuration for Logray. Show "Events" instead of
"Packets" in a couple of places.
2023-06-08 15:02:28 -07:00
Gerald Combs
12b5e4fdfc Falco bridge: Add a missing include
Include wsutil/inet_addr.h.
2023-06-08 20:49:33 +00:00
João Valverde
89e17c19ac Add missing #ifdef HAVE_LIBPCAP guard
Fixes Windows builds without *pcap.
2023-06-08 21:13:40 +01:00
John Thacker
aa8146d181 TLS: Export only actually used secrets
The secrets maps in [D]TLS include all the values from the configured
keylog file, plus anything from a DSB, and any master secrets computed
at runtime. However, not all of them may be used.

Mark which Client Randoms (and, for [D]TLS <= 1.2, Session IDs used
to compute master secrets) are used, and only export secrets associated
with those. This saves a time consuming operation to do so outside of
Wireshark.

"Export TLS Session Keys" now exports TLS 1.3 derived keys, since
now it is useful for filtering a larger keylog file for the values used.

In the future, the string returned from this function can be used to
write a DSB to the file.

Related to #18400
2023-06-08 12:57:28 +00:00
Laurent Fasnacht
52289c74c8 haproxy protocol: fix TLV parsing
The haproxy header length *doesn't include* the 16 byte haproxy header.

To make it more intuitive, we use the next_offset value, instead of adding
16 to the header length at every check (it also improves the clarity of the
code, since the expert info also uses that value if the header is too
short).
2023-06-08 12:25:18 +00:00
Laurent Fasnacht
2b582068d3 haproxy protocol: add support for PP2_TYPE_UNIQUE_ID TLV 2023-06-08 12:25:18 +00:00
John Thacker
1744ce4a0f epan: Add ENC_BOM modifier for UTF-16, UCS-2, UCS-4
Add ENC_BOM to the list of bitflag modifiers, and use it with
UTF-16, UCS-2, and UCS-4 (UTF-32). If set, this means that the
first 2 (or 4) octets, if present, are checked to see if they are
a Big-Endian BYTE ORDER MARK ("ZERO WIDTH NON-BREAKING SPACE"). If so,
those octets are skipped and the encoding is set to Little-Endian
or Big-Endian depending on endianness of the BOM.

If the BOM is absent, the passed in Endianness flag is used normally.

Related to #17991
2023-06-08 11:25:54 +00:00
John Thacker
bda350d8fd Don't have every dissector include wtap.h
The header for frame_data can forward declare an incomplete type
for wtap_rec, since it only takes a pointer to it.

This prevents every dissector from automatically including
wiretap/wtap.h

Add wiretap/wtap.h to some dissectors that need it.

Remove it from some other dissectors that had the explicit include
but don't actually need it.

A few other dissectors actually need wsutil/inet_addr.h but were
getting that via wtap.h - include what they actually need.

This reduces the number of files that are recompiled when
wiretap/wtap.h is touched from ~2500 to ~800.

Note that most of the dissectors that still include wiretap/wtap.h
really only need to use a WTAP_ENCAP_ value, and most of the rest
just need a pseudoheader. Those could be moved into another wiretap
include to further reduce recompilation.

Related to #19127
2023-06-08 11:05:42 +00:00
João Valverde
a82d5b56d1 WSDG: Amend some section titles (quick setup)
Make them subjectively better in terms of clarity and simplicity.
2023-06-08 07:50:07 +00:00
João Valverde
3586dcf61d WSDG: Update test documentation to reflect the latest changes 2023-06-07 18:25:14 +01:00
Martin Mayer
28c3b0dffa OCP.1: Make var initialization consistent
Initialize all vars of struct explicitly as 0 (zero).
2023-06-07 17:09:43 +00:00
Gerald Combs
387eaec32d Docs: Adjust our Asciidoctor page number settings
Try to make it so that we generate page numbers in our PDF output but
not elsewhere.
2023-06-07 16:04:41 +00:00
Gerald Combs
eb76265355 Windows: Make use of SSIZE_T
Windows defines SSIZE_T, so typedef ssize_t to it.
2023-06-07 16:04:06 +00:00
João Valverde
ea76d7f290 Tests: Fix pytest output mangling on Windows
Pytest on Windows cannot capture the subprocess output to
stdout and stderr. Wireshark warnings and other incidental
output is printed to the console and that will be interleaved
with pytest output, producing garbled output.

We add some wrappers for subprocess.run() and set default options
to capture output by the parent. Hopefully this will solve that issue
without creating other usability problems.
2023-06-07 15:57:07 +00:00
Tara Evans-Ellis
b9de34b7af Add macOS Quick Start to README.macos 2023-06-07 14:11:59 +00:00
John Thacker
fe15f69cf6 wiretap: Update introspection eums
Run tools/make-enums.py for some recent changes.
Commits 91e8f5db35 and
1db73dad24
2023-06-07 13:31:43 +00:00
Anders Broman
acb7eb2929 Update email address 2023-06-07 12:30:54 +00:00
John Thacker
6d3560d100 RFC7468: Use STRING_CASE_INSENSITIVE instead of TRUE
Update for 05e404e8cb
This got missed because it's a whole file dissector.
2023-06-07 10:49:28 +00:00
John Thacker
53345e8a80 Release notes: Mention packet list sorting changes
[skip ci]
2023-06-07 10:48:17 +00:00
Huang Qiangxiong
5ad49ee697 HTTP2: fix a bug of streaming reassembly
Set the value of last_frame field of an uncompleted msp to
the max uint64 to prevent mis-reporting error of "[Dissector
bug, protocol HTTP2: ...]".

close #19121
2023-06-07 01:38:24 +00:00
Guy Harris
4ca1f110dc Handle pcap_findalldevs_ex() on UN*X.
The remote capture stuff, including pcap_findalldevs_ex(), isn't
Windows-specific; libpcap can be built with it on UN*X, although it's
not the *default* configuration.

So, if we're not building for Windows, just #define
ws_pcap_findalldevs_ex to be pcap_findalldevs_ex.
2023-06-06 15:57:46 -07:00
John Thacker
4c30c807b8 rpm-setup: Add Qt Image Formats as optional
Add the Qt Image Formats package as optional in an RPM installation.
This add transparent runtime support for viewing additional image
formats such as TIFF, WEBP, etc. through Show Packet Bytes -> Show as Image.
https://doc.qt.io/qt-6/qtimageformats-index.html

Test with the TIFF file in !2640.
2023-06-06 21:59:33 +00:00
Gerald Combs
2b2cfa8699 GitLab CI: Make sure AWS CLI is installed
[skip ci]
2023-06-06 10:32:49 -07:00
Gerald Combs
85069dd985 GitLab CI: Fix a path
Make sure `aws` is in our path.
2023-06-06 09:45:35 -07:00
João Valverde
b49cbe2a87 CMake: Add EXE to wireshark-qt-manifest.nsh dependendencies 2023-06-06 15:04:48 +00:00
Martin Mathieson
f20e4e0aa9 WSDG quick setup - fix typo 2023-06-06 12:42:38 +01:00
João Valverde
3f348f5cac CMake: Update some options
Try to autodetect ENABLE_SIGNED_NSIS and enable it if
sign-wireshark.bat is detected on the path.

Instead of skipping the whole Qt deployment, including things like
translations, just skip the DLLs in the manifest. This is useful
if the target machine has Qt installed and the static DLL list
for cross-compiling is not adequate.
2023-06-06 11:23:34 +00:00
João Valverde
9cbc6377eb WSDG: Remove shell mark and improve formatting
Remove shell mark to conform to the rest of the guide and facilitate
copy-pasting.

Fix the formating for a path.
2023-06-06 11:22:54 +00:00
João Valverde
5ebabc9211 WSDG: Add cross-compilation instructions
Ping #19108.
2023-06-06 11:22:54 +00:00
Guy Harris
3c1ade9223 macos-setup: patch libssh to avoid compiler errors.
At least with Xcode 15 beta on macOS 14 beta, some code in libssh gets
the warning

    error: a function declaration without a prototype is deprecated in
        all versions of C [-Werror,-Wstrict-prototypes]

because they define functions with an empty argument list as

    <type> func()

rather than

    <type> func(void)

Maybe C23 will finally consider

    <type> func()

as meaning "func() takes no arguments" rather than "func() is being
defined without prototypes".

(And, no, I don't know why it says that about a function *definition*
rather than a funciton *declaration*.)
2023-06-06 11:02:29 +00:00
João Valverde
d324351b6c WSDG: Update quick setup 2023-06-06 10:17:27 +01:00
João Valverde
40d58a4b84 WSDG: Update test suite documentation 2023-06-06 09:45:38 +01:00
John Thacker
7f37ad27a3 mpeg-audio: Support media type
Make the mpeg-audio dissector handle more than one MPEG Audio
frame in a packet. (It's currently just called for files through
the wiretap encapsulation, which divides on each frame.)

Register it to the media type dissector, since it will now do
more than just dissect the first frame (or tag) in those cases.
2023-06-05 17:44:01 -04:00
João Valverde
7db3c5264a Tests: Remove remaining legacy unittest code 2023-06-05 20:56:20 +00:00
João Valverde
742740b2bb Tests: Remove unittest dependency (asterix) 2023-06-05 20:56:20 +00:00