Commit Graph

86423 Commits

Author SHA1 Message Date
Jiří Engelthaler a5319966bc Fix typo 2023-01-15 20:55:53 +01:00
John Thacker acf0ee420f Proto hierarchy stats: obtain capture file read lock
Obtain the capture file read lock when computing protocol hierarchy
stats to prevent segfaulting if the file is closed.

The protocol hierarchy stats are always computed on all the packets
of the current file that pass the current filter, so don't let it run
until a read or rescan is complete.

Since the protocol hierarchy stats use the common progress bar,
these two changes keep it from hijacking the progress bar when a
rescan is in progress, which led to anomolies with the stop button
behavior and clearing the progress bar when the stats were done
(but not the temporarily paused rescan.)

Make the stop button actually stop the protocol hierarchy stats.

In the future, the protocol hierarchy stats could perhaps use
process_specified_records from file.c

Fix #18787. Fix #18788.
2023-01-15 16:09:17 +00:00
João Valverde 89188380ae MSYS2: Add better support for other environments
Add support for and generally recommend using UCRT64.
2023-01-14 23:38:55 +00:00
Gerald Combs 4ee71f77e6 Release notes: Add a link to the foundation site 2023-01-14 11:00:39 -08:00
John Thacker 0c3c3e9342 Qt: ElidedLabel escapes HTML
ElidedLabel escapes HTML after !9261, so use its own methods to make text
small and italicized instead of passing in rich text.

IOGraphDialog used to make an error message, if it existed, bold.
Perhaps ElidedLabel should have a way to have prepended bold
text for such usage.
2023-01-14 13:20:00 -05:00
John Thacker a25bcce10a Qt: Only autoset display filter when dialog is opened
Autoset "Limit to display filter" if a display filter is
present when the dialog is open, but do not re-enable it each
time the widget is updated, if the user has unchecked it.

[skip ci]

Fix #18461
2023-01-14 13:17:02 -05:00
John Thacker 4484736366 Qt: Set small text for ExpertInfoDialog filter
ElidedLabel has its own method to set small text and italicize.
After !9261, any HTML that is passed into it appears escaped,
which we don't want.
2023-01-14 12:19:45 -05:00
Stig Bjørlykke c0dd9620c5 lwm2mtlv: Fix resource id lookup
The LwM2M object instance and resource id may be given in both the
CoAP Uri-Path and the LwM2M TLV header, and in this case the created
uri_path is wrong and resource id lookup will fail.

Change the logic to get object id from CoAP Uri-Path and resource id
from either Uri-Path or LwM2M TLV header.
2023-01-14 15:39:54 +00:00
João Valverde a23bab971e MinGW: Disable -Wcast-function-type warnings 2023-01-14 14:52:53 +00:00
João Valverde 6bfeecb562 MinGW: Fix warnings wiht ws_strptime() 2023-01-14 14:52:53 +00:00
João Valverde 184a567621 CMake+Windows: Try to prevent symbol redefinitions again 2023-01-14 14:52:53 +00:00
João Valverde cdff6da68e MinGW: Cast away a -Wincompatible-pointer-types warning
extcap/androiddump.c:1712:36: warning: passing argument 2 of 'ws_inet_pton4' from incompatible pointer type [-Wincompatible-pointer-types]
 1712 |         ws_inet_pton4(bt_local_ip, &(server.sin_addr.s_addr));
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                    |
      |                                    u_long * {aka long unsigned int *}
2023-01-14 14:52:53 +00:00
João Valverde 389e70722c MSYS2: Disable -Werror by default 2023-01-14 14:52:53 +00:00
Gerald Combs dd07fb5a15 CMake: Update a compiler version check
It looks like AppleClang 10 and 11 generate bogus missing braces
warnings as well. The macOS Intel builder, which has AppleClang
11.0.0.11000033 installed, is failing with

wireshark/epan/dissectors/packet-rtps.c:11403:63: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
  coherent_set_entity_info coherent_set_entity_info_object = {0};
                                                              ^
                                                              {}
2023-01-14 02:28:38 +00:00
Gerald Combs ad3205000b Qt: Add a donation link to the welcome page 2023-01-14 02:09:55 +00:00
John Thacker a59a663618 Qt: Sort strings, like GeoIP country or city, in Endpoints
QVariant canConvert<double>() does not test that a particular QVariant
value can be converted to a double, but only that at least some values
of that type can convert. (Just checking the type is much faster than
actually trying the conversion; this is why convert() has a boolean
output parameter as well.) It thus always returns TRUE for strings even
for strings that fail to convert, and is not by itself a useful test
when trying to sort unknown types.

Luckily, we don't need to test this anyway. Set the default data role used
for sorting to UNFORMATTED_DISPLAYDATA, so the parent QSortFilterProxyModel
will handle QVariants that are numbers appropriately. In particular,
this makes the GeoIP city and country column strings in the Endpoints
table sort correctly.

Fix #18749
2023-01-13 19:13:02 -05:00
John Thacker 4307d13195 Qt: Fix selection of filter column in Conversation table
When converting from our columns as displayed to the canonical
list of columns, add 1 for the missing conversation ID if it
is not present (as opposed to if it is present.) Also change the
test for the total packets to account for the new conversation ID
column.

Related to #18738
2023-01-13 18:07:07 -05:00
João Valverde d09460283b MinGW: Fix -Wattributes 2023-01-13 22:41:04 +00:00
João Valverde edd4295166 MinGW: Fix -Wunknown-pragma 2023-01-13 22:41:04 +00:00
João Valverde f3152af8a0 MinGW: Fix -Wsign-compare 2023-01-13 22:41:04 +00:00
João Valverde 6870449734 MinGW: Fix -Wbool-compare
The return of -1 for negative infinity is glibc specific and
non-portable.

/epan/dissectors/packet-synphasor.c:1634:62: error: comparison of constant '-1' with boolean expression is always false [-Werror=bool-compare]
 1634 |                 if ((isinf(pmu_lat) == 1) || (isinf(pmu_lat) == -1)) {
      |                                                              ^~
2023-01-13 22:41:04 +00:00
João Valverde dfc992466e MinGW: Fix -Wstrict-aliasing
capture-pcap-util.c:561:23: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
  561 |                     *((guint32 *)&(ai->sin_addr.s_addr));
      |                      ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-01-13 22:41:04 +00:00
João Valverde b487b7fcfe MinGW: Fix -Wparentheses 2023-01-13 22:41:04 +00:00
João Valverde 846056cf46 MinGW: Fix -Wunused-function 2023-01-13 22:41:04 +00:00
João Valverde 215a2d7477 MinGW: Fix -Wformat-zero-length 2023-01-13 22:41:04 +00:00
João Valverde b94e7f953f MinGW: Fix -Wreturn-type
main.cpp:1087:1: error: no return statement in function returning non-void [-Werror=return-type]
 1087 | }
      | ^
2023-01-13 22:41:04 +00:00
João Valverde 6801490aea Qt: Fix AA_EnableHighDpiScaling Qt6 deprecation 2023-01-13 22:41:04 +00:00
João Valverde 78dffe34d5 MinGW: Fix -Wold-style-declaration 2023-01-13 22:41:04 +00:00
João Valverde 10d197c64d MinGW: Fix -Wstrict-prototypes 2023-01-13 22:41:04 +00:00
João Valverde c8fe23575f MSYS2: Fix build with -Werror 2023-01-13 22:41:04 +00:00
Gerald Combs dd601b1d8e Resources: Use more reliable AppStream screenshot URLs
Link to User's Guide screenshots, which should be more reliable.
Fixes #18801
2023-01-13 22:30:29 +00:00
Gerald Combs 9754448044 CoAP+RTPS: Initialize some variables
Fix

    ==10365== Conditional jump or move depends on uninitialised value(s)
    ==10365==    at 0x81514B4: get_hfi_length (epan/proto.c:5981)
    ==10365==    by 0x815A0A5: proto_tree_add_pi (epan/proto.c:5953)
    ==10365==    by 0x815F41B: proto_tree_add_uint64 (epan/proto.c:5542)
    ==10365==    by 0x6BF362C: dissect_msg_tag (epan/dissectors/packet-cose.c:462)
    ==10365==    by 0x6BF1A27: dissect_cose_mac (epan/dissectors/packet-cose.c:656)
    ==10365==    by 0x813511A: call_dissector_through_handle (epan/packet.c:757)
    ==10365==    by 0x8130E58: call_dissector_work (epan/packet.c:850)
    ==10365==    by 0x8131604: dissector_try_string_new (epan/packet.c:1751)
    ==10365==    by 0x8131686: dissector_try_string (epan/packet.c:1776)
    ==10365==    by 0x6BD8C60: dissect_coap_payload (epan/dissectors/packet-coap.c:1115)
    ==10365==    by 0x6BDAD34: dissect_coap_message (epan/dissectors/packet-coap.c:1403)
    ==10365==    by 0x6BD8ECB: dissect_coap (epan/dissectors/packet-coap.c:1526)
    ==10365==
    ==10365== Conditional jump or move depends on uninitialised value(s)
    ==10365==    at 0x81517EC: get_hfi_length (epan/proto.c:6115)
    ==10365==    by 0x815A0A5: proto_tree_add_pi (epan/proto.c:5953)
    ==10365==    by 0x815F41B: proto_tree_add_uint64 (epan/proto.c:5542)
    ==10365==    by 0x6BF362C: dissect_msg_tag (epan/dissectors/packet-cose.c:462)
    ==10365==    by 0x6BF1A27: dissect_cose_mac (epan/dissectors/packet-cose.c:656)
    ==10365==    by 0x813511A: call_dissector_through_handle (epan/packet.c:757)
    ==10365==    by 0x8130E58: call_dissector_work (epan/packet.c:850)
    ==10365==    by 0x8131604: dissector_try_string_new (epan/packet.c:1751)
    ==10365==    by 0x8131686: dissector_try_string (epan/packet.c:1776)
    ==10365==    by 0x6BD8C60: dissect_coap_payload (epan/dissectors/packet-coap.c:1115)
    ==10365==    by 0x6BDAD34: dissect_coap_message (epan/dissectors/packet-coap.c:1403)
    ==10365==    by 0x6BD8ECB: dissect_coap (epan/dissectors/packet-coap.c:1526)

and

    ==10365== Conditional jump or move depends on uninitialised value(s)
    ==10365==    at 0x748EB90: hash_by_guid (epan/dissectors/packet-rtps.c:6006)
    ==10365==    by 0xC522FD5: wmem_map_lookup (wsutil/wmem/wmem_map.c:264)
    ==10365==    by 0x74A2E33: rtps_util_detect_coherent_set_end_empty_data_case (epan/dissectors/packet-rtps.c:3294)
    ==10365==    by 0x74A1054: dissect_RTPS_DATA (epan/dissectors/packet-rtps.c:10829)
    ==10365==    by 0x748E606: dissect_rtps_submessage_v2 (epan/dissectors/packet-rtps.c:12064)
    ==10365==    by 0x748DFBE: dissect_rtps_submessages (epan/dissectors/packet-rtps.c:12439)
    ==10365==    by 0x74A3FC9: dissect_rtps (epan/dissectors/packet-rtps.c:12357)
    ==10365==    by 0x748EDD2: dissect_rtps_udp (epan/dissectors/packet-rtps.c:12459)
    ==10365==    by 0x81334CA: dissector_try_heuristic (epan/packet.c:2864)
    ==10365==    by 0x76A8FF6: decode_udp_ports (epan/dissectors/packet-udp.c:712)
    ==10365==    by 0x76AB875: dissect (epan/dissectors/packet-udp.c:1267)
    ==10365==    by 0x76A9DAD: dissect_udp (epan/dissectors/packet-udp.c:1273)

Fixes #18785
2023-01-13 13:21:24 -08:00
Josh Schmelzle e70856a045 Fix email for Josh Schmelzle in AUTHORS file 2023-01-13 19:28:43 +00:00
João Valverde 5b54223ce5 version info: Fix extra space after "(" 2023-01-13 16:09:17 +00:00
João Valverde d902cabd3f MinGW: Fix -Wformat 2023-01-13 15:48:03 +00:00
João Valverde 8cd74b7cd4 MinGW: Fix -Wunused-function 2023-01-13 15:48:03 +00:00
Dr. Lars Völker 566292435f DoIP/UDS: Allow mixing with OBD-II
This patch allows users to dissect UDS and OBD-II messages on the same
ISO15765 or DoIP connection without changing manually changing the
config.
2023-01-13 13:04:09 +00:00
Martin Mathieson 9baefc3d5d eCPRI/ORAN: Various changes while looking at captures 2023-01-13 12:49:03 +00:00
Dr. Lars Völker ea0f20e993 OBD-II: Fixing Service/Mode 0x04 dissection
The current code assumes that the Service 0x04 has at least 1 parameter
byte in the request and 1 parameter byte in the response, which is
wrong.
2023-01-13 09:40:30 +00:00
John Thacker bf8f30eba4 Qt: Fix test for appending rows to UAT tables
We want to return with failure when the number of entries in
the row we're trying to append is greater than the number of
columns, not less than the number of rows in the table.

The IO Graph is the only place that uses appendEntry, and this
allows adding IO Graphs past the tenth graph.

Fix #18762
2023-01-13 09:02:47 +00:00
Louis Scalbert 764890d159 BGP: fix BGP-LS IPv6 Neighbor Address TLV s length 2023-01-13 09:02:02 +00:00
Gerald Combs 34ce99f32e AppImage: Switch to linuxdeploy
Linuxdeployqt resists running on newer versions of Linux to the extent
that you can't even use "-h" or "--help":

https://github.com/probonopd/linuxdeployqt/issues/340

Switch to linuxdeploy (https://github.com/linuxdeploy/linuxdeploy).
2023-01-13 08:59:30 +00:00
Joris Peeraer 6281ad450b PFCP: refactor dissecting of enterprise IEs
The code for dissecting enterprise IEs has been reworked.

Previously, each enterprise was registered by its enterprise-ie in a
dissector-table. The per-enterprise dissector would index into an array
of IEs in order to find the correct IE-dissector.

Using this method has following drawbacks:
- IEs had to be defined in two arrays (value_string and dissector),
  possibly causing these two arrays becoming out-of-sync,
- the array only can be indexed if all IE-types are contiguous or gaps
  are maintained, which would be wasteful in case of bigger gaps
- individual IEs cannot easily be added outside of the source of this
  file

This commit implements a new approach that addresses above drawbacks by:
- defining all IE information together in one array,
- using per-vendor dissector_tables containing per-IE dissector handles,
  allowing both for arbitrary ie-types and adding individual
  enterprise-IEs separately from external code

This method does a two-level lookup for the IES:
- first looking up a vendor-dissector in the pfcp.enterprise_ies table
- if using the generic-ie-dissector a lookup in the per-vendor table to
  find the IE-dissector

A vendor-dissector receives the whole IE including header and has to do
all the work. An IE-dissector receives only the data-part and
a tree + header-fields have already been created.

The code for registering the per-IE tree-types has been modified as
well, because these tree-types are now stored together with the
IE-definitions. (Getting rid of the hardcoded indexes is also a plus.)

The 3GPP example enterprise dissector has been removed, as there are two
other enterprises which can serve as example.
2023-01-13 08:57:58 +00:00
Joris Peeraer b782c599ae Provide create_dissector_handle_with_data
Provide function create_dissector_handle_with_data that creates an
anonymous handle that uses a dissector with callback argument.
2023-01-13 08:57:58 +00:00
Alexis La Goutte f908bfa821 ciscodump(.c): Fix Null pointer passed to 1st parameter expecting 'nonnull' 2023-01-13 08:06:02 +00:00
Alexis La Goutte 5766002231 proto(.c): Fix Argument with 'nonnull' attribute passed null 2023-01-13 08:06:02 +00:00
Ivan Stanoev cc9f5aed2b PFCP: Fix QFI bitmask
QFI field is 6-bit long but in PFCP dissector bitmask was set to 0x7f.
It needs to be 0x3f
2023-01-13 08:05:07 +00:00
João Valverde aff45e6318 MSYS2: Update GitHub action 2023-01-12 21:04:37 +00:00
Gerald Combs a07265f3c4 GitHub: Add FUNDING.yml 2023-01-12 20:42:13 +00:00
Tomasz Moń 500b514b59
USBLL: Dissect USB 2.0 LPM Extended Transaction
Implement USB 2.0 Extension Transaction specified in USB Engineering
Change Notice: USB 2.0 Link Power Management Addendum.

Display Best Effort Service Latency (BESL) instead of Host Initiated
Resume Duration (HIRD) when dissecting LPM Token to align with USB 2.0
ECN Errata for Link Power Management.
2023-01-12 21:03:02 +01:00