Commit Graph

79731 Commits

Author SHA1 Message Date
Jirka Novak 80760302c9 RTP player: Doubled buffer for replay to avoid play stop caused by underruns
Patch solves issue for case when QT plays audio faster than reads it from file.
The change looks strange because there is no way how to get buffer size before
starting the play. So code start the play, reads buffer and stop it. Then
increases buffer size and start play again.

Note: You still can receive ALSA notifications like:
ALSA lib pcm.c:8545:(snd_pcm_recover) underrun occurred
but it do not stop audio replay.
2021-01-31 15:21:34 +00:00
Martin Kaiser a5207b541e mtp3: create the statistics table only once
Use the new stat_tap_find_table function during init to check if our
statistics table already exists.
2021-01-31 14:48:21 +00:00
Martin Kaiser b00c3bd742 sip: create the statistics tables only once
For sip, we have two different statistics tables for requests and responses.
Create each table only once, check if it already exists.
2021-01-31 13:48:38 +00:00
Martin Kaiser b49b95af65 rpc: create the statistics table only once
Use the new stat_tap_find_table function during init to check if our
statistics table already exists.
2021-01-31 13:27:16 +00:00
Martin Kaiser f21f1c292a dhcp: create the statistics table only once
Use the new stat_tap_find_table function during init to check if our
statistics table already exists.
2021-01-31 10:36:22 +00:00
Martin Kaiser 8963dff518 ansi_a: dtap statistics: create the table only once
Use the new stat_tap_find_table function during init to check if our
statistics table already exists.
2021-01-31 09:32:20 +00:00
John Thacker 46389187ca GitLab CI: Don't build openSUSE 15.1 anymore (EOL)
openSUSE 15.1 (and the closely related SLES 15 SP1) just went EOL,
so don't worry about building packages for it, 15.2 is sufficient.
2021-01-31 08:34:51 +00:00
Guy Harris 1f15c0899e epan: have a routine to register all tap listeners.
Pull the code to register plugin taps, and the loop to register built-in
taps, into a single register_all_tap_listeners() routine.

This leaves it up to libwireshark, not to the programs using it, to know
how to register them.
2021-01-30 21:15:30 -08:00
Guy Harris b2db1517be Oops, put back accidentally deleted blank comment line. 2021-01-30 19:29:59 -08:00
Guy Harris 2c719d4517 Generate plugin.c for tap plugins.
Instead of having the source file containing the top-level registration
routine for the pinfo_stats_tree plugin checked into our repository,
generate it with tools/make-plugin-reg.py, as we do with other plugins.

While we're at it, fix a comment - "DLL" is a Windows term; the
equivalent term in UN*Xes would be "shared object" ("so" or ".so") or
"dynamic library" ("dylib" or ".dylib").
2021-01-30 19:06:22 -08:00
Guy Harris 8c83f31063 wiretap: fix indentation. 2021-01-30 12:05:54 -08:00
Guy Harris 3db10d02e9 wiretap: add wtap_block_set_nth_string_option_value_format().
We have wtap_block_set_string_option_value(),
wtap_block_set_string_option_value_format(), and
wtap_block_set_nth_string_option_value(); complete the collection and
win valuable prizes.
2021-01-30 18:45:03 +00:00
Eugene Adell ed9485ce00 TCP: Null pointer crashes Wireshark
Working on #6683 introduced this bug because of a lack of
control on the conditions when calculating in-flight.Closes #17186.
2021-01-30 12:38:51 +00:00
João Valverde 10178fdb09 Don't include config.h in system headers
Config.h must not be installed so configuration must be performed by client code.

Fixes #17190.
2021-01-30 10:06:20 +00:00
Guy Harris b8e2005653 wiretap: clean up comments.
Remove a trailing blank line while we're at it.
2021-01-30 09:13:52 +00:00
Gerald Combs 9177f0e71a Docs: Change the default wsbuglink text to "Issue".
Change the default text in the AsciiDoctor wsbuglink macrom from "Bug"
to "Issue".
2021-01-30 08:57:07 +00:00
Guy Harris ca85c516fe Refer to options whose data isn't a simple data type as "structured".
"Custom", as in "requires custom handling of the option data, collides
with "custom", as in pcapng custom options.
2021-01-30 00:12:11 -08:00
Martin Mathieson 5fbc354f86 Make more functions and vars static. 2021-01-29 10:05:32 +00:00
Martin Kaiser f4ac70818a stat_tap_table_ui: create tables only once during init
If you load a capture file and open any statistics dialog, you'll see the
list of collected items. Each time you press the Apply button (without entering a
display filter) another list of items will be created as a top-level entry
of the statistics tree. Only the first list will have the correct values,
all subsequent lists will not be populated.

Each statistic module defines a stat_tap_table_ui structure that contains a
stat_tap_init_cb function. This init function is called by
SimpleStatisticsDialog::fillTree before the tap listener is registered. This
happens each time we collect the statistics.

However, it seems that all init functions create a new stat_tap_table each
time they are called, even if they already have an existing stat_tap_table
of the same name.

This patch adds a stat_tap_find_table function to find a table by name.

As a first step, we update the ANSI A-I/F BSMAP Statistics to check if its
table is already registered. If it is, the table will not be created again.
2021-01-28 13:41:08 +00:00
Alexis La Goutte 9fc1ce7610 ieee80211: Add FILS Discovery (Public Action)
from 802.11ai(-2016).pdf

Closed: #17135
2021-01-28 12:29:53 +00:00
Jaap Keuter b4f74bac74 ZVT: clean up some data points 2021-01-28 11:17:54 +00:00
Guy Harris 4715f5021c epan: don't print nanoseconds if seconds isn't representable.
Fix for previous fixes to #17179.
2021-01-27 23:56:22 -08:00
Guy Harris bf265d7e7a 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.
2021-01-27 22:16:47 -08:00
Guy Harris 4e4a7c11c7 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.
2021-01-27 21:46:11 -08:00
Simon Holesch 6508b02ec4 D-Bus: Improve signature validation
An invalid signature ("a{sa}") caused a segfault when the array inside
the entry had a length of zero. An array signature code ("a") must be
followed by a single complete type, and "}" is not one of them. Check
additional restrictions for structs and dict entries, which aren't
related to this bug.

Fixes #17176
2021-01-28 02:04:16 +01:00
Simon Holesch 266e99e11a D-Bus: Handle variants with empty signatures
This triggered a dissector bug:
epan/dissectors/packet-dbus.c:796: failed assertion "DISSECTOR_ASSERT_NOT_REACHED"

Fixes #17176
2021-01-28 02:04:16 +01:00
Simon Holesch 96169c25f6 D-Bus: Pop subtrees on error in D-Bus header
Not popping all subtrees triggers a dissector bug:
epan/proto.c:1136: failed assertion "ptvc->pushed_tree_index == 0"

Fixes #17176
2021-01-28 02:01:46 +01:00
Guy Harris 8e1e28623b Add an encap_table entry for WTAP_ENCAP_ETW.
Fixes #17183.
2021-01-27 23:23:37 +00:00
Jaap Keuter 616d44cbb6 ZVT: Use standard TCP segment reassemble support function
Fixes #17177
2021-01-27 23:05:23 +00:00
Guy Harris 93a472575d Rename WTAP_ENCAP_ETL to WTAP_ENCAP_ETW.
It corresponds to LINKTYPE_ETW in pcap and pcapng files; the structures
in the record format come from the Event Tracing for Windows (ETW) API
rather than directly from Event Trace Log files.

While we're at it, explain what extcap/etl does.
2021-01-27 14:33:09 -08:00
Martin Mathieson efcaa68807 More checking of non-static symbols. 2021-01-27 20:16:21 +00:00
João Valverde be0171019c UDP: Clean up handling of zero-valued UDP checksums
Replace the somewhat weird field format
    "[Checksum: [missing]]"
with
    "Checksum: 0x0000 [ignored or illegal value]"

Improve code redability and fix XXX comment.
2021-01-27 16:46:15 +00:00
João Valverde 1ef2077904 UDP: Add preference to ignore zero checksum over IPv6
Closes #16972. See also #6232.
2021-01-27 12:25:19 +00:00
Joey Salazar d7ffd8f014 git: parse Git Protocol version from pkt-lines
In Git's packfile transfer protocol[1], the initial server response
contains the version of the Git Protocol in use; version 1 or version 2
[2].

Parse out this information following up on work started in MR !805 [3]
by Izabela Bakollari and advice provided by Ronnie Sahlberg, add it as a
field for ease of reading and filtering.

[1] https://www.kernel.org/pub/software/scm/git/docs/technical/pack-protocol.html
[2] https://www.kernel.org/pub/software/scm/git/docs/technical/protocol-v2.html
[3] https://gitlab.com/wireshark/wireshark/-/merge_requests/805

Related to #17093
2021-01-27 09:09:51 +00:00
Martin Mathieson ca4e5c2962 Next batch of unused globals. 2021-01-27 08:42:27 +00:00
Guy Harris c26addae44 One more check for connection_info being non-null is needed.
This fixes issue #17182.
2021-01-27 00:15:24 -08:00
Thomas Sailer 76abe23f6d Bluetooth BR/EDR RF: header decoding according to specification
According to the LINKTYPE_BLUETOOTH_BREDR_BB Packet Structure specification
(http://www.whiterocker.com/bt/LINKTYPE_BLUETOOTH_BREDR_BB.html), the
Bluetooth header should be formatted according to the Bluetooth
specification Volume 2, Part B, Section 6.4. However, right now
wireshark expects the header to be in a weird format,
specifically it expects the header fields to be MSB but the bits
within each header field to be LSB. (Bluetooth standard is all
LSB). Furthermore, it computes the HEC (header check, i.e. the header
CRC) with 4 bits arbitrarily masked.

This patch decodes the header according to the spec. It still accepts
the old format (if the broken HEC matches), and displays a warning.
2021-01-27 06:23:52 +00:00
Jaap Keuter 7664748e72 BT_EVT: Codecs are not vendor codecs 2021-01-27 05:49:20 +00:00
Gerald Combs cd278f5fd9 wiretap: Fixup the sdjournal block length in pcapng.
Fix our entry length check and put our trailing '\0' in the right
location. Fixes #17174.
2021-01-27 02:23:24 +00:00
Martin Mathieson 795dce3a6e NR-RRC: Use mac-nr UEId to configure algorithms 2021-01-26 17:36:02 +00:00
Rubin Gerritsen 277890d7e1 Bluetooth: Fix NULL pointer dereference crash
Occured when a control procedure packet was logged without connection
context.

The bug was introduced in 0dab2494ca

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2021-01-26 10:53:35 +00:00
mbutkereit d536d11a28 QUIC: Add dissection of MP-QUIC draft-deconinck-quic-multipath 2021-01-26 09:18:38 +00:00
Eugene Adell f255f6c683 TCP: Taking SACK's into account for in flight calculation
TCP in flight calculation was based on Sequence analysis only.
We now also look at the SACK blocks and give a more accurate
view of the in flight reality. Closes #6683.
2021-01-26 08:20:43 +00:00
Rubin Gerritsen 32cadbacb1 Bluetooth: Detect invalid control procedure collision resolution
See Bluetooth Core Spec, Vol 6, Part B, Section 5.3

If the event counter is available, the procedure is marked as complete
when the instant is reached.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2021-01-26 07:05:08 +00:00
Martin Mathieson 619b3128a1 Make some symbols static or delete them. 2021-01-26 06:30:38 +00:00
Gerald Combs 785e291c1b 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.
2021-01-26 05:20:04 +00:00
Gerald Combs 26f0db01a7 USB HID: Fix a memory leak.
Replace mismatched g_strdup() + g_free()s with
wmem_strdup_printf(wmem_packet_scope(), ...). Fixes #17124.
2021-01-26 00:33:37 +00:00
Grzegorz Niemirowski 6a860c979a Fix TID bitmap name 2021-01-25 22:50:37 +01:00
Christian Krump 420c0aea1e EPL: various extensions
- fixed some datatype issues (detected by scripts of gitlab environment)
- shift some flag informations of info-column
2021-01-25 15:23:05 +00:00
Carl Hörberg 846985afba AMQP protocol method Exchange#unbind-ok got method id 51
Reference: https://www.rabbitmq.com/resources/specs/amqp0-9-1.extended.xml
It's obviously a copy paste error from way back, but method id 51 is what
rabbitmq sends back on Exchange#UnbindOk so they've kept the "error".
2021-01-25 13:29:19 +00:00