Commit Graph

87900 Commits

Author SHA1 Message Date
John Thacker 38fa97a4e8 tshark: Move a debug message later
Only print the debug message about whether we're doing dissection
after we've determined if that's so.
(See cf2a29f083 )
2023-06-21 18:12:49 -04:00
Adedeji Adeloye ff31939869 SMB2: Add updated TreeConnectResponse ShareFlag Isolated_Transport
SMB2 TreeConnectResponse has a new share flag Isolated transport.
2023-06-21 21:03:43 +00:00
Jianwei Mao 62be2fc961 release-notes: IPv6 dissector supports dissecting APN6 option now. 2023-06-21 17:52:48 +00:00
Chuck Craft 0acc81714d WSUG: example for curly braces around math expression 2023-06-21 16:37:23 +00:00
Alexis La Goutte a78006ebc5 http: fix Dead Store found by Clang Analyzer 2023-06-21 15:12:09 +00:00
Alexis La Goutte ee88d734f8 rtps: fix Dead Store found by Clang Analyzer 2023-06-21 15:12:09 +00:00
David Perry facff67067 Use `register_dissector()` for more protocols
Changes several calls of `create_dissector_handle()` to instead call
`register_dissector()` with a name for the dissector.

This should handle all dissectors in `epan/` from `packet-j*` to
`packet-o*`.

This change allows affected dissectors to be findable by calls to
`find_dissector()`. In turn, this opens up more command-line use for
these protocols, including fuzzshark and rawshark, as well as lua use
via `Dissector.get()`.

Where needed, move the call from the protocol handoff function to the
protocol register function, save the result in a static variable,
and use that variable in the handoff function.

There were some calls to `create_dissector_handle()` or
`register_dissector()` which passed `-1` as the protocol argument. When
I saw those I corrected them to pass the actual `proto_foo` identifier
instead.

Partially addresses #5612
2023-06-21 15:09:54 +00:00
Stig Bjørlykke 7e07c29b09 print: Fix a check for hf_text_only
By coincidence the value for hf_text_only after proto_init() is 0,
but this may change. Fix a check in write_json_proto_node_list().
2023-06-21 14:16:32 +02:00
John Thacker b2ccfebe2f pgsql: Parse GSS-API and SSPI reply messages
If the server requested GSS-API or SSPI authentication, send
the client response to the GSS-API dissector (or NTLMSSP, if
it looks like that.)

Fix #19151
2023-06-21 07:13:34 +00:00
Gerald Combs 696b19dcdf macOS: Automatically handle rpaths in our app bundle
Instead of skipping over libraries prefixed with @rpath and handling
them manually, scan our executables for valid prefixes and use those to
discover library paths.

Modernize our code in other places.
2023-06-20 15:52:09 -07:00
John Thacker dc8e8da889 color_filters: Free old validated list
Free the old validated color filter list instead of just setting
it to null. Prevents leaks when changing the color filters multiple
times when a file is open.
2023-06-20 22:38:08 +00:00
John Thacker 6c61f00ed0 BFCP: Setup UDP/BFCP conversations via SDP
Use the SDP to setup conversations automatically for BFCP.
Particularly useful since it's heuristic is weak.

Related to #18717
2023-06-20 15:22:35 +00:00
João Valverde a3ffd742fe dfilter: Fix second stage compilation flags
Pass the dfs->flags instead of flags to dfwork_new(),
because the flags might have been modified in the first stage
by the parser.
2023-06-20 12:10:45 +00:00
Stig Bjørlykke 5b64d1d65e Qt: Freeze packet list early on preferences change
Freeze the packet list early when changing profile and when closing
the preferences dialog to avoid updating column data before doing a
full redissection.

The packet list will be thawed when redissection is done.

Related to #19079.
2023-06-20 11:27:05 +00:00
John Thacker 28e324ae02 BFCP: Add fragment fields when F bit is set
Add the fragment fields when the F bit is set, which should
only be on an unreliable transport. No defragmentation is done
yet.

Update a few comments, and the blurb for the length fields (since
the lengths are in units of 4 octets, which is unusual.)
2023-06-20 03:17:06 +00:00
Gerald Combs bbf596f447 GitLab CI: Remove a Lintian check.
Remove the "copyright-excludes-files-in-native-package". It was added
in Lintian 2.57.0 and annoyingly removed without any sort of backward
compatibility in 2.106.0. Ubuntu 22.04 / Jammy ships with Lintian
2.114.0.

Cherry-picked from 08460a7f43

Conflicts:
	.gitlab-ci.yml
2023-06-19 18:59:40 -07:00
João Valverde d456cc761a ftypes: Rename IS_FT_* macros
Rename IS_FT_*() to FT_IS_*(). I find it to be more natural and
a better namespace for a public interface.
2023-06-20 00:22:57 +01:00
Dr. Lars Völker b986410302 UDS: adding missing 'All Groups/all DTCs' 2023-06-19 18:13:46 +00:00
Maxence Younsi 594effb381 ipfix: add srv6 srh information export
Signed-off-by: Maxence Younsi <mx.yns@outlook.fr>
2023-06-19 15:05:24 +02:00
Pascal Quantin a02c60b7aa PPPoE: do not display a payload length error message for IPv6CP
Similar to what is done for IPCP.

Closes #19149
2023-06-19 11:19:04 +02:00
Dylan Ulis 76f782c961 CIP: Support Concurrent Connections 2023-06-19 04:40:30 +00:00
Nicolás Alvarez f272d41f80 Revert "Remove unnecessary null check in SequenceDialog"
The diagramClicked change was made redundant by 1bf1a1ea7c and we didn't
notice before merging !3253. The mouseMoved change was incorrect; I missed
that drawDiagram was calling mouseMoved(NULL) explicitly, and my change
introduced a crash.

This reverts commit 0f71aa256c
2023-06-19 00:19:37 -03:00
John Thacker fa13cc36f8 Qt: Fix leaks in RTP Stream Dialog sorting and copying
Any time rtpstream_info_calculate() is called, there has to be
a matching rtpstream_info_calc_free() to avoid leaking.
2023-06-19 00:55:33 +00:00
Guy Harris f8d1525b17 Get rid of unnecessary casts.
snprintf(), sensibly, takes a size_t argument specifying the size of the
buffer. g_snprintf(), bogusly, takes a gulong argument specifying the
size of the buffer, so we had to do casts to avoid narrowing complaints,
but we're just using snprintf() now (as we require C11 or later), and
don't need the casts any more.
2023-06-18 16:07:35 -07:00
Guy Harris ec3bb4538f Get rid of one last g_snprintf() call.
Everything else in Wireshark, including everything else in this file,
uses snprintf().

(1990 called, they want their C standard back.)
2023-06-18 15:29:17 -07:00
Guy Harris bfe3bacd53 Get rid of unnecessary casts.
snprintf(), sensibly, takes a size_t argument specifying the size of the
buffer.  g_snprintf(), bogusly, takes a gulong argument specifying the
size of the buffer, so we had to do casts to avoid narrowing complaints,
but we're just using snprintf() now (as we require C11 or later), and
don't need the casts any more.
2023-06-18 15:06:48 -07:00
Gerald Combs dafd334270 Tools: Switch make-reg.py to standard C types 2023-06-18 21:48:13 +00:00
Gerald Combs 6b219e0f20 Tools: Add gu?long to convert-glib-types.py
Convert occurrences of gu?char and gu?long in capture/.
2023-06-18 21:44:30 +00:00
Gerald Combs 1bd1d2ee04 Tools: Switch make-regs.py to C99 types 2023-06-18 21:44:30 +00:00
Gerald Combs 6649f96725 Debian: Fix our PCRE dependency
We migrated to PCRE2 in 2021 and made it a required dependency
9df5279af7. Update the Debian packaging assets to reflect that.
2023-06-18 13:58:29 -07:00
Gerald Combs 32c0a69a9b Convert TLS CT log updates to C99 types 2023-06-18 18:13:22 +00:00
Gerald Combs 2f763fe702 Convert the ASTERIX dissector and updates to C99 types 2023-06-18 18:01:53 +00:00
Gerald Combs c6ded71ac4 Convert pci-ids.[ch] to C99 2023-06-18 10:32:09 -07:00
Gerald Combs 1dd5c10b34 [Automatic update for 2023-06-18]
Update manuf, services enterprise numbers, translations, and other items.
2023-06-18 16:22:13 +00:00
Martin Mayer 0d89b8da0c saphdb: Add header check for reserved bytes
Add a check for reserved bytes in the header.
This minimizes the probability for a false-positive dissector selection.

There are even more options for filtering, but each additional filter
minimizes the possibilities for debugging on a malformed packet.

Closes #19075
2023-06-18 15:04:11 +00:00
John Thacker 30fdbc6dca ber: Use unique sequence ids for each nest level
In reassemble_octet_string, fragment_add_seq_next is called
repeatedly until it halts, which means that it is only called
inside the single frame. It is also called recursively, with
the result of reassemblies at a different recursion level being
used at a higher level.

The dst_ref ID is only 16 bits; the nest_level is limited to 500.
Combine them and use that as an ID for the sequences, to avoid
having multiple reassemblies in the same frame with the same key.
Such reassemblies tend to leak, particularly when they consist
of only one fragment (so there is no tvb created for the new
fragment head.)
2023-06-17 15:12:11 -04:00
John Thacker 0d0d3b84a7 Qt: Follow stream show as recent
Add a recent.gui_follow_show preference to save the most
recently used value of "Show data as" in Follow Stream
for a profile, as requested. It can be a bit time consuming
to wait for ASCII to load if that's not the format a user
commonly requests.

Fix #15963
2023-06-17 17:49:03 +00:00
Gerald Combs 4d5c4154b1 Convert wmem to C99 types
Ping #19116.
2023-06-17 17:38:53 +00:00
João Valverde 60dedef3f1 CMake: Fix config package without installed plugins or extcaps 2023-06-17 11:09:30 +00:00
Dr. Lars Völker 2956aac65c BLF: Last LIN-Message parameter is not mandatory (BUGFIX)
The blf code assumes that the last parameter of the LIN-Message format
is mandatory, which it is not. If present, blf stops opening the file.

Fixes: #19147
2023-06-17 10:29:39 +00:00
Dr. Lars Völker 7785452149 BLF: Bugfix CAN-FD Message format
The CAN-FD Message (not CAN-FD Message64) format was missing a field,
which lead to wrong dissections from time to time.

Fixes: #19146
2023-06-17 06:01:53 +00:00
John Thacker 7b0a35b528 tcp: Optimize contiguous check with first gap
As we now store a pointer to the first gap of a reassembly
(commit 5853886d50 ), we can
speed this up a bit.
2023-06-17 01:15:08 -04:00
John Thacker 2c02abf8c4 tcp: Optimize OOO reassembly a bit
Don't check for an updated contiguous length so often, it can
be linear on long reassemblies.
2023-06-17 01:15:07 -04:00
John Thacker e834377f78 Qt: Don't look for word boundaries in FollowStreamText
On long lines without whitespace, FollowStreamText (and its
QPlainTextEdit) spends most of its time when adding text looking
for word boundaries to wrap at.

For the C Array, Hex Dump, and YAML options, we insert line
endings after fixed widths, so the default wrap behavior is fine.

In other case, we don't control whether there's line breaks or white
space (and with Raw, we ensure that there *isn't* white space or
line breaks in the middle of long lines), so it's not worth an
O(N^2) performance hit looking for word boundaries. Text with words
separated by whitespace in very long lines will word wrap worse now,
but that's acceptable in exchange for the dramatic performance
improvement.

Fix #17313.

Related to #15963 ("There should be a preference for the initial
selection, so you can default to Raw, etc. instead of always having
to wait for ASCII to finish") and #15211 ("We should probably replace
FollowStreamText's QTextEdit with our own widget.")
2023-06-16 22:21:22 -04:00
Guy Harris c3cbff5a23 Redo address_with_resolution_to_str_buf().
Base "do we add the address string, wrapped in parentheses?" on "is the
address string non-empty?"  That handles both AT_NONE and various string
types when the string in question is empty.

If the rsolved name string is empty, don't just skip adding parentheses
around the address string, compute the space needed differently.
2023-06-16 16:59:22 -07:00
Gerald Combs a265aa4bc2 Convert writecap to C99 types
Convert writecap to C99 types. Add maximum and minimum values to
convert-glib-types.py.

Ping #19116
2023-06-16 15:34:44 +00:00
Martin Mayer bf791df00e ocp1: Fix typos 2023-06-16 14:44:15 +00:00
David Fort dafa2042f8 rdp_egfx: add links for frame start/end/ack
This patch adds the tracking of where EGFX frames are started, ended and acked. It adds
corresponding link fields to easily navigate between frame and its ack.
2023-06-16 14:43:29 +00:00
João Valverde 69a530c030 MSYS2: Install development headers with PKGBUILD
Instal development headers with MSYS2 native packaging, so
it can be used to develop Wireshark plugins on Windows.

Since we don't have an official Windows SDK this will make the
MSYS2 package more useful (more than it already is), rather than
just an alternative method to install Wireshark on Windows for people
using MSYS2.
2023-06-16 16:17:04 +01:00
Martin Mathieson 011b9e906e Set more full mask fields to 0x0 2023-06-15 23:41:26 +01:00