Commit Graph

84827 Commits

Author SHA1 Message Date
Tomasz Moń 2d1380ae5b
capture: Move capture pipe polling out of UI
Both CLI and Qt interfaces spin GLib mainloop. Move the capture pipe
polling into common code to reduce code duplication.
2022-07-30 16:42:12 +02:00
John Thacker 5aba5772e9 gboolean bitfields considered harmful
ISO C Std § 6.7.2, 5: "for bit-fields, it is implementation-defined
whether the specifier int designates the same type as signed int or the
same type as unsigned int." (See also the note in § 6.7.2.1 and ISO C
Std Appendix J.3.9.)

A gboolean is a typedef'd gint. Therefore, many implementations,
including gcc and clang, treat a gboolean bitfield of width 1 as
signed, meaning that it has two possible values: 0 and -1, any time
the integer promotions occur (which is all the time.) Constructs like this:

        dgram_info->from_server = TRUE;
        if (dgram_info->from_server == TRUE) ws_warning("True");

will not work as expected, though gcc (but not clang) will give an
error:

/home/johnthacker/wireshark/epan/dissectors/packet-quic.c:3457:37: error: comparison is always false due to limited range of data type [-Werror=type-limits]
 3457 |         if (dgram_info->from_server == TRUE)
      |

        proto_tree_add_debug_text(quic_tree, "Connection: %d %p from_server:%d", pinfo->num, dgram_info->conn, dgram_info->from_server);

Connection: 1 0x7fc4b47f2be0 from_server:0
Connection: 2 0x7fc4b47f2be0 from_server:-1
Connection: 3 0x7fc4b47f2be0 from_server:0
Connection: 4 0x7fc4b47f2be0 from_server:-1

At worst this can cause buffer overruns.

If a bitfield is desired, to guarantee expected behavior the standard
_Bool/bool should be used instead.
2022-07-30 08:49:08 -04:00
LiangYuxuan 735ae00417 Add China IPSec Algorithms and IKE Attributes 2022-07-30 10:34:22 +00:00
Ferry Huberts 059c3b7924 Locamation Interface Module dissector: add support for IM2R0 2022-07-30 10:33:43 +00:00
John Thacker a2c5ae9a8b prefs: Fix deprecated_port_pref migration
prefs_find_module() looks up a module by module name, which is
the same as the protocol filter name, case-insensitively.
dissector_table_get_dissector_handle() looks up a dissector handle
in the table by the protocol short name (which is the module _title_)
deprecated_port_pref() used the same string for both lookups.

For some protocols this worked, because the short name is the same
as the filter name only with different capitalization. For others,
it either wouldn't find the module to add to the migrated preference,
or wouldn't find the dissector handle in order to set Decode As
properly.

Fix this, by using the module title for the second lookup, and
changing all the module_name values to be correct. For good
measure, change all the module names that happened to work because
they're differently-cased versions of the filter name in order
to avoid confusion when new entries are added.
2022-07-29 21:16:56 -04:00
Gerald Combs 0a8ab48849 Revert "Win-setup: Update bcg729 to 1.1.1."
Switch back to bcg729 1.0.4. Version 1.1.0 and later are GPLv3.

https://gitlab.linphone.org/BC/public/bcg729/-/issues/3

This reverts commit 0ccfdfbf5c.
2022-07-29 12:38:18 -07:00
Gerald Combs 6857e1ed04 Docs: Fix our man page dependencies.
Dependencies need to be set via add_custom_command.
2022-07-29 18:52:07 +00:00
Gerald Combs 8015762319 Docs: Remove the "Last updated" footer from our HTML man pages.
The "Last updated" footer time is the last modified time of the source
file. We could make it reproducible using something like
git-restore-mtime, but it's easier (and IMHO less ugly) to just remove
the footer.
2022-07-29 10:42:48 -07:00
Gerald Combs f65fd437dd Fix our version.
Update our version to 3.7.3.

[skip ci]
2022-07-29 10:20:59 -07:00
Roland Knall 59e7c16425 Revert "Qt: remove unnecessary method from FunnelStatistics"
This reverts commit ddcb429979
2022-07-29 13:13:36 +00:00
Alexis La Goutte 9781ae3fc1 FSSO: add support of packet with extra IPv4 a the end of packet 2022-07-29 12:16:54 +00:00
Alexis La Goutte 206e600687 FSSO: fix indent 2022-07-29 12:16:54 +00:00
Simon Cornish 72b4b21623 SCCP: Fix handling of XUDT segmentation parameter
Q.713 s1.5 states optional parameters may be received in any
order. Q.714 s1.1.42 states unrecognized parameters within a
message are ignored.

This patch fixes Wireshark's compliance with the specs and allows
the segmentation parameter to occur anywhere with the options
2022-07-29 01:39:40 +00:00
John Thacker 9c5f1255af packet_info: Fix a comment
The proto_layers map maps to values of curr_proto_layer_num,
not curr_layer_num.
2022-07-28 20:47:21 -04:00
John Thacker 5e715340bf sccp: Allow processing externally reassembled data
SCCP places a limit of 255 bytes on DATA parameters, and
segments data beyond that. Some tracing tools will externally
reassemble data, writing a single message with an indicated
length of 255 octets but with a longer payload. Allow the pref
setting introduced in 086feb2f09
to work for all message containing DATA, such as XUDT messages.
(Note that some tools leave the optional SEGMENTED parameter
in when externally reassembling, and some do not.) Add an
expert info to hint to the user when the setting might be
worth changing. (Perhaps it should be default to TRUE?)

Fix #10515
2022-07-28 19:21:27 -04:00
Moshe Kaplan fa3735378f make-version.py: Add missing parentheses on function call
`match.groups()` is a function, not an attribute. Add () as needed to access match group items.
2022-07-28 15:08:58 -07:00
Gerald Combs 05eee7f71c Version: 3.7.2 → 3.7.3rc0.
[skip ci]
2022-07-28 14:15:16 -07:00
Gerald Combs 0304e827d1 Build: 3.7.2.
[skip ci]
2022-07-28 12:05:42 -07:00
Gerald Combs 2a6d74f280 Docbook: Update the release notes. 2022-07-28 18:27:12 +00:00
Tomasz Moń df7f3e76b5 tshark: Run GLib mainloop during capture
Use the timer polling approach on Windows. GLib timer callbacks execute
in main thread. Remove useless mutex as there is no point in protecting
resources if only can thread can access the resources. Simply wait on
capture child handle instead of periodically checking process state.

On Unix systems, register the pipe fd for polling inside GLib mainloop.
2022-07-28 17:42:11 +00:00
João Valverde 0816e317cb dfilter: Fix crash with FT_NONE and arithmetic expressions
Do the first ftype-can check in an arithmetic expressions before
evaluating the second term to be sure we do not allow FT_NONE as a
valid LHS ftype.

$ dftest '_ws.ftypes.none + 1 == 2'
Filter: _ws.ftypes.none + 1 == 2
dftest: FT_NONE cannot +.
	_ws.ftypes.none + 1 == 2
	^~~~~~~~~~~~~~~
2022-07-28 16:50:09 +00:00
John Thacker 32326b3a07 packaging: EPEL 8 has asciidoctor now
rubygems-asciidoctor was released 2022-05-18 for EPEL 8
( https://bugzilla.redhat.com/show_bug.cgi?id=1820896 )
so we don't need to special case it for RHEL/Centos 8.
2022-07-28 16:17:52 +00:00
João Valverde 65e13f9d8f gitignore: Add Qt creator autosave 2022-07-28 14:29:12 +00:00
Dr. Lars Völker 3f6e577dc1 TECMP: Adding CounterEvent and TimeSyncEvent
This patch adds support for the Counter Event and the TimeSync Event.
2022-07-28 06:02:18 +00:00
John Thacker 39aa6b06da gsm_a_common: Use common E212 MCC MNC function
Use the common functions to dissect the MCC and MNC from
packet-e212.c Remove some now no longer used static functions,
arrays, and fields.
2022-07-28 05:39:21 +00:00
Gerald Combs 0ccfdfbf5c Win-setup: Update bcg729 to 1.1.1.
Ping #16265.
2022-07-28 02:27:48 +00:00
Huang Qiangxiong a618fe72a2 GRPC: Fix the bug of GRPC-WEB decompression failure over HTTP1.1
1. Passing header name/value map to sub-dissector in packet-http.c.
   Headers can also be used by dissectors other than grpc in the future.

2. Try to get the grpc-encoding header value in packet-grpc.c.
   This header contains decompression algorithm.
2022-07-28 01:10:44 +00:00
John Thacker 1c89a14117 gsm_a_common: Fix cut and paste error
The field description and filter for type of ciphering algorithm
was copied from the previous field.
2022-07-27 19:16:24 -04:00
João Valverde ab77d11599 Windows: Add missing license file to installer 2022-07-27 22:27:50 +00:00
Gerald Combs 6455fe3efd Win-setup: Update c-ares, nghttp2, and pcre2.
Update c-ares to 1.18.1, nghttp2 to 1.46.0, and pcre2 to 10.40.
Ping #16265.
2022-07-27 14:08:31 -07:00
John Thacker 1b62c53f56 packaging: Add Qt5Concurrent to SUSE BuildRequires
Qt5Concurrent is needed since 0438fca96b
Add it to the spec file requirements, since it's a separate package
on openSUSE.
2022-07-27 16:59:44 +00:00
João Valverde 35f3fe1b1d Qt: Enable About->License external hyperlinks
Replace QTexteEdit with QTextBrowser and enable external
hyperlinks.
2022-07-27 16:30:48 +00:00
João Valverde 3fac6f9772 Add acknowledgement for Lua itself.
We are not bundling the Lua source code but the library
is an important part of Wireshark and just as deserving
(if not more) of a mention as other Lua dependencies that
are already featured as acknowledgements.
2022-07-27 17:05:47 +01:00
João Valverde e7f439bc2f Convert capture file regex search to PCRE2.
Replace the use of the obsolete GRegex with PCRE2.

Fixes a crash reported in issue #17500.
2022-07-27 11:21:03 +00:00
Kaige Ye 2cc887e80d MySQL: Add dissector for binlog event HEARTBEAT_LOG_EVENT_V2 2022-07-27 06:33:34 +00:00
John Thacker ae1c630025 QUIC: Use the stored datagram info for follow filter
Using the addresses and ports to retrieve the QUIC connection
has issues with connection migration. We deal with that in
the QUIC dissector and store that information in proto data.

Use that proto data for generating the follow filter from a
selected packet. This makes it more robust to connection migration
and cases where different QUIC connections reuse the same UDP
5-tuple.
2022-07-26 20:12:06 -04:00
Gerald Combs 1ed39fa0b5 Add vcpkg-export-20220726-1.
Add vcpkg-export-20220726-1, which includes

  Dirent 1.23.2
  Gettext 0.21
  GLib2 2.72.3
  Libffi 3.4
  Libiconv 1.17
  Liblzma 5.2.5
  Libxml2 2.9.14
  PCRE 8.45
  Zlib 1.2.12

Ping #16265.
2022-07-26 23:33:29 +00:00
Chuck Craft c4f9831412 gtpv2: adjust field size and bitmask for gtpv2.smenb
Closes #18225
2022-07-26 15:20:06 -05:00
KATAOKA, Toshihiro 7a75c638ac ORAN: Block FP improvement, additional correction
optimized add_tree for hf_oran_iSample, hf_oran_qSample as float.
2022-07-26 15:15:45 +00:00
KATAOKA, Toshihiro 6189eee63f Improvemnet Block FP decompression, common in case both U plane/C plane.
1. Block FP is used in both U plane I.Q. samples and C plane beamforming
   weight decompression.
2. excluded digital power scaling(DPS) out of BFP decompression, i.e. (1<<15)
   bits shift, because DPS is applied only U plane.
3. added digital power scaling to be called from U plane I.Q. samples
   calculation.
4. improved U plane I.Q. samples calculation similar logic used in C
   plane bfw calculation.
5. improved U plane I.Q. samples index start from '0'.

reference: O-RAN WG4.CUS.0 v.09.00.
 8.1.2 and 8.1.3 for clarification, digital power scaling applied only U
   plane.
 annex A.1.2 and A.1.3 for clarification, digital power scaling not
included in Block FP.
 annex D for I.Q. smples index
2022-07-26 15:15:45 +00:00
KATAOKA, Toshihiro c41a27b96d ORAN: eAxC ID flexible bit allocations 2022-07-26 15:13:25 +00:00
Martin Mathieson 9c2cbc842a PDCP_NR: Show direction in more sequence analysis expert output 2022-07-26 11:56:02 +00:00
Stig Bjørlykke bfe8187608 test: Add dfilter 'double' tests
Add test cases for scientific notation and not equal.
2022-07-26 10:32:16 +00:00
Stig Bjørlykke f7a5efe87b doc: Update README.display_filter
Update fvalue_t definition in README.display_filter.
2022-07-26 12:08:57 +02:00
Gerald Combs 3307397da1 CMake: Set the correct variables for ccache.
As the RULE_LAUNCH_COMPILE documentation says,

"Note: This property is intended for internal use by ctest(1). Projects
and developers should use the <LANG>_COMPILER_LAUNCHER target properties
or the associated CMAKE_<LANG>_COMPILER_LAUNCHER variables instead."
2022-07-25 14:10:39 -07:00
John Thacker b093b6a992 epan: Make find_or_create_conversation create what it finds and vice versa
The endpoint elements pinfo->conv_endpoint and pinfo->conv_elements
cause find_or_create_conversation (via find_conversation_pinfo) to
look for conversations based on those endpoints. It should also
make it create conversations based on those endpoints, so that
subsequent calls find the same conversation it just created instead
of repeatedly creating new ones.
2022-07-25 20:35:56 +00:00
Gerald Combs babb059f21 GitLab CI: Disable tests in the Debian package job. 2022-07-25 11:12:15 -07:00
Roland Knall cb8fc2874c macos: Remove no longer needed function
Fixes #18221
2022-07-25 17:00:55 +00:00
Joakim Karlsson 4be3ae9738 CMake: improve finding C-Ares library 2022-07-25 16:02:50 +00:00
John Thacker cb3fd3b5cd quic: Handle out-of-order CRYPTO frames, aka "Chaos Protection"
Implement out of order buffering and desegmentation for QUIC
CRYPTO frames. Particularly useful for Chrome's "Chaos Protection"
that intentionally introduces them, but handles out of order
CRYPTO frames in different UDP payloads as well. (Buffering
packets at a higher encryption level until the out of order
lower level frames have arrived is a different issue.)

Adds a preference, which defaults to on since if there is
out of order, it's not very useful to turn it off.

Fix #17732. Fix #18215.
2022-07-24 23:27:38 -04:00