Commit Graph

84270 Commits

Author SHA1 Message Date
Gerald Combs 6c612bf251 Tools: Don't validate file_util.c.
It's Windows-only.
2022-05-16 10:13:23 -07:00
Gerald Combs f238dec118 GitLab CI: Switch the Windows packages to Qt 6.2.3.
Qt 6.2.4 has a serious display enumeration bug on Windows (QTBUG-101203).
Switch to 6.2.3.

Fixes #18091.
2022-05-16 09:44:02 -07:00
Roland Knall eca007e617 Qt: Speedup for Resolved Addresses Dlg
This is a small speedup for the ResolvedAddressesDialog. QString::arg
is a copy-by-call method as QString::append just extends the space
occupied by the string, leading to a major speed improvement.

Same goes for configuring the proxymodels first and then assigning the
data model as this will lead not to reorganization everytime
invalideFilter is being called
2022-05-16 15:07:47 +00:00
Roland Knall 28b917a72e extcap: Close pipe on windows properly
Windows implements so called CRT handlers, which will catch any
assertions happening inside so called crt routines and either
displays a debug dialog (Cancel, Retry, Ignore) or outright crashes
the application.

See
https://docs.microsoft.com/en-us/cpp/c-runtime-library/parameter-validation?view=msvc-170
for an explanation of the behaviour.

Now, in the current situation here, close will detect (correctly)
that the pipe it is supposed to be closing is already closed. This
happens (again correctly) because it had been closed by the extcap
application.

The change added, checks for a closed pipe first, and if so just
returns -1 (as it should) silently without calling the CRT routine,
therefore not crashing
2022-05-16 14:48:37 +02:00
Roland Knall acdda8eb6b Qt: Fix File Path editor in table
The current situation in UatDelegate as well as PathChooserDelegate leads to issues, where Wireshark crashes if the button is clicked. This is due to the UI not correctly positioning the button inside the cell.

This change implements a widget, which will serve as cell content, handling all relations with choosing the file, but also properly handling the size and geometry of said cell content, therefore no longer leading to crashes and cleaning up code at the same time, as duplicate methods are being removed.

Fixes #17789, #17819, #18088
2022-05-16 09:54:08 +00:00
Gerald Combs 52054046c1 Tools: Unzip using CMake in win-setup.ps1.
Use `CMake -E tar xf` to unzip files in win-setup.ps1. This seems to be
the most reliable and reasonably fast common denominator for unzipping
files. Update our comments. Fixes #17756.
2022-05-16 00:08:58 +00:00
Gerald Combs d5f99ef126 [Automatic update for 2022-05-15]
Update manuf, services enterprise numbers, translations, and other items.
2022-05-15 16:59:34 +00:00
Gerald Combs 8020aea27a epan: Fix our conversation flags
Make sure we pass NO_ADDR2 and NO_PORT2 to conversation_new and
NO_ADDR_B and NO_PORT_B to find_conversation.
2022-05-15 16:36:43 +00:00
John Thacker f2fb1662b2 proto: Handle BASE_SPECIAL_VALS in add_bitmask_ title
Respect BASE_SPECIAL_VALS when adding to the title item of an
item added with the proto_tree_add_bitmask* functions.

Note that the documentation for the BMT_NO_INT flag has always
said that "only boolean flags are added to the title" and that
no integer based items are added, but the actual behavior has been
to add integer items with custom format functions and value strings.
2022-05-15 09:59:52 -04:00
John Thacker 1e7a600680 proto: Fix display of BASE_UNIT_STRING for 64 bit fields in bitmask
When integer fields are displayed in the bitmask header item in
proto_tree_add_bitmask_tree and hf->strings is set, only the string
from the value_string is used, not the integer value, to save space.

However, that means that BASE_UNIT_STRING fields have to be treated
differently from all the other fields with hf->strings set. If not,
then only the units are displayed instead of the number with the units.

Fields based on 32 bit integers were already being handled correctly.
Use that same logic for fields based on 64 bit integers.
(See commit 24d991dab4 for something similar.)
2022-05-14 15:14:22 -04:00
John Thacker a98391e316 proto: Fix reversed test for signed ints with unit strings
In proto_item_add_bitmask_tree, on the signed integer path, the
test for if the display uses a unit string is clearly reversed,
calling it only if BASE_UNIT_STRING is unset. Use the correct
test from the unsigned integer path.
2022-05-14 09:26:20 -04:00
John Thacker 8a872d6142 proto: Add support for BASE_SPECIAL_VALS to fields with bitmasks
Add support for BASE_SPECIAL_VALS to fill_label_bitfield[64], for
fields with a nonzero bitmask, using the same logic as
fill_label_number[64].

There's at least one dissector (packet-ipmi-se.c) that was trying
to use this already, but silently had no effect.
2022-05-13 21:02:54 -04:00
John Thacker 1f1ee198f2 merge: Don't write to stdout if tempdir is not set
If merge_files_common() is called with a non NULL value for out_filenamep,
that always indicates tempfile mode, even if the tempdir is not set.
A NULL value for the tempdir is handled by wtap_dump_open_tempfile,
which writes to the OS default temp directory.

Only write to stdout if both out_filename and out_filenamep are NULL.

Fixes a crash introduced by commit 1e0d117eb7
when selecting Merge from the GUI and the new temp_dir option is not set.
2022-05-13 13:41:28 +00:00
João Valverde bebf7afa37 dfilter: Remove unused DFVM 4th instruction argument 2022-05-13 14:13:18 +01:00
João Valverde 3bb918428e dfilter: Remove stale comment 2022-05-13 12:50:33 +00:00
João Valverde ac901e5de8 dfilter: Fix maybe-unitialized warning
[1702/2528] Building C object epan/dfilter/CMakeFiles/dfilter.dir/dfvm.c.o
In function ‘drange_contains_layer’,
    inlined from ‘filter_finfo_fvalues’ at /home/jpv/code/wireshark/wireshark/epan/dfilter/dfvm.c:587:21:
/home/jpv/code/wireshark/wireshark/epan/dfilter/dfvm.c:555:41: warning: ‘upper’ may be used uninitialized [-Wmaybe-uninitialized]
  555 |                 if (num >= lower && num <= upper) {  /* inclusive */
      |                                     ~~~~^~~~~~~~
/home/jpv/code/wireshark/wireshark/epan/dfilter/dfvm.c: In function ‘filter_finfo_fvalues’:
/home/jpv/code/wireshark/wireshark/epan/dfilter/dfvm.c:537:20: note: ‘upper’ was declared here
  537 |         int lower, upper;
      |                    ^~~~~
2022-05-13 13:22:29 +01:00
Gerald Combs a42f8ea7f4 Docs: Add a section on automatic updates to the User's Guide.
Move in the update text from the Windows section and add a description
of our update channels.
Ping #17728.
2022-05-12 11:18:54 -07:00
Gerald Combs 76423db8e0 Qt: Fix clazy-incorrect-emit warnings.
QAbstractItemModel::beginResetModel and endResetModel aren't signals, so
don't emit them. dataChanged is, so do.

Fixes clazy-incorrect-emit:
https://github.com/KDE/clazy/blob/master/docs/checks/README-incorrect-emit.md
2022-05-12 17:29:06 +00:00
Gerald Combs 909280ce82 MySQL: Initialize a variable.
Fix

*** CID 1504408:  Uninitialized variables  (UNINIT)
/builds/wireshark/wireshark/epan/dissectors/packet-mysql.c: 2683 in mysql_dissect_ok_packet()
2677     				}
2678     			}
2679     		}
2680     	} else {
2681     		/* optional: message string */
2682     		if (tvb_reported_length_remaining(tvb, offset) > 0) {
>>>     CID 1504408:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "lenstr".
2683     			if(lenstr > (guint64)tvb_reported_length_remaining(tvb, offset))
2684     				lenstr = tvb_reported_length_remaining(tvb, offset);
2685     			proto_tree_add_item(tree, hf_mysql_message, tvb, offset, (gint)lenstr, ENC_ASCII);
2686     			offset += (int)lenstr;
2687     		}
2688     	}
2022-05-12 17:05:56 +00:00
Chuck Craft 609c0d3881 docs: adoc migration bolding typos; Windows pipe name syntax 2022-05-12 16:43:44 +00:00
John Thacker 2e5a78dc64 text2pcap: Switch default file format to pcapng
For the upcoming 4.0 release, switch the default file format for
text2pcap to pcapng from pcap, to match other tools and the GUI
behavior. Update the documentation and release notes appropriately.

Deprecate the old -n flag; since pcapng is the default this has no
effect. Changing the output capture file format is supported with
the -F option, consistent with the other command line tools.

Related to #18009.
2022-05-12 16:20:40 +00:00
João Valverde b602911b31 dfilter: Add support for universal quantifiers
Adds the keywords "any" and "all" to implement the quantification
to any existing relational operator.

Filter: all tcp.port in {100, 2000..3000}

Syntax tree:
 0 ALL TEST_IN:
   1 FIELD(tcp.port)
   1 SET(#2):
     2 FVALUE(100 <FT_UINT16>)
     2 FVALUE(2000 <FT_UINT16>) .. FVALUE(3000 <FT_UINT16>)

Instructions:
00000 READ_TREE		tcp.port -> reg#0
00001 IF_FALSE_GOTO	5
00002 ALL_EQ		reg#0 === 100 <FT_UINT16>
00003 IF_TRUE_GOTO	5
00004 ALL_IN_RANGE	reg#0 in { 2000 <FT_UINT16> .. 3000 <FT_UINT16> }
00005 RETURN
2022-05-12 14:26:54 +01:00
João Valverde 164f3ce9a2 dfilter: Improve syntax tree display format for sets 2022-05-12 14:06:33 +01:00
Jaap Keuter 8c9480214b Remove execute flag on source files 2022-05-12 13:41:47 +02:00
Jérôme HAMM aa8b2b9f1c ssh: fixing warnings. 2022-05-12 09:43:57 +00:00
Jérôme HAMM 3e81d98499 ssh: fixing MAC IV derivation. 2022-05-12 09:43:57 +00:00
Jérôme HAMM a036c4dd09 ssh: switching consistently from g_debug to ws_debug 2022-05-12 09:43:57 +00:00
Jérôme HAMM 797486fa18 ssh: Diffie-Hellman
diffie-hellman-group1-sha1
diffie-hellman-group14-sha1
diffie-hellman-group14-sha256
diffie-hellman-group16-sha512
diffie-hellman-group18-sha512
2022-05-12 09:43:57 +00:00
Jérôme HAMM 967107fb8e ssh: Diffie-Hellman group exchange. 2022-05-12 09:43:57 +00:00
Jérôme HAMM 51087141c8 ssh: aes-ctr 2022-05-12 09:43:57 +00:00
Jérôme HAMM e1ca35c7a6 ssh: aes-cbc 2022-05-12 09:43:57 +00:00
Jérôme HAMM f3c61d7638 ssh: aes-gcm 2022-05-12 09:43:57 +00:00
Min Wang 4e41383aad MySQL: fix bug for mysql response message length. 2022-05-12 15:55:43 +08:00
Min Wang f265c5869b MySQL: fix bug for mysql response message length. 2022-05-12 15:29:38 +08:00
Min Wang dab59caf38 MySQL: fix bug for mysql response message length. 2022-05-12 14:06:09 +08:00
Gerald Combs 565670c1c8 Version: 3.7.0 → 3.7.1
[skip ci]
2022-05-11 13:12:42 -07:00
Gerald Combs c5b983c93a Packaging: Ignore the return value of git stash.
Make sure we don't trigger '-e'.

[skip ci]
2022-05-11 11:11:53 -07:00
Gerald Combs 0bde1e795a Build: 3.7.0
[skip ci]
2022-05-11 10:24:58 -07:00
easonweii eedf82cd97 SIP: Refactoring too many if-else branches by table-driven method
When there are a lot of if-else branch judgments, the table-driven method can be used to optimize to facilitate subsequent maintenance.
The original function remain unchanged.
2022-05-11 16:42:40 +00:00
Gerald Combs 7b749f5e15 Qt: Fix a version check.
Qt::endl was introduced in 5.14.
2022-05-11 09:21:41 -07:00
Roland Knall ad28888d2f Qt: Fix display filter read/write
Display filters on Windows where broken in such a way that the file was generated with empty lines and the wrong file delimiters.

Likewise, loading the file lead to issues when the formatting was not 100% match by the plattform being used

Fixes #18082
2022-05-11 12:22:29 +00:00
John Thacker c4f6914aa6 DVB-S2: Only add the rolloff value once
DVB-S2X has two possible meanings of the rolloff factor, with
different value strings. Only add the correct one as part of the bitmask,
instead of always adding it twice, once with the low value string and once
with the appropriate value string.
2022-05-10 22:11:06 -04:00
Roland Knall 4977e20ab2 Qt: Prevent remote interfaces to show up
Remote interfaces should not be displayed with local interfaces
as well as in the list of pipe interfaces
2022-05-10 20:00:02 +02:00
Roland Knall ae9e80a34d Qt: Fix proper preselection for remote interfaces 2022-05-10 14:52:27 +00:00
Roland Knall 5b59a38c3b Qt: Clean up remote management interface
Clean up a previous fix, which left the remtoe management interface
unloadable.

Fixes #18060
2022-05-10 16:26:37 +02:00
Piotr Winiarczyk d5a0d390e8 btmesh: More information displayed
In some cases the available information on packets were not displayed.
This change displays this information. Some code formatting and
variable renaming was also done.
2022-05-09 18:44:23 +00:00
Alexander Clouter fdf55aaa51 eap: support tunneled TLS decoding
Using a similar strategy to ce087027ef we
group conversation and pdata use by the layer depth we are decoding.

This now decodes EAP-TLS within TEAP (and should work for TTLS and PEAP)
2022-05-09 18:28:27 +00:00
Gerald Combs b09263f1a3 epan: Normalize conversation code indentation.
Change the indentation of conversation.[ch] to 4 spaces to match
conversation_table.[ch] and conversation_filter.[ch].
2022-05-09 10:50:17 -07:00
Yu Gao 6739d0397b Fix the pfm-sd default case 2022-05-08 18:02:38 -04:00
Alexander Clouter 6b4b9f614b EAP: fix stride when decoding TEAP TLVs and tree alignment 2022-05-08 18:58:07 +00:00