Commit Graph

79283 Commits

Author SHA1 Message Date
Guy Harris 34dbb3bc32 dumpcap: show the interface name in capture errors.
dumpcap can capture on more than one interface at a time.  If the
capture stops due to an error on an interface, report the name of the
interface on which the error occurred.


(cherry picked from commit b3db9e3aa1)
2021-02-08 23:49:56 +00:00
Guy Harris 375f76bdeb "The device has been removed." can happen if it has, indeed, been removed.
So only tell the user to report that as an Npcap bug if they *haven't*
removed the device.


(cherry picked from commit d28021cacb)
2021-02-08 23:05:22 +00:00
Guy Harris ebb55c3c02 dumpcap: look for "PacketReceivePacket error: .* (1617)".
The error message text for ERROR_DEVICE_REMOVED (1617) might be in the
user's language; just look for the numeric error code.


(cherry picked from commit 27cbb68525)
2021-02-08 22:30:46 +00:00
Guy Harris ebba9d3f45 dumpcap: improve some secondary error emssages.
For "PacketReceivePacket error: The device has been removed. (1617)",
report the error in that fashion, indicate that the interface is no
longer attached, *and* suggest that this may be an Npcap bug and that
the user should report it as such; give the URL for the Npcap issue
list.

For "The other host terminated the connection", report the error in that
fashion, and suggest that it might be a problem with the host on which
the capture is being done.

Hopefully this will mean fewer bugs filed as *Wireshark* bugs for those
issues.

(And, with any new capture API in libpcap, these should all turn into
specific PCAP_ERROR_ codes, to make it easier to detect them in callers
of libpcap.)


(cherry picked from commit 152fd1fdab)
2021-02-08 21:34:33 +00:00
Gerald Combs 653071f630 [Automatic update for 2021-02-07]
Update manuf, services enterprise numbers, translations, and other items.
2021-02-07 10:33:33 +00:00
Harald Welte 5b97f29a9a packet-fr: Register for SLL dispatch to Frame Relay dissector
Without this patch, any Linux cooked packet capture on HDLC / frame
relay devices will not be dispatched to the proper dissector.

Such packets do carry a proper sll_hatype set to ARPHRD_FRAD and should
be dispatched accordingly.  However, the packet-fr dissector so far
did not register itself accordingly.


(cherry picked from commit b83f92a458)
2021-02-05 23:05:34 +00:00
Jaap Keuter d742da0e53 SIP: Fix header Id mapping
Fixes #17215


(cherry picked from commit 7401dbaa82)
2021-02-04 20:35:32 +00:00
Gerald Combs e372771997 Docs: Change the default wsbuglink text to "Issue".
Change the default text in the AsciiDoctor wsbuglink macrom from "Bug"
to "Issue".


(cherry picked from commit 9177f0e71a)
2021-02-04 17:10:10 +00:00
João Valverde 003a730a20 Don't include config.h in system headers
Config.h must not be installed so configuration must be performed by client code.

Fixes #17190.


(cherry picked from commit 10178fdb09)
2021-02-03 14:56:33 +00:00
Jaap Keuter 49393cf362 S7COMM: remove array size from function interface
Fixes #17198


(cherry picked from commit 55d53dbf1b)
2021-02-03 08:22:49 +00:00
Dario Lombardo 39da36ad6e
ntp: remove size constraint for invalid refid.
When the refid contains non-ascii chars, the conversion function
returns a string longer than 4 chars. This results in an invalid
string if the output is limited to 4 bytes. Incidentally this
results in an invalid PDML output as well that caught this bug
in the first place.

Fix: #17112.
2021-02-02 11:36:27 +01:00
Gerald Combs 564a52be19 [Automatic update for 2021-01-31]
Update manuf, services enterprise numbers, translations, and other items.
2021-01-31 10:30:58 +00:00
Gerald Combs e0abfddcc5 Version: 3.4.3 → 3.4.4.
[skip ci]
2021-01-29 11:52:30 -08:00
Gerald Combs 6ae6cd335a Build: 3.4.3
[skip ci]
2021-01-29 10:10:04 -08:00
Gerald Combs b442b8d9d1 Prep for 3.4.3. 2021-01-28 18:30:47 -08:00
Gerald Combs 57e14a4190 USB HID: Avoid allocating a huge amount of memory (second try).
10204490d7 / MR 80 ensured that we didn't grow field.usages due to an
underflow, but it neglected to check for a sane array size. Add another
check to make sure we don't wmem_array_grow() too much. Fixes #17165 and
fixes #16809 more completely.


(cherry picked from commit 785e291c1b)
2021-01-28 22:20:52 +00:00
John Thacker 247f8a4b33 USB HID: Usage Minimum and Usage Maximum are inclusive
Usage Minimum and Usage Maximum are an inclusive, closed interval.
This fixes an fencepost error where the Usage Maximum value was
not being included as a possible value in the bitfield. Related
to #17014


(cherry picked from commit 5ca608f519)
2021-01-28 21:55:50 +00:00
Jaap Keuter 935de5c4eb ZVT: clean up some data points
(cherry picked from commit b4f74bac74)
2021-01-28 11:49:03 +00:00
Guy Harris 1b22b8ed51 epan: don't print nanoseconds if seconds isn't representable.
Fix for previous fixes to #17179.


(cherry picked from commit 4715f5021c)
2021-01-28 08:18:16 +00:00
Guy Harris 9bcc1785c1 epan: don't use gmtime_s().
It has the "feature" that, if handed a negative value, it might just
exit.  gmtime() doesn't have that "feature", and is sufficiently
thread-safe for our purposes; use it instead, and check to make sure it
doesn't return a null pointer.

The previous fix for #17179 still used gmtime_s(); this doesn't, so it's
a better fix for #17179.


(cherry picked from commit bf265d7e7a)
2021-01-28 06:58:45 +00:00
Guy Harris e072a71256 epan: don't assume gmtime_s() or gmtime_r() succeed.
At least on Windows, gmtime_s() will *not* succeed if passed a negative
value.

Fixes #17179.


(cherry picked from commit 4e4a7c11c7)
2021-01-28 06:17:57 +00:00
Jaap Keuter 303a7cc58f ZVT: Use standard TCP segment reassemble support function
Fixes #17177


(cherry picked from commit 616d44cbb6)
2021-01-28 00:00:50 +00:00
Gerald Combs e5478357e2 wiretap: Fixup the sdjournal block length in pcapng.
Fix our entry length check and put our trailing '\0' in the right
location. Fixes #17174.


(cherry picked from commit cd278f5fd9)
2021-01-27 07:58:38 +00:00
Grzegorz Niemirowski cbdee60912 Fix TID bitmap name
(cherry picked from commit 6a860c979a)
2021-01-26 07:19:49 +00:00
Gerald Combs 24f56bec53 USB HID: Fix a memory leak.
Replace mismatched g_strdup() + g_free()s with
wmem_strdup_printf(wmem_packet_scope(), ...). Fixes #17124.


(cherry picked from commit 26f0db01a7)
2021-01-26 00:45:32 +00:00
Gerald Combs 2248cba00c [Automatic update for 2021-01-24]
Update manuf, services enterprise numbers, translations, and other items.
2021-01-24 10:30:17 +00:00
Jim Young 1b8d89accd tshark: Fix typo in comment from ascci to ascii
(cherry picked from commit a7ad6c271f)
2021-01-24 06:23:06 +00:00
Enrique Giraldo edaa78ceac tshark: Unconditionally call extcap_register_preferences
extcap_register_preferences is only called with the -G option
(to dump information) and extcap preferences are not loading,
loading it unconditionally avoids this, as it is done in the
GUI startup.


(cherry picked from commit 506f1c650f)
2021-01-24 03:09:03 +00:00
Jason Cohen c8bc83cb9e f5ethtrailer: Some trailers are not detected
This corrects 2 issues with the detection heuristic for f5ethtrailers
causing trailers to be missed.

Fixes #17171
Fixes #17172

(cherry picked from commit b297afee3e)
2021-01-22 08:58:34 -06:00
Jaap Keuter 227ed8cced FC ELS: Fix address length of FCWWN address in logout message
Closes #17168


(cherry picked from commit 13e04a2192)
2021-01-22 11:51:50 +00:00
Pascal Quantin 4ea329548c NAS 5GS: fix display of IPv6 interface identifier
Do not use FT_IPV6 as an interface identifier could be wrongly identified
as an IPv4-Compatible IPv6 Address format by inet_ntop() and displayed
as such.

(cherry picked from commit f64eddfd01)

Conflicts:
	epan/dissectors/packet-nas_5gs.c
2021-01-20 15:49:11 +00:00
Pascal Quantin 632df36405 NAS EPS: fix display of IPv6 interface identifier
Do not use FT_IPV6 as an interface identifier could be wrongly identified
as an IPv4-Compatible IPv6 Address format by inet_ntop() and displayed
as such.


(cherry picked from commit b794e4798a)
2021-01-20 15:28:41 +00:00
Guy Harris 79b075365f Don't dereference a known-to-be-null pointer.
In dump_dfilter_macro_t(), if the dfilter_macro_t pointer is null, just
give up after printing the message that indicates that.

This should squelch several nullPointerRedundantCheck warnings from
cppcheck.


(cherry picked from commit 05b9e53777)
2021-01-20 09:27:38 +00:00
Guy Harris 886465a976 Squelch "Clarify calculation precedence" warning from cppcheck.
For

        A & B ? C : D

put "A & B" in parentheses, to clarify the precedence.


(cherry picked from commit 138041b545)
2021-01-20 07:35:44 +00:00
Guy Harris 3ff5fc344f Squelch "Clarify calculation precedence" warning from cppcheck.
For

	A & B ? C : D

put "A & B" in parentheses, to clarify the precedence.


(cherry picked from commit 6b85987e4a)
2021-01-20 00:11:12 +00:00
Guy Harris 22cc9f3f7f dup() can fail; check whether it does.
If, for example, you run out of file descriptors, dup() can fail, and
ws_dup() is a wrapper around it on UN*X.  Don't just pass the result of
ws_dup() to ws_fdopen(); instead, save its result, check against -1 and,
if it's -1, give up, otherwise pass it to ws_fdopen().

This addresses Coverity CID 1471708.

Also, if ws_fdopen() fails, close the descriptor we got from ws_dup();
this closes a possible FD leak.


(cherry picked from commit 165792fb31)
2021-01-19 07:50:33 +00:00
Gerald Combs f8d662d787 Qt+tools: Fix most of our lupdate warnings.
Fix various warnings with the following changes:

Pass a list of include directories to lupdate. Fixes:

    ui/qt/proto_tree.cpp:57: Qualifying with unknown namespace/class ::ProtoTree

and similar warnings.

Use QT_TRANSLATE_NOOP instead of QT_TR_NOOP. Fixes:

    ui/qt/lte_rlc_statistics_dialog.cpp:993: tr() cannot be called without context
    ui/qt/lte_mac_statistics_dialog.cpp:911: tr() cannot be called without context
    ui/qt/font_color_preferences_frame.cpp:28: tr() cannot be called without context
    ui/qt/font_color_preferences_frame.cpp:29: tr() cannot be called without context
    ui/qt/font_color_preferences_frame.cpp:30: Discarding unconsumed meta data

Add Q_OBJECT to the class definition. Fixes:

    ui/qt/models/filter_list_model.cpp:120: Class 'FilterListModel' lacks Q_OBJECT macro

The following warnings were not fixed. This might require moving IOGraph
to its own file:

    ui/qt/io_graph_dialog.cpp:320: Qualifying with unknown namespace/class ::IOGraphDialog
    ui/qt/io_graph_dialog.cpp:555: Qualifying with unknown namespace/class ::IOGraphDialog
    ui/qt/io_graph_dialog.cpp:1059: Qualifying with unknown namespace/class ::IOGraphDialog
    ui/qt/io_graph_dialog.cpp:1485: Qualifying with unknown namespace/class ::IOGraphDialog


(cherry picked from commit 85a7938925)
2021-01-18 16:57:04 +00:00
Nardi Ivan c297de3b27 QUIC: improve error reporting
When unable to decrypt SH packets we should visualize an error, via
expert info. This way we handle SH and LH errors in the same way.

Close #17077


(cherry picked from commit 9faf6d4e7b)
2021-01-17 11:53:09 +00:00
Gerald Combs 48f42d78b1 [Automatic update for 2021-01-17]
Update manuf, services enterprise numbers, translations, and other items.
2021-01-17 10:29:07 +00:00
Dr. Lars Völker f4d5d56592 AUTOSAR-NM: True-False-String wrong way around for PNI (BUGFIX)
This patch fixes the PNI TFString, which was wrong. Correct is:
0 = "... contains no Partial Network ..."
1 = "... contains Partial Network ..."

Fixes #17154


(cherry picked from commit 238446dc91)
2021-01-14 13:39:46 +00:00
Pascal Quantin 9fd813398f Windows: add a notice to NSIS in case of BSOD while installing Npcap
(cherry picked from commit a07898a280)
2021-01-14 06:06:52 +00:00
Pascal Quantin b7e7e0b37f Windows: upgrade Npcap to 1.10 2021-01-14 00:06:47 +00:00
Pascal Quantin c6c0556b3a Windows: fix USBPcap page link display in NSIS installer
(cherry picked from commit 511aeaa44a)
2021-01-13 22:03:34 +00:00
Dr. Lars Völker 85320d2b80 DoIP: Adding 2019 DoIP Type
Adding ISO13400-2019 DoIP Version 3.


(cherry picked from commit 69710ff117)
2021-01-13 10:45:03 +00:00
Uli Heilmeier 75c00f6d0d SIP: Fix parsing of multiple contact-param
contact-params are optional (s. https://tools.ietf.org/html/rfc3261#section-20.10).
Therefore, independently of contact-params, we should also check for additional contact-param.

Fixes: wireshark/wireshark#13752


(cherry picked from commit 02f2d18b2e)
2021-01-13 09:32:31 +00:00
John Thacker a666035948 Qt: Make the checkSaveAsWithComment dialog box appear.
Set the parent of the QMessageBox in the constructor instead of calling
QMessageBox::setParent(). The latter inherits from QDialog, and it
"clear[s] the window flags specifying the window-system properties for
the widget (in particular it will reset the Qt::Dialog flag)."
(See https://doc.qt.io/qt-5/qdialog.html#details )
This makes the dialog properly appear instead of attempting to save a file
with comments to a file type that does not support comments silently failing.
Fixes #17146.


(cherry picked from commit fb422bed91)
2021-01-12 11:29:27 +00:00
Gerald Combs 0bb6c70189 [Automatic update for 2021-01-10]
Update manuf, services enterprise numbers, translations, and other items.
2021-01-10 10:31:22 +00:00
Eugene Adell 39f15f4d3f Just correct the documentation for this obvious mistake. Closes #17141.
(cherry picked from commit 9b0c3f5eaf)
2021-01-09 19:08:00 +00:00
Dr. Lars Völker d412877409 TECMP: Fixing wrong size of HW version in Status CM Msg (Bugfix)
The HW version is correctly parsed as 2 bytes but shown as 3 bytes in
the dissection. This is fixed here.

Fixes #17133


(cherry picked from commit 1546a0af26)
2021-01-06 17:04:51 +00:00
John Thacker 6f489ee857 macos-setup: Update CMake for Apple Silicon
Apple Silicon requires CMake 3.19.2, but the binaries provided
for 3.19.2 only run on MacOS 10.10 and later, so we have more
bifurcation of the CMake we try to install. Get rid of some of
the old 2.x paths to compensate.


(cherry picked from commit d74bfc569e)
2021-01-05 22:32:46 +00:00