Commit Graph

86808 Commits

Author SHA1 Message Date
João Valverde 66bd99f1a8 wsutil/filesystem: Fix potential memory leak
We now use the 'install_prefix' variable on multiple platforms,
not just MSYS2.
2023-02-06 19:39:33 +00:00
João Valverde d9353d1684 Fix MSYS2 build
Fix:

```
FAILED: run/extcap/randpktdump.exe
cmd.exe /C "cd . && D:\a\_temp\msys64\ucrt64\bin\gcc.exe -fvisibility=hidden  -Wall -Wextra -Wpointer-arith -Wformat-security -fno-strict-overflow -fexcess-precision=fast -Wvla -Wattributes -Wpragmas -Wredundant-decls -Wunreachable-code -Wlogical-op -Wno-error=stringop-overflow= -Wno-error=deprecated-declarations -Wframe-larger-than=32768 -Wno-format-truncation -fdiagnostics-color=always -Wshadow -Wold-style-definition -Wstrict-prototypes -Wno-pointer-sign -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fmacro-prefix-map=D:/a/wireshark/wireshark/build/src/wireshark/= -fmacro-prefix-map=D:/a/wireshark/wireshark/build/src/build-UCRT64/= -O3 -DNDEBUG -pipe     -Wl,--as-needed  -municode CMakeFiles/cli_main.dir/cli_main.c.obj extcap/CMakeFiles/extcap-base.dir/extcap-base.c.obj extcap/CMakeFiles/randpktdump.dir/randpktdump.c.obj extcap/CMakeFiles/randpktdump.dir/__/resources/randpktdump.rc.obj -o run\extcap\randpktdump.exe -Wl,--out-implib,run\librandpktdump.dll.a -Wl,--major-image-version,0,--minor-image-version,0  run/librandpkt_core.a  run/libwiretap.dll.a  -lws2_32  run/libui.a  run/libwsutil.dll.a  D:/a/_temp/msys64/ucrt64/lib/libglib-2.0.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/a/_temp/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: run/libui.a(failure_message.c.obj):failure_messag:(.text+0x129): undefined reference to `__imp_wtap_strerror'
```

After this change:

```
[2177/2600] Linking C executable run/dumpcap
Warning: Unused direct dependencies:
	/usr/lib/libnl-route-3.so.200
	/home/jpv/code/wireshark/devel/build/run/libwiretap.so.0
```
2023-02-06 19:35:43 +00:00
j.novak@netsystem.cz 0c0f731c92 extcap: Fix of handling default values 2023-02-06 18:29:25 +00:00
João Valverde 02238edf92 Do not require using wsgcrypt.h
The reason to use wsgcrypt.h was to wrap it around DIAG_OFF()
macros and that should no longer be necessary.
2023-02-06 15:52:10 +00:00
João Valverde 71cfbd81b3 Remove wspcap.h and use config.h instead
Forcing the use of a dedicated header to replace pcap.h is
unnecessary code and mental overhead in this case. We can
use config.h instead for the same purpose of defining a
macro symbol before including pcap.h.
2023-02-06 15:05:36 +00:00
João Valverde ab0d190450 CMake: Fix libnl unused link dependencies 2023-02-06 15:04:46 +00:00
João Valverde d70e174ca0 Remove wsutil/netlink.h workaround 2023-02-06 15:04:46 +00:00
João Valverde b07ab25a1c CMake: Cleanup unnecessary linking with shared libraries 2023-02-06 15:04:46 +00:00
João Valverde 2855c8ec46 Convert unicode-utils.[ch] to 4-space indentation 2023-02-06 15:03:49 +00:00
João Valverde 7a33d04056 wiretap: Fix pcapng UTF-8 validation
g_utf_8_make_valid() replaces embedded NULs with unicode
replacement characters and this behaviour does not match
the pcapng spec; the first NULL should terminate the string
instead.

Use ws_utf8_make_valid() which provides the correct behaviour.
2023-02-06 15:03:49 +00:00
João Valverde 9feb85ce4d Move get_utf_8_string() to wsutil 2023-02-06 15:03:49 +00:00
David Perry 9b797e97a2 generate-dissector.py: allow creating plugin
Tweak the script used for creating a new skeleton dissector, to allow it
to create the dissector in `plugins/epan/PROTOSHORTNAME` instead of in
`epan/dissectors`. Handles modifying the appropriate CMake file in the
appropriate way, and generates the plugin's `CMakeLists.txt` if needed.
2023-02-06 14:32:55 +00:00
Martin Mathieson c331e17bea Ignore or fix more warnings (check_typed_item_calls) 2023-02-06 09:24:26 +00:00
Jan Romann 0dbf8c8e6c CoAP: Add support for more Content-Formats 2023-02-05 20:41:18 +00:00
Tomasz Moń 071eca97ad
USBLL: Update global data pointer only on first pass
Do not modify global data pointer when redissecting packets. This fixes
transient incorrect packet sequence errors when user navigates packet
list when live capture is in progress.
2023-02-05 19:38:29 +01:00
Gerald Combs 754ec536e5 [Automatic update for 2023-02-05]
Update manuf, services enterprise numbers, translations, and other items.
2023-02-05 16:47:29 +00:00
John Thacker 4bb43d5986 RTP Stream Dialog: Actually sort on packet loss
The packet loss column has been sorting on a private variable
that is never set(?!) and also is unsigned whereas the actual
lost number is signed. Get the calculated packet loss number
and sort by that. (Should this be sorting by the total number or
the percentage, since the column displays both? Total number is
first so let's use that.)

This should probably be some kind of Model/View instead.

Fix #16785.
2023-02-04 22:15:25 -05:00
John Thacker 8cddc32d35 cli: Process IDBs after the final packet record
Process IDBs that are read after the final packet record
returned by wtap_read() in tshark, editcap, and mergecap.

Ping #18449
2023-02-04 13:40:00 +00:00
John Thacker 3aa44ba6aa merge: Check if each encapsulation type is supported
Just because a file type supports per packet encapsulation does
not mean it can write every encapsulation type.

When determining what file-level encapsulation to write the merged
file, check each file's encapsulation to see if it is writable by
the output file type.  If any are not, report _UNKNOWN so that the
merge will fail early with an appropriate error message, instead of
always reporting WTAP_ENCAP_PER_PACKET.

This prevents confusing errors when trying to merge, e.g., a JSON
file and a normal packet file into a pcapng.
2023-02-04 08:04:16 -05:00
David Perry 3ade136df7 HTTP dissector memory management tweaks 2023-02-04 12:28:11 +00:00
Dr. Lars Völker b4c784805c ISO15765/ISO10681 memory corruption bugfix
Fixes a situation in which the code wrote behind the frag_id_high array
and corrupted memory.

Closes #18839
2023-02-04 10:25:58 +00:00
ismaelrti b0a615075c RTPS Removed the limit to the datatype number of elements
The DataType must be parsed completely due to nested types. Putting a
limit on it might create issues when dissecting the user data samples.
2023-02-04 09:47:03 +00:00
Gerald Combs a3232592b0 GitLab CI: Run our macOS tests in parallel. 2023-02-03 23:55:57 +00:00
ismaelrti 0c08995012 RTPS: Add support to new instance state request/response
Dissected new requests/response structure about instance state petitions.
2023-02-03 20:48:03 +00:00
Guy Harris c788b6b079 tshark: clean up indentation. 2023-02-03 11:36:30 -08:00
Gerald Combs c237cfb76b GitLab CI: macOS MR builds are wireshark/wireshark only for now
Access to macOS SaaS builders are limited to beta program participants.
2023-02-03 19:24:41 +00:00
Gerald Combs 577fe5781b Tools: Update macos-setup-brew.sh
Intitialize some environment variables using `brew shellenv`.

Speexdsp is required. Make some variable names match their respective
command line flags.
2023-02-03 10:45:01 -08:00
Chuck Craft 373c8f616d github: call reworked macos-setup-brew.sh with options 2023-02-03 10:47:12 -06:00
John Thacker d2067aea8d RTP: Add a "Multiplexed as in RFC 7983" default preference setting
RTP is commonly multiplexed on the same UDP 5-tuple with STUN, DTLS, and
other protocols including ZRTP.  RFC 7983 gives current best practices for
dealing with the multiplexing that doesn't involve assuming that version
0 packets are always the same protocol. Implement that for the "what to do
if RTP packets have the wrong version number" preference and set it as the
default.

Only use this setting when RTP is being dissected non-heuristically
(leave heuristic dissections to the other protocol's heuristic
dissector.)

This avoids a problem of the STUN heuristic dissector setting itself
to be the new dissector for an RTP conversation (cf issue #18148).
This also allows dissection of TURN ChannelData multiplexed on the
same 5-tuple as RTP set up by, e.g., SDP.

Fix #18832
2023-02-03 12:33:46 +00:00
Guy Harris 56651c4db1 tshark: fix previous fix for memory leak.
Pass the correct filter variable to warn_about_capture_filter();

Fixes the fix for #18837.
2023-02-03 04:03:15 -08:00
Martin Mathieson 85c134894a ORAN FH CUS: change some item long texts 2023-02-03 10:29:11 +00:00
Guy Harris d69208c5e7 tshark: plug a memory leak.
Put the "attempt to compile a filter string as a capture filter" code
into a common routine, and, if the attempt succeeds, free up the
generated capture filter code.

Fixes #18837.
2023-02-03 08:29:44 +00:00
ismaelrti 43861fd852 RTPS: Added dissection of the RTPS PING string
Dissection of the RTPS PING string field
2023-02-03 07:42:54 +00:00
Gerald Combs 1bcc5d097d GitLab CI: Add a macOS merge request build.
Add an initial "macOS Build" job that uses GitLab's macOS beta.
https://about.gitlab.com/blog/2021/08/23/build-cloud-for-macos-beta/

Add command line options to macos-setup-brew.sh and use it to install
our packages.

Skip running tests for now.
2023-02-02 23:13:29 +00:00
ismaelrti e93f423504 RTPS: Added support for new pre-ahared-secret-based RTPS protection
New submessage HEADER_EXTENSION has been introduced prior to
RTPS_PREFFIX submessage.
2023-02-02 19:33:38 +00:00
Stig Bjørlykke e3719872b5 gsm_sms: Allow empty src and dst in hashing functions
Allow empty pinfo.src and pinfo.dst in hashing functions to fix
reassembly when delivered in a NAS message.

Fixup 1d8680d07f
2023-02-02 15:13:46 +01:00
Martin Mathieson 54e5e2c8a6 Fix some spelling errors 2023-02-02 12:13:21 +00:00
John Thacker 15dfa3aa20 Qt: Fix order of ShowAs enums
The ShowAs enum should stay in the same order as the Items
are added to the ShowAs combobox, because setCurrentIndex()
is used with the enum values, e.g. when setting the value to
"Show As Image" when the bytes are an image.
Fixup c9e08b7be3
2023-02-01 21:18:58 -05:00
Pascal Quantin c0c939c4f3 NGAP: fix dissection NAS PDU IE broken in b801ea0191 2023-02-01 15:33:37 +00:00
Pascal Quantin c649b14803 NAS 5GS: fix dissection of 5GSM network feature support IE 2023-02-01 16:15:58 +01:00
Martin Mathieson 199d8e86d0 Make some symbols static. 2023-02-01 11:00:24 +00:00
Gerald Combs 9d9d72f47b Qt: Fix Logray compilation with Qt 6.4
Copy+paste afa2579124 to fix

wireshark/ui/logray/logray_main_window_slots.cpp:1564:40: error: attempt to use a deleted function
            stats_tree_action->setData(cfg->abbr);
                                       ^
Qt/6.4.2/macos/lib/QtCore.framework/Headers/qvariant.h:199:5: note: 'QVariant<char *, false>' has been explicitly marked deleted here
    QVariant(T) = delete;
    ^
2023-01-31 14:03:04 -08:00
Martin Mathieson ed8ee831fd More fussing with items and calls. 2023-01-31 17:32:05 +00:00
ismaelrti 858f759fa2 RTPS: Improving the way the Domain ID is dissected
Taking the domain id from discovery traffic if available or showing
amessage that the value might not be accurate if not.
2023-01-31 16:14:01 +00:00
ismaelrti 1c9b202f5f RTPS: Fix incorrect DomainId when port is not default.
Trying to deduce the DomainIf from the port is not correct when the port
is not default. Using discovery data instead if available.
2023-01-31 16:14:01 +00:00
Cody Planteen 9e7c15fcb5 VRT: add decoding of more CIF1 fields to VITA 49 dissector 2023-01-31 12:50:36 +00:00
João Valverde b376b340af MSYS2: Update README 2023-01-31 12:28:12 +00:00
John Thacker 25544e4d4f TLS: Add to HTTP upgrade subdissector table
RFC 2817. Ping #18825
2023-01-31 01:52:09 +00:00
Gerald Combs 894e8c46c6 Revert "Enable rpathification and working relocation on Linux"
This reverts commit 7a346c398a.
2023-01-30 22:30:56 +00:00
Gerald Combs abb0e7e9e5 CMake: Lower-case a filename
GPL_appendix.adoc should be gpl_appendix.adoc as of 171dbd6ea8.
2023-01-30 14:05:42 -08:00