Commit Graph

90244 Commits

Author SHA1 Message Date
John Thacker 2b5fd572f7 File sets: Match both formats, compressed files
For file sets produced by multiple file captures, match both
the number before time and the newer time before number format.
Distinguish them in the return value, since files of different
formats are not part of the same set.

Also handle files with a compression suffix as well, as we can
produce that in captures. Since in multi file captures compression
is done when switching files, allow file sets to have a mixture of files
compressed and uncompressed. When doing a multi file capture and
compressing, the last file is not compressed.

Add information to the user guide and release notes

Related to #12371
2024-01-29 13:39:08 +00:00
Martin Mathieson a8aebe5cf4 Check for item long text being 0 - prefer NULL 2024-01-29 11:30:41 +00:00
Joakim Karlsson da8c8fc1cf NGAP: append SMF PDU in column info
This change will append PDUs from TS38.413 ch9.3.4 to column info
2024-01-29 10:07:44 +00:00
Martin Mathieson fde6865fe9 PLDM: make a function static 2024-01-29 09:34:30 +00:00
Martin Mathieson c6fee3ab52 Fix some more item warnings 2024-01-28 22:11:33 +00:00
Jaap Keuter 4a948ad57a SANE: Quality improvements and correction 2024-01-28 21:41:12 +00:00
Gerald Combs 76909e44d2 [Automatic update for 2024-01-28]
Update manuf, services enterprise numbers, translations, and other items.
2024-01-28 20:04:44 +00:00
John Thacker 57bfe3d4a3 COSE: Fix a leak
Fix #19623
2024-01-28 12:09:44 -05:00
John Thacker 2d22fa26ba XMPP: Fix some leaks on malformed data 2024-01-27 19:57:07 -05:00
John Thacker 859e70fbb3 WOW: Fix use of unitialized memory
tvb_get_raw_bytes_as_string doesn't check lengths, because it's
used elsewhere when the length is unknown. If we use
tvb_get_string_enc, that checks the offsets and throws an
exception as appropriate, but then we have to use g_utf8_strreverse
due to the possibility of UTF-8 REPLACEMENT CHARACTERs.

To handle embedded nulls properly, we need to be using counted
strings (like wmem_strbuf_t) in more places.

Fix #19621
2024-01-27 19:18:41 -05:00
John Thacker c77448d793 GTP, GTPv2: stat taps can't be wmem_file_scope
Stat tap windows can be opened by the GUI (e.g., a
ServiceResponseTimeDialog) when no file is open, and persist
past a file being closed, i.e. outside of wmem_file_scope().

Items concerning the taps should not be created in wmem_file_scope().
This fails an assert, which crashes when built for a Debug target.

To use wmem, we would need to create a scope appropriate for the lifetime
of the ServiceReponseTimeDialog or other Tap dialog (or else add a
callback mechanism to srt table to free items created in epan scope.)

Partially revert 47b310da47
(the part where the stat taps are concerned.)

Related to #19620
2024-01-27 13:32:03 -05:00
Martin Mathieson 5dc8c6d5fb Check valid display value set for ipv4 fields 2024-01-27 18:13:44 +00:00
Martin Mathieson 73c7fcab1e Check that string items have display set to BASE_NONE 2024-01-27 17:12:59 +00:00
Martin Mathieson 7b58f82228 Set BASE_NONE for FT_BOOLEAN items with zero mask 2024-01-27 16:42:17 +00:00
Sebastian Reimers f3216e8c4a RTP: Add OPUS dynamic clockrate
The RTP timestamp is incremented with a 48000 Hz clock rate for all modes of
Opus and all sampling rates. This fixes jitter calculations.

https://datatracker.ietf.org/doc/html/rfc7587#section-4.1
2024-01-27 15:23:54 +00:00
Martin Mathieson 25f8695771 Be careful with scope of strings used for columns in SRT table 2024-01-27 15:21:25 +00:00
Uli Heilmeier 0103e8f9d7 DNS: add queried names to DNS statistics
Queried DNS names can be enabled for DNS staticstics with a preference.
Due to performance reason this is disabled by default.

Kind of related to #16728 and #16173
2024-01-27 11:35:51 +00:00
Darius Davis 38bcee5963 Services: const-ify the data structures.
The list of TCP/UDP/SCTP/DCCP port numbers never needs to be modified.  This
moves ~150 kBytes of data to a read-only data section.
2024-01-27 11:27:22 +00:00
Dirk Römmen 989002841e BACnet:Fixed dissector for authentication related properties.
Fixed dissector for authentication related properties (open/close
tags were skipped)
Added new vendor id's as of january 24, 2024.
2024-01-27 11:25:56 +00:00
Sergio de Paula dd846520f4 [Zigbee GP] Fixed move and step cmd dissectors
* Move up/down command should not consider the rate field mandatory
* Step up/down command should not consider the transition time field mandatory
2024-01-27 09:19:49 +00:00
Fabian Bäumer d424f4b330 feat(ssh): Add support for ping@openssh.com message dissection 2024-01-27 00:12:33 +00:00
Fabian Bäumer a335e10838 feat(ssh): Add SSH dissection support for proprietary extensions 2024-01-27 00:12:33 +00:00
Fabian Bäumer c85c4dcfef feat(ssh): Add SSH_MSG_NEWCOMPRESS message value 2024-01-27 00:12:33 +00:00
Fabian Bäumer 7039e85f8e feat(ssh): Add SSH dissection support for RFC8308 extensions 2024-01-27 00:12:33 +00:00
Fabian Bäumer 19ddbcaaae feat(ssh): Add SSH extension dissection support (RFC8308) 2024-01-27 00:12:33 +00:00
John Thacker 352fe53a15 dfilter: use strpbrk when checking if macro or field reference
When trying to check if syntax in a filter that starts with
"${" is a macro or a field reference, use strpbrk to find the
first of '#' (layer) or '}' (closing the macro or field reference
expression.) Using strchr twice in a row causes incorrect behavior
in a long filter that has a '#' located later past the '}',
referring to a layer of a different field.

Also test for ';' and ':' and return if the string has those before
the other two characters.

Those two characters are illegal in fields but indicate that it is
a macro, as they separate macros from their arguments. Skip the other
processing as unnecessary.
2024-01-26 10:49:17 -05:00
David Perry f09710965a [#19584] show heur dissectors in `tshark -G` report
Expand `tshark -G dissector-tables` to also list heuristic dissector
tables. Parallels the output for standard dissector tables with the
following changes:

* Field 3 (ftenum type) is shown as "heuristic"
* Field 4 (base) is omitted, as it always was for non-integer dissector
  tables
* Field 6 (decode as) is omitted, since heuristic tables can't be used
  with "decode as"

Update the tshark man page to reflect this change. Also clarify that the
first field output from `-G heuristic-decodes` is the heuristic table
name.

Implementation detail: heuristic dissector tables are listed after all
other dissector tables, since they are stored in a separate structure
from the other tables. This results in simpler code than attempting to
commingle the entries for both types in strict alphabetical order.

Add descriptive table name
2024-01-26 15:23:22 +00:00
John Thacker 56292dc522 Qt: Set imported hexdumps as tmpfiles, don't set last open dir on then
When calling openCaptureFile() after importing a hexdump,
call it with the is_tempfile parameter set to true, as done
after a merge. That means that the imported file (which is
already written to a temporary directory) is treated like
other temporary capture files and:

* Is deleted if closed without saving
* Is marked as having changes
* Pops up a warning if closed without saving
* Doesn't have its temporary filename shown
* Isn't added to the recent capture file list

When openCaptureFile() is called with is_tempfile set to true,
don't call setLastOpenDirFromFilename. Just like with a new
live capture, temporary files from any source shouldn't change
what directory opens in the file chooser.

Also don't call setLastOpenDir from the separate mergeCaptureFile()
function that handles the merge dialog of two files (unlike the
drag and drop merge) for the same reason.

*Do* call setLastOpenDirFromFilename with the filename of the
hexdump chosen in ImportTextDialog; that's the directory the
user last opened a file from.

Fix #15559
2024-01-26 15:20:43 +00:00
Thibaut Vandervelden a3900a5d5e change display order of IEEE802154 address fields
This patch changes the display order of the IEEE802154 address fields
only for the IEEE802154 tree root. The order of the address fields
for the other trees is not changed. The order is now source address
first. This is not the same as the order in the frame, where the
destination address is first. However, reading it from left to right
makes more sense when the source address is first.
2024-01-26 14:12:47 +00:00
Uli Heilmeier 08956f6d13 DNS: Add expert info for missing response 2024-01-26 14:04:30 +00:00
Darius Davis f5f8a574b1 Tools: const-ify pci-ids data.
This moves ~620 kBytes of data into the read-only data section.
2024-01-26 10:20:29 +00:00
Maxim Sharabayko 864c212b51 SRT: Parse the Group HS extension
Added parsing of the Group handshake extension of the SRT protocol.

Internet-Draft: https://haivision.github.io/srt-rfc/draft-sharabayko-srt.html#section-3.2.1.4
2024-01-26 08:19:47 +00:00
Riya Dixit 1e3a1d7118 Adding PLDM dissector for Platform Specification
This commit implemements PLDM dissector
for the Platform specification of the protocol
which is done following DMTF guideline
documentation -
https://www.dmtf.org/sites/default/files/standards/documents/DSP0248_1.2.0.pdf

Testing : For verification of dissector
pcap file collected during host poweron
is used as well as used custom pcaps.

Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>
2024-01-26 07:19:53 +00:00
John Thacker cb259891f7 Qt: Restore drag and drop filter buttons
Commit 9c75c1dc18 introduced
a new eventFilter function for FilterExpressionToolBar but
called the wrong base class function in it, removing the
drag and drop buttons.

Fix #19447
2024-01-25 18:38:38 -05:00
Gerald Combs d1301fecc1 macos-setup: Use `set -e`
Use `set -e` and remove a bunch of no-longer-needed `|| exit 1`s. Make
sure we pass `--fail-with-body` to curl, and that we have a version of
curl that supports that option. Fix other issues that `set -e` turned
up.

[skip ci]
2024-01-25 22:24:04 +00:00
Martin Mathieson 4571d9f194 Fix more FT_BOOLEAN items with no mask - set len to BASE_NONE 2024-01-25 22:01:03 +00:00
Martin Mathieson fa84f7541e Check that FT_BOOLEAN items with zero-mask use BASE_NONE 2024-01-25 19:32:47 +00:00
Antonio Vázquez Blanco bf30e483c0 bthci_vendor: Add broadcom read mem and refactor writemem 2024-01-25 11:40:21 +01:00
John Thacker 5a28b01e86 rtmpt: Don't allow chunk_size to be zero or negative
There's a number of variables that are lengths that should probably
be unsigned, but at least make sure negative values don't get assigned
to the chunk size, which can lead to an infinite loop. (It's read from
the packet as an unsigned 32 bit integer, but it should never in
practice have a value in the top half of that range.)

Fix #19617
2024-01-24 23:10:37 -05:00
Gerald Combs 86705cc863 macos-setup: zstd and lz4 fixes
Pass in our installation prefix at build time, which is required for
prefixes other than /usr/local. Fix a few ShellCheck warnings.

[skip ci]
2024-01-24 17:10:46 -08:00
Anders Broman 4d6a8c85b5 Fix base for FT_BOOLEAN without bitmask(BASE_NONE) 2024-01-24 21:58:02 +01:00
John Thacker 08cf0e9553 file: Don't recompile the dfilter during a live capture
Saving only the dfilter text and recompiling the code when
[re]dissecting or scanning groups of packets operates on the
explicit assumption that previously validated filter text will
always compile to valid filter code

That assumption is not true; while we invalidate the filter and
replace the text with NULL if display filter macros change or
other aspects of the packet matching expressions change so that
the previous text is no longer valid, display filters that match
FT_IPv4 or FT_IPv6 fields to resolved hostnames require a host
name lookup each time they are compiled, which can timeout, especially
if there are too many requests in flight at once. This is particularly
likely if a recompilation is performed each time additional frames
arrive during a live capture.

It is important to stress that the stronger, implicit assumption that
the display filter will compile to the same code is also false.
1) Display filters that require host name lookup can change even if
   it doesn't timeout.
2) Display filter macros can change.
3) Display filters with field references will change if the selected
   frame has changed.

In the case of a rescan, redissection, reload, retap, or opening a
new file, we want the new dfcode. For cf_continue_tail and
cf_finish_tail, when a new batch of frames have arrived, we might
be able to cache the host lookup for 1), and a user might want the
new macro definitions in 2) (but in that case, why not a rescan of
all packets?), but almost surely for 3) wants the field references
of the frame selected in the GUI when the filter was applied, not
whatever frame is currently selected when new packets arrive. So
we keep the old dfcode, and also reduce recompilation (which becomes
more important as the default update interval can be reduced, cf.
f0712606a3 ).

Currently filters with field references don't work at all with
newly arrived frames in live captures, because the references
aren't loaded to the code. This fixes that by using the field
references from the original frame.

Cf. 1370d2f738

Fix #19612. Fix #12517.
2024-01-24 15:42:46 +00:00
John Thacker 70e78cd390 ringbuffer: Use g_path_get_basename to find the last component
On Windows, the path separator can be either G_DIR_SEPARATOR
or '/' (G_DIR_SEPARATOR_S).

Just use g_path_get_basename and g_path_get_dirname rather
than reinventing them, or worrying about which directory
separator we've passed to the function.

Fix #14614
2024-01-24 15:41:36 +00:00
John Thacker 26c6e3af12 test: Skip mongo zstd test if we don't have zstd
Fix the macOS Intel build (but we should find out why zstd
isn't installed right now.)
2024-01-24 09:55:12 -05:00
Anders Broman cf74fae3d9 HTTP2: Heuristicly detect application/json 2024-01-24 11:44:08 +00:00
John Thacker ffcf580230 epan: Make hex_str_to_bytes reject an odd # of hex characters >= 3
hex_str_to_bytes currently allows an odd number of hex characters
after a separator (including no separator). It parses them in an
entirely unexpected way; taking two characters at a time to form
one byte and then using the last leftover character by itself,
thus adding a missing lead zero to the last hex character instead
of the first.

E.g., 3.109.209.43 is parsed as 0x03 0x10 0x09 0x20 0x09 0x43

Since this interpretation has never been correct, just disallow any
odd number of hex characters 3 or greater. Continue to support a
single hex character after a separator (or by itself.)

It's still probably too accepting, as it allows the separator to
change back and forth, including back and forth from no separator
when force_separators is false (thus allowing the number of hex
digits between separators to vary.)

Fix #19449. Fix #19604.
2024-01-24 09:07:38 +00:00
John Thacker f274be5523 dfilter: Handle null arguments in macros better
If a null argument is given to a macro, print an error saying that
is disallowed instead of substituting the null argument (i.e., an
unquoted empty string) into the macro.
The latter almost certainly still produces a grammatical error, but it
will be something mysterious that depends on the macro definition like

"==" was unexpected in this context

instead of a useful error string.

For macros that take strings as argument, substituting a null has
never worked either, "" has always needed to be used.

As a special case, accept a single empty argument as meaning
"a macro with 0 arguments" instead of how it is currently treated,
a "macro with 1 null argument", i.e. $mymacro() for the new
function-like syntax and ${mymacro:} for the original syntax.

See 7d87367e22
2024-01-24 08:11:00 +00:00
Gerald Combs c538dd9ff9 tools: Add a protected branch check to validate-commit.py 2024-01-24 02:55:15 +00:00
John Thacker ffbf7ff540 dfilter: Allow semicolons to separate macro name from arg list
Instead of requiring ${macro:arg1;...;argN}, allow the format
${macro;arg1;...;argN}.

The semicolon isn't used anywhere else, it's simple to support,
and already used in the macro syntax. It's easier to remember
if all the separators in a macro are the same.

The colon is allowed in literals, which is why it's not used
between the arguments in the macro argument list, and allowing
it after the name makes the grammar more complicated, including
tokenizing when having pop-ups of potential field matches in
the display filter line edit (#19499.)

Update the documentation for this. Also edit the documentation
for macro syntax in a few places where it implies that whitespace
in macro arguments would be ignored; in fact, it's significant.
2024-01-24 01:00:32 +00:00
Timo Warns 5c972dd075 GNSS: fix formatting of SBAS MT25 velocities
Fix the formatting of SBAS MT25 velocities: Cast constant to int64 type
to ensure that arithmetics for formatting are performed using int64.
2024-01-23 21:40:38 +00:00