Commit Graph

83315 Commits

Author SHA1 Message Date
John Thacker d2fd2eeb31 text2pcap: encap types option (instead of link type)
Add an option to text2pcap to specify the encapsulation type
via wiretap encapsulation type short names instead of pcap
link layer types, similar to editcap.

Update the documentation to reflect this.
2022-01-16 04:27:03 +00:00
John Thacker 3f6c273e11 import_text: Check writable encap types against pcapng
Since Import from Hex Dump creates a pcapng temporary file, use
the list of encapsulations we can write to pcapng instead of pcap.

In particular, this makes WTAP_ENCAP_SYSTEMD_JOURNAL possible, so make
text_import capable of writing that encapsulation by using the proper
rec_type and block. It's not clear why someone would have a binary
hex dump of this text based format, but it works.
2022-01-16 03:34:34 +00:00
Gerald Combs 816f858361 CMake+packaging: Updates for Visual Studio 2022
Update the NSIS and WiX CMakeLists for Visual Studio 2022.
2022-01-15 18:24:55 -08:00
Gerald Combs 5f19c5b6ef GitLab CI: Migrate to Visual Studio 2022.
Migrate the Windows builds to Visual Studio 2022.
2022-01-15 16:40:07 -08:00
Martin Mathieson 559df3c620 Fix some spelling errors 2022-01-15 23:11:47 +00:00
Dario Lombardo 8e805674e0 ieee80211: fix wrong proto_tree_add_item call.
Data from packet has been used as encoding instead of an actual
encoding. Fix by using ENC_NA, since the field is FT_UINT8.

Fix: #17878.
2022-01-15 12:15:31 +00:00
Alexis La Goutte 112af30dd9 erf(wiretap): Fix Clang Warning Uninitialized argument value 2022-01-15 08:41:12 +00:00
Alexis La Goutte 153f836ab3 kafka: Fix Clang Warning Uninitialized argument value 2022-01-15 08:41:12 +00:00
Alexis La Goutte b1d7d78fed file-rfc7468: Fix Clang Warnings Uninitialized argument value 2022-01-15 08:41:12 +00:00
Dr. Lars Völker dd663c8c7f BLF: Improve handling of zlib errors 2022-01-15 08:30:36 +00:00
Dr. Lars Völker e9d650362c BLF: improve debug log output 2022-01-14 21:51:29 +01:00
Bahadir Ozgun 308add2f3a Fixed a typo 2022-01-14 12:19:25 +00:00
Dario Lombardo c0e2a26290 extrememesh: use correct address sizes when allocating a buffer.
Prevent useless allocation when no addresses are present in pinfo.
Useless allocation introduced in b086e5192a.

Fix: #17866.
2022-01-14 11:14:27 +00:00
Lin Sun 5da3992c8e BT Mesh: Fix build error when GCRYPT_VERSION_NUMBER >= 0x010600 is false 2022-01-14 10:01:34 +00:00
Bahadir Ozgun 5560f3f85b Fixed non-existent ness value because of wrong number 2022-01-14 07:18:04 +00:00
John Thacker 203820f3d0 wiretap: Register a systemd Journal Export Block
The block is lightweight and doesn't have any options so the create
function doesn't really do anything, but it needs to be registered
so that when systemd journal files are opened, the wtap_block_create()
call works and doesn't segfault. Fix #17875
2022-01-14 03:07:05 +00:00
Guy Harris 7da31cb139 libpcap: remove definition of unused structure.
We don't allocate a per-dumper private data structure, so there's no
need to define a structure type.
2022-01-13 11:46:36 -08:00
Quentin Armitage 3fce24fb99 netlink protocol: Add Keepalived and OpenR protocol identifiers
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
2022-01-13 16:02:53 +00:00
Dario Lombardo 4b7a022a07 openflow_v5: prevent infinite loops.
Check lenghts and add expert info when they are too small and
cause infinite loops.

Fix: #17847.
2022-01-13 15:04:27 +00:00
Dario Lombardo 445b3f7eaa openflow_v6: add one more sanity check.
Ref: #17847.
2022-01-13 14:53:13 +00:00
Dario Lombardo c427b81aa2 tds: consider 0 as invalid token size.
Instead of consider just negative sizes as invalid, threat 0 the
same way. The size is used to increment the packet offset and 0
causes an infinite loop.

Fix: #17855.
2022-01-13 14:29:54 +00:00
John Thacker a9e6f2660e wiretap: Fix description of Custom Block 2022-01-13 14:02:55 +00:00
Joakim Karlsson 6d53617f9d JSON: add 3GPP Supported Features handling
Format defined in TS29.571, ch5.2.2.
First API (NPCF) filled from TS29.512, ch5.8
2022-01-13 13:13:48 +00:00
Joakim Karlsson f62f8e59c6 pfcp: correction of IE Type: UE IP Address (93) 2022-01-13 13:03:21 +00:00
Gerald Combs a6e24a6234 macOS: Require Sparkle 1 for now.
The Sparkle project recently released Sparkle 2.0.0, which deprecates
the version 1 API. Add version discovery to FindSparkle.cmake and
require version 1 until we add support for the new API. Ping #17861.
2022-01-13 09:11:24 +00:00
John Thacker 5074b4d717 test: Update text2pcap test to use new hexdump option
Update the text2pcap tests to use the new tshark hexdump option
(see b5f89dbe2d ), which allow us to get a consistent roundtrip
of results instead of having to override the expected number of packets
and data size.
2022-01-12 23:22:39 -05:00
Jim Young b5f89dbe2d tshark: Add new long option --hexdump <hexoption> 2022-01-13 01:18:38 +00:00
Dario Lombardo fdc5166234 ssh: prevent packet-driven oversize bignum.
Fix: #17857.
2022-01-12 15:11:53 +00:00
Roland Knall 1abf3d7000 Qt: Automatically enable new coloring rules
Ensure, that new coloring rules are enabled automatically
2022-01-12 14:33:02 +00:00
Pau Espin 85e79ae1fd packet-rsl: Fix dissect of RLM Cause IE with length 0
The IE is defined in 3GPP TS 48.058 section 8.3.3 "ERROR INDICATION" as
being a TLV of size 2-4, which means length=0 is an accepted form. Avoid
showing "Malformed packet" error if such packet is found.
2022-01-12 11:40:43 +01:00
Joerg Mayer 39d5557e7d Update dictionary.ruckus 2022-01-12 09:54:12 +00:00
Andy Grover 7190f34e2d proxy protocol: Fix parsing of TLV values
Do not attempt to look for TLVs in the entire rest of the packet, only
look in the proxy protocol header bytes.
2022-01-12 09:39:01 +00:00
Pascal Quantin 5c1406971d NGAP: fix variable ‘ngap_data’ might be clobbered by ‘longjmp’ or ‘vfork’
Fixes #17858
2022-01-12 08:52:12 +01:00
Guy Harris 08f5044894 except: update some coments.
If KAZLIB_POSIX_THREADS isn't defined, we are still using thread support
- compiler and support library support for per-thread data, at least for
the stack of exception catchers.

Update and expand comments.
2022-01-11 21:05:35 -08:00
Nicolas Fella 34c7a0edfd Set desktop file name for QApplication
This must match the base name of the .desktop file (without the .desktop suffix).

The implicit default is 'wireshark', which worked until the file got renamed in 42a09ad02e

Setting this is important for several desktop enviromnent features to work, for example the window icon on Plasma Wayland
2022-01-12 01:41:48 +01:00
Dr. Lars Völker a21f1af336 SIGNAL-PDU: Adding Aggregation Functions
This patch allows to calculate aggregations for easier analysis.
Per configured signal (uint, int, float) the following aggregations
are supported:
- sum of values (sum)
- average of values (avg)
- sum of value * delta_time (int)
2022-01-11 21:58:13 +00:00
Guy Harris 18748abb5e Fix handling of dissector registration errors.
Report all registration errors with REPORT_DISSECTOR_BUG().

In the workers for register_all_protocols() and
register_all_protocol_handlers(), use TRY/CATCH/ENDTRY to catch
DissectorError exceptions thrown by REPORT_DISSECTOR_BUG() when
registering dissectors.  Return the error message from the main thread
routine and, when joining the worker thread, if there's an error message
returned, throw it in the current thread, so that it gets caught by the
main libwireshark initialization code.

Fixes the crash in #17856.
2022-01-11 19:56:14 +00:00
Jaap Keuter 16e0ba7dd7 CFM: Add 1SL PDU dissection 2022-01-11 17:38:48 +00:00
John Thacker f85f077b54 text_import: Allow fake IP headers with Raw IP encapsulation
In text2pcap and Import from Hex Dump, allow fake IP headers with
the appropriate versions when the Raw IP, Raw IPv4, and Raw IPv6
encapsulations are specified. In such cases, do not add a dummy
Ethernet header.

Continue to reject other encapsulations besides these, Ethernet,
and Wireshark Upper PDU when appropriate. Add some checks for the
encapsulation type in text_import as well, instead of just assuming
that the callers handle it correctly.
2022-01-11 08:46:44 -05:00
Martin Mathieson a0a67a75fe SSH: Make some functions static (were local but declared extern) 2022-01-11 12:15:50 +00:00
Roman Volkov 9c38eda7ef mpeg descriptor: complete Registration Descriptor (0x05) ID list
A fix. Add first ten registered IDs.
2022-01-11 12:13:53 +02:00
Jaap Keuter 7113cf15a6 MPLS ECHO: Fix FEC stack change TLV dissection 2022-01-11 07:16:07 +00:00
John Thacker ad035ed438 text2pcap: Case insensitive match for ISO time option
Let the user select ISO 8601 time format with "ISO", "iso",
or anything in between.
2022-01-11 05:12:13 +00:00
Guy Harris db27fb777a exceptions: make the exception handler stack per-thread.
This prevents the weird failures I saw on macOS in #17856; instead, it
should fail on *all* platforms with

    Unhandled exception ("epan/proto.c:8800: failed assertion "DISSECTOR_ASSERT_NOT_REACHED"", group=1, code=6)

(which it does on macOS 11.6/Xcode 12.5.1 and Windows 10/VS 2019
16.11.8; according to

https://en.wikipedia.org/w/index.php?title=Thread-local_storage&oldid=1064900318#C_and_C++

the major UN*X C compilers support __thread and the major Windows C
compilers support __declspec(thread).).

@jvalverde: on branches that require C11/C++11 support, we could perhaps
just use _Thread_local for C and thread_local for C++.  Note that
<thread.h> is optional in C11, and macOS 11.6/Xcode 12.5.1 does not
appear to include it.)

This does not *fix* the aforementioned issue; to do *that* we need to do
TRY in the register-dissectors thread code.  I'm committing this
separately because it fixes a bug in our exception package that could
cause all sorts of randomness now and in the future - what we're doing
now is Just Wrong.

(Yes, there's code to support per-thread exception handler stacks *on
platforms with pthreads*, but this is simpler *and* also works on
Windows.)
2022-01-11 05:00:42 +00:00
John Thacker b5c51f396a text2pcap: Use RFC 3849 addresses for documentation
Use the RFC 3849 IPv6 address prefix reserved for documentation
for the documentation and examples
2022-01-11 01:28:23 +00:00
John Thacker d047c75cd0 import_text+Qt: Don't add impossible dummy headers to wrong encaps
Move the list of encapsulation buttons to a QButtonGroup, which makes
it easy to tell which one of them is activated.

Use that to fix an issue where dummy headers impermissible for an
encapsulation type could be added if the radio button was selected
before switching the encapsulation type. (Only for encapsulations
that allow at least one type, i.e. Ethernet or Wireshark Upper PDU.)
2022-01-11 01:04:21 +00:00
Gerald Combs b7ab0fc1cd SSH: Add back a NULL check.
d4a3aabc originally had this check, but I misread the GLib documentation
& source, and requested that Lars remove it.
2022-01-10 11:48:21 -08:00
Dr. Lars Völker b3d5ace216 PTP: ITU-T OUI as define instead of constant (cleanup) 2022-01-10 13:33:35 +00:00
Dr. Lars Völker 5e26c1cf8c PTP: Adding 802.1AS-2020 1-step Sync support
This patch adds support for 802.1AS-2020 Sync with 1-step as they carry
the originTimestamp and the Follow_UP TLV.

This patch also corrects that 802.1AS Sync with 2-step DO NOT have the
originTimestamp but "reserved" data.

Based on MR 2638.
2022-01-10 12:32:40 +01:00
Roman Volkov 869b84631d dvb: unify some 'Length' fields
Unify the last hex 'Length' fields displaying, make them decimal
as other ones.
2022-01-09 22:16:27 +02:00