Commit Graph

82297 Commits

Author SHA1 Message Date
João Valverde b4af7c52a5 dfilter: Add a flags member to the syntax tree node
Use it to record "inside parenthesis".
2021-09-30 17:03:55 +00:00
John Thacker eef110de80 documentation: Add absolute time to user guide
Add a description of absolute time fields to the Display Filter
Field Types section and explain some of its quirks (always in
local time zone, no time zone suffix, etc.) Related to #13268.
2021-09-30 16:44:22 +00:00
João Valverde 0e7ba54d98 dfilter: Clean up handling of "deprecated" tokens
Pass the deprecated data struture to the scanner and insert the deprecated
tokens there. This avoids having to keep a dedicated syntax node field
for this.

Pass the deprecated argument in dfwork_t instead of in a separate
argument. This is less cumbersome than adding an extra argument
to every level of the semantic checker.
2021-09-30 17:26:19 +01:00
João Valverde d6836d103d dfilter: Add test for "deprecated" tokens
Tokens that are (so-called) deprecated produce a warning/hint to
the user in the UI.
2021-09-30 17:26:19 +01:00
João Valverde 3ea2a61f2a dfilter: Display syntax tree for debugging
Use wslog to output debug information. Being able to control
it at runtime is a big advantage.

We extend the syntax tree nodes with a method to return a
canonical string representation.

Add a routine to walk the tree and return an textual representation
for debugging purposes.
2021-09-30 16:29:11 +01:00
João Valverde 1883487241 ws_getopt: Add a test for optional parameter 2021-09-30 14:24:52 +00:00
João Valverde 5362d0c31b ws_getopt: Rename struct and macros
This is part of the API and should also be renamed to avoid conflicts.
2021-09-30 13:59:28 +00:00
Martin Mathieson 0173ea0ec1 COSE: make some functions static 2021-09-30 13:42:24 +00:00
João Valverde e6a1225611 wslog: Alias --log-domain to --log-domains
I keep mistyping this if there is only one domain and it's annoying.
2021-09-30 13:08:32 +00:00
Stig Bjørlykke 19d27eff98 Lua: Free FileHandler on deregister
Free FileHandler and all allocated strings on deregister to avoid
memory leak when reloading Lua plugins.
2021-09-30 11:07:08 +00:00
Stig Bjørlykke 96cfaf67a3 Qt: Reload Lua FileHandler when having a capture file
Support reloading a Lua FileHandler when this is in use for a
loaded capture file. Prompt to save the file if having unsaved
changes because the file must be reloaded.

Fixes #17615
2021-09-30 11:07:08 +00:00
Joakim Andersson a3c2ad04ee nordic_ble: Re-use OK Error true false flag
Re-use the OK Error true false flag instead of defining a custom one
with OK Incorrect.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-09-30 07:42:28 +00:00
Joakim Andersson e4842cea3f nordic_ble: Add address resolved flag to Advertising PDUs
Add address resolved flag to Advertising PDUs. This indicates if the
sniffer was able to resolve the advertising address using an IRK.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-09-30 07:42:28 +00:00
John Thacker 2ee57a0e46 ftype-time: Absolute times for DFILTER are always local time
absolute_val_from_string() doesn't allow a time zone and always
assumes that time strings are in local time zone, so
absolute_val_to_repr() needs to produce that output for FTREPR_DFILTER
so that construct_match_selected_string() produces the correct filter
string for FT_ABSOLUTE_TIME fields that are not ABSOLUTE_TIME_LOCAL.

Fix #17617
2021-09-30 06:23:05 +00:00
Adrian Granados 4975dbc867 ieee80211: Add dissector for Ruckus vendor specific IE
Dissector supports only type 3: AP Name.
2021-09-30 05:38:13 +00:00
Thomas Dreibholz 220b5af9d4 Removed unnecessary second lookup with val_to_str_const(). 2021-09-30 04:08:36 +00:00
Thomas Dreibholz c2a0a5ebca Add message type with col_add_fstr(). 2021-09-30 04:08:36 +00:00
Jaap Keuter e1543bda0c IS-IS LSP: extended IP reachability prefix SID dissection change
The flags were used to identify the SID format, without regard for the
available size. Also in case of error in the flags the SID would not be
shown. Convert, like elsewhere, SID format identification based on size
and add flag validity checks, based on RFC 8667 section 2.1.1.

Closes #17610
2021-09-30 03:51:45 +00:00
Gerald Combs eb5d17f2bc Windows: Upgrade libpcap, lz4, nghttp2, and snappy.
Upgrade libpcap to 1.10.1, lz4 to 1.9.3, nghttp2 to 1.44.0, and snappy
to 1.1.9.
2021-09-29 18:14:52 -07:00
Berk Akinci a88d0742cf USBHID: Add integer representation of data bits without specific parsing.
Also changing keyboard and button disssectors to prefix values with ": ".  This
matches how proto_tree_add_int_bits_format_value() displays values.

Concludes the last bits left: Closes #17550
2021-09-29 19:17:51 +00:00
Evan Huus 8269572c4f cbor: use scoped pinfo pool instead of global
One reference snuck into the new cbor api, but pinfo was already in
scope so it's a trivial fix.
2021-09-29 11:56:02 -04:00
Joakim Karlsson 6d04c07955 COSE: fix might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] 2021-09-29 14:13:09 +00:00
João Valverde 42906f1246 dftest: Don't use quotes to output filter
Using quotes is confusing because they are difficult to distinguish
from the actual filter expression itself. Quotes are unnecessary
anyway because whitespace is not significant (except inside brackets).
2021-09-29 11:37:14 +00:00
Joakim Karlsson 93d49562c5 JSON: enable Binary data lookup on Array 2021-09-29 09:35:27 +00:00
Brian Sipos abd0f1183f COSE dissector from dtn-wireshark project 2021-09-29 08:51:13 +00:00
Pascal Quantin 4010502a82 LPP: upgrade dissector to v16.6.0 2021-09-29 07:58:16 +00:00
Stig Bjørlykke e9ac4d3900 proto: Delay deleting heur_dtbl_entry_t in heur_dissector_delete
Add the heur_dtbl_entry_t entry as deregistered when deleting a
heuristics dissector. The UDP dissector is storing a pointer to
this in proto_data and may access the entry during reload Lua
plugins until all packets are redissected.
2021-09-29 07:08:52 +00:00
Evan Huus 3cdada3e7b guids: wmem-scope lookups
Avoids the use of the global unprotected packet memory pool and lets the
compiler enforce scoping.
2021-09-28 15:07:55 -04:00
Gerald Combs 440bbd37a0 Docs: More POD markup cleanup. 2021-09-28 16:41:32 +00:00
Martin Mathieson a156d7d05d Fix some spelling errors. 2021-09-28 09:50:58 +00:00
Joakim Karlsson 9a5b9dbca3 JSON: enable Binary data also for non-compact 2021-09-28 09:03:44 +00:00
Anders Broman a757a93208 GSM MAP Update to 3GPP TS 29.002 V17.1.0 (2021-06) 2021-09-28 10:17:55 +02:00
Anders Broman d7a8a55d2a GSM MAP: Dissect message noteSubscriberPresent. 2021-09-28 04:59:19 +00:00
João Valverde 481d0716e5 MSYS2: Test commands in pipes need quoting
At least using MSYS2 python (that uses system() that uses CMD.EXE)
we must quote every command in a pipe, otherwise the "'C:' is not
recognized as an internal or external program" error occurs.
2021-09-27 16:45:58 +00:00
João Valverde ef06593c13 MSYS2: Fix detection of test suite binaries
Fix hack to find test binaries. We must only search in run/<config>
if using Visual Studio.
2021-09-27 16:45:58 +00:00
João Valverde 6c5e56f752 Windows: Add preliminary support for MSYS2
If we are using MSYS2 we use those packages to build Wireshark
using MinGW-w64 and disable most or all of our win-setup.ps1 codepaths.

Fix GLib configuration. Disable copying of DLLs with MSYS2.

Some tests in the suite_capture test suite are failing with MSYS
MINGW64. That particular set of tests is way too brittle regarding
file system paths; more work is needed to improve that situation.
2021-09-27 16:45:58 +00:00
João Valverde 1c8752935d CMake: Remove debian package target
This is more likely to hinder than to help, and is not really a good way to
invoke dpkg-buildpackage. It's a crutch that doesn't interact well with ninja,
has a 50/50 chance of giving the right results and will pollute the build
environment.

The Debian package should be built from a tarball instead.
2021-09-27 17:25:45 +01:00
Gerald Combs f1ee29fc61 GitLab CI: Don't refresh our openSUSE repository.
The openSUSE 15.2 RPM Test step occasionally fails when trying to
retrieve repository metadata. Add "--no-remote" to the zypper install
command in the openSUSE 15.2 RPM Test to match the offline behavior of
our other RPM tests.
2021-09-27 04:17:01 +00:00
Tomasz Moń 7b82110092 USB HID: Parse bit fields with correct bit order
Implement little endian support for tvb_get_bits family of functions.
The big/little endian refers to bit numbering within an octet. In big
endian, the most significant bit is considered bit 0, while in little
endian the least significant bit is considered bit 0.

Add encoding parameters to proto tree bits format family functions.
Specify ENC_BIG_ENDIAN in all dissectors using these functions except in
USB HID that requires ENC_LITTLE_ENDIAN to work correctly.

When formatting bits values, always display most significant bit on the
leftmost position regardless of the encoding. This results in no gaps
between octets and makes the displayed value comprehensible.

Close #4478
Fix #17014
2021-09-26 18:16:28 +02:00
Gerald Combs d87e6e58fa [Automatic update for 2021-09-26]
Update manuf, services enterprise numbers, translations, and other items.
2021-09-26 15:19:23 +00:00
Nardi Ivan 151cfe5823 QUIC: disable "Follow TLS stream" for QUIC session
Close #17602
2021-09-26 14:40:42 +00:00
Roland Knall 7a283b0f36 Qt: Add heuristic description to dissector tables
Add the descriptive name for the heuristic dissector to the dissector
tables as well as move search bar to top

Fixes #17603
2021-09-26 10:36:44 +00:00
Guy Harris 92d77cef7a libwiretap: fix test for built-in file types.
The file type/subtype for built-in types are <=
wtap_num_builtin_file_types_subtypes - the plugin types are given
type/subtype values after the last built-in type/subtype value.

Fixes #17614.
2021-09-25 14:09:41 -07:00
João Valverde 047542b587 reassemble_test: Add an explicit cast [-Wformat=] 2021-09-25 21:30:20 +01:00
João Valverde acffc56148 test_wsutil: Use 'static' linkage 2021-09-25 19:44:40 +01:00
João Valverde eba84d06e4 docs: Fix fatal log level description 2021-09-25 17:45:33 +01:00
John Thacker 1c3da46bf8 H265: Handle too large Exponential-Golomb coded values
We only allow exp-Golomb coded values to be as large as 32 bit
integers. When packets encode too large a value (invalid content),
clamp the value and report it as malformed with an expert info,
reporting the number of bits consumed (which will probably lead to
a BoundsError later in the packet.)

The case with 32 leading zeroes is a special case because for both
unsigned and signed interpretation there is one non overflowing value.

This is better than using DISSECTOR_ASSERT for invalid packet content.
Avoid left shifting a 32 bit integer by 32, which is undefined.

Use DISSECTOR_ASSERT_FIELD_TYPE at the beginning of the function rather
than using DISSECTOR_ASSERT in the middle, since it's more descriptive
in its error message and clearer code to do it at the start.

Same issue as #17612, commit a7dfe53488.
2021-09-25 08:15:24 -04:00
John Thacker a7dfe53488 H264: Handle too large Exponential-Golomb coded values
Special case the situation with 32 leading zeroes, since in C it's
undefined to left shift a 32 bit integer by 32. Only one value with
32 leading zeroes is an encoded 32 bit integer.

Clamp too large values to G_MAX[U]INT32 and report it as a malformed
expert info. Also report the supposed amount of bits consumed,
which will probably lead to a BoundsError down the line (possibly
not for some bit errors).

This is better than using DISSECTOR_ASSERT for invalid packet content.

Use DISSECTOR_ASSERT_FIELD_TYPE for doing the checks on the hf_field
types, since it's more descriptive in its error message.

Fix #17612.
2021-09-24 17:35:35 -04:00
Роман Донченко 05512b0428 jpeg: correct the IFD tag for the Copyright field
It is supposed to be 0x8298 according to both the TIFF and Exif specs.
2021-09-24 20:32:29 +03:00
Роман Донченко 1848fa71ed jpeg: fix typos in variable names
IFD is the structure these variables refer to, and is short for
Image File Directory.
2021-09-24 17:46:20 +03:00