Commit Graph

79334 Commits

Author SHA1 Message Date
Joakim Andersson de9d5f76ff bluetooth: Fix sync info in extended advertising header
Fix the sync info field length in extended advertising header set to the
wrong length.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-07-08 07:23:07 +00:00
Andre Luyer 3afd332455 tshark/wireshark: Fix check ring buffer option for packets
tshark and wireshark did not allow only -b packets:value option, while dumpcap does.
This change adds the same check in tshark and wireshark as in dumpcap.

Quick fix for issue mentioned at https://ask.wireshark.org/question/23437/why-does-tshark-b-packetsvalue-not-work/


(cherry picked from commit 9f8e6b1acb)
2021-07-04 20:49:52 +00:00
Gerald Combs bf35c11265 [Automatic update for 2021-07-04]
Update manuf, services enterprise numbers, translations, and other items.
2021-07-04 16:12:00 +00:00
Pascal Quantin 9b21140c8e NR RRC: fix dissection of MeasTriggerQuantityOffset element
(cherry picked from commit aa5df68171)

Conflicts:
	epan/dissectors/packet-nr-rrc.c
2021-07-04 13:12:53 +02:00
Guy Harris bb4c32b75e wireless timeline: add a destructor to free the hash table.
Destroy the hash table if we're destroying the timeline widget, so that
it doesn't leak.


(cherry picked from commit ad3e6b1be6)
2021-06-28 21:41:31 +00:00
Guy Harris 5318290a05 wireless_timeline: make sure the hash table is always allocated.
At least on my Mac, if I start up Wireshark, start a capture
(non-monitor-mode) on the Wi-Fi adapter, add a comment to the SHB and
the first packet while it's capturing, stop the capture, and try to save
it, it warns that the wireless timeline hash table pointer is null.

Allocate it in the constructor.


(cherry picked from commit 693a02e760)
2021-06-28 10:01:40 +00:00
Gerald Combs c23daa12fe [Automatic update for 2021-06-27]
Update manuf, services enterprise numbers, translations, and other items.
2021-06-27 09:53:30 +00:00
Guy Harris 9fc3cd04a8 mergecap: improve the example.
Explain, in detail, exactly what it's trying to do and, for each of the
three commands in the example, what each step does, as well as
explaining what the calculation using the end time of one capture and
start time of another capture is doing.

(Where did this example come from?  What is the real-world goal of this
exercise?  And why is it an example in which all the fancy stuff is done
in commands *other* than mergecap?)


(cherry picked from commit 628fe2549a)
2021-06-21 00:09:35 +00:00
Gerald Combs 2d967ebad1 [Automatic update for 2021-06-20]
Update manuf, services enterprise numbers, translations, and other items.
2021-06-20 09:54:06 +00:00
Gerald Combs 69977f3109 GitLab CI: Add initial Windows package builds.
Manually copy over the Win64 Package and Win32 Package jobs from
2d9280089c in master and adapt for the 3.4 release builds.
2021-06-19 17:21:07 -07:00
Guy Harris 1afaa65fdd pcap-common: set the time stamp precision correctly for LINKTYPE_ERF.
LINKTYPE_ERF pcap files are really ERF files inside a thin pcap wrapper
(don't even ask what a pcapng file with some or all interfaces being
LINKTYPE_ERF is...), so the time stamp comes from the ERF record, not
from the pcap packet header or pcapng block header.

The time stamp reslution for the record should reflect that, so set it
to WTAP_TSPREC_NSEC (ERF time stamps are fractional-power-of-2, not
fractional-power-of-10, so that's the best we can do).


(cherry picked from commit 39315979c6)
2021-06-19 01:11:41 +00:00
Guy Harris 755a470644 erf: handle errors in some routines more completely.
Have them take error code and error information string arguments and,
for various failures, fill them in as "internal error" indications.

Check their return codes to see if they got an error.


(cherry picked from commit 02cffb51a9)
2021-06-19 00:17:21 +00:00
Guy Harris 930d8f763c libpcap: don't generate a fake interface for LINKTYPE_ERF files.
The ERF code will generate interfaces based on the ERF records in the
file, so don't bother adding an additional dummy interface.


(cherry picked from commit d69d1271f0)
2021-06-18 22:53:24 +00:00
Guy Harris 4a34fa38f1 erf: set the tsprecision value of a newly-created IDB.
Don't assume the default is correct, because there's no guarantee of
that - in fact, there's currently a guarantee that it's not, as it's
initialized to 0, which is WTAP_TSPREC_SECS.


(cherry picked from commit 49ec11f5aa)
2021-06-18 10:00:24 +00:00
Guy Harris 18c4baa9f3 wslua_tvb: fix documentation for reported_length_remaining().
In the past, tvb_reported_length_remaining(), and thus
Tvb:reported_length_remaining(), may have returned -1 if the offset was
invalid.  That's no longer the case; the former returns 0, and, as the
latter just returns the former's return value, that's true of the latter
as well.


(cherry picked from commit 6c043d5c73)
2021-06-16 08:04:07 +00:00
Guy Harris 18e13337ea wslua: a tvbuff doesn't have an "actual length".
It has a "reported length", which is the closes thing to an "actual
length", as it represents the length the packet, or subset thereof, had
on the network, and a "captured length", which is the amount of the
packet that the capture process saved.

In 99.999999999999999999999999999999% of all cases, a dissector should
look at the "reported length", not at the "captured length".

Rename the "len" method to "captured_len", leaving "len" around for
backwards compatibility.

Fix the documentation to reflect reality, to avoid issues such as #15655.


(cherry picked from commit bd9ceaebef)
2021-06-16 07:31:22 +00:00
Gerald Combs 9ea88b3ee2 [Automatic update for 2021-06-13]
Update manuf, services enterprise numbers, translations, and other items.
2021-06-13 09:53:07 +00:00
João Valverde 018ea00ff2 wsutil: argv[] is a NULL terminated array
(cherry picked from commit 70cea91c8a)
2021-06-10 19:05:22 +00:00
Alexis La Goutte 64bedfad27 wifi-nan: Fix length for availability attribute
Issue reported by Behzad Mokhtari

Fix #17431


(cherry picked from commit b716e2f1a2)
2021-06-10 06:27:41 +00:00
Uli Heilmeier ad6a337dde QT: Fix printer dialog
Fix EXC_BAD_ACCESS error by using printer variable.


(cherry picked from commit ea20002a07)
2021-06-09 05:34:56 +00:00
Gerald Combs 61c2ba5b16 [Automatic update for 2021-06-06]
Update manuf, services enterprise numbers, translations, and other items.
2021-06-06 09:53:22 +00:00
Christian Reusch 9eb1c665c6 tcp: Fix dissection of DSACK
DSACK blocks (the first SACK block in a TCP SACK option, with right edge
being lower or equal to the ACK filed) are now identified correctly.

Closes #17315


(cherry picked from commit 7179e1d1fb)
2021-06-05 10:17:05 +00:00
Guy Harris 57776c7641 file-pcapng: fix name of expert info.
The entry was copied and pasted, and the variable name and descriptive
text were changed, but the field name wasn't.


(cherry picked from commit deb6786ed4)
2021-06-04 22:11:44 +00:00
Simon Barber 793d971db2 ieee80211_radio: Use calculated bitrate if not supplied
For 802.11n if the bitrate is not supplied then the calculated bitrate is used. This change does the same for 11ac and 11ax.

Sniffer traces taken on recent versions of Macos no longer supply the bitrate for 11ac frames in the RADIOTAP header, this change allows the wireless timeline to work with these traces.

Fixes #17419.


(cherry picked from commit 5202119239)
2021-06-02 21:48:43 +00:00
Gerald Combs 17a3789ad8 GitLab CI: Move dfilter list generation.
Create the display filter list in the APT Test step.
2021-06-02 13:05:21 -07:00
Gerald Combs fd6a83dfec Version: 3.4.6 → 3.4.7
[skip ci]
2021-06-02 12:23:39 -07:00
Gerald Combs 6357ac1405 Build: 3.4.6
[skip ci]
2021-06-02 10:40:21 -07:00
Guy Harris 65a554b976 pcapng: set the length of the options item.
It runs up to either the end of the option data or the terminating
end-of-options option (readers MUST handle lists of options that
contains an end-of-options option and lists of options that don't).


(cherry picked from commit 2f5c0ffdb2)
2021-06-02 02:17:03 +00:00
Guy Harris 73fe213954 ascend: set rec->rec_type.
REC_TYPE_PACKET is 0, so if it's been initialized to 0, and never gets
overwritten, this fixes code withotu fixing a visible bug, but it should
be done anyway.

(backported from commit 162251176a)
2021-05-31 03:03:35 -07:00
Gerald Combs e8938c10a2 [Automatic update for 2021-05-30]
Update manuf, services enterprise numbers, translations, and other items.
2021-05-30 17:37:02 +00:00
Pascal Quantin 225352970b Windows: upgrade Npcap to 1.31 2021-05-29 12:48:58 +02:00
Gerald Combs 389025227e Prep for 3.4.6 2021-05-28 16:08:48 -07:00
João Valverde 7308ab766b dfilter: Fix handling of escaped quotes in macros
We can't unescape characters when expanding a display filter macro.
The escaping must be preserved until the expression is evaluated in
the display filter engine, otherwise it will likely generate a syntax
error in the parser.

In the macro body we allow '$' (or any other char) to be escaped
with backslash (preserving the backslash).

Fixes #17160.


(cherry picked from commit 1dba58789d)
2021-05-28 11:17:03 +00:00
Gerald Combs e6eb1d7370 Tools: Show only filenames when fuzzing.
Show only the basename of each capture file when fuzzing, which is less
noisy than the full pathname.


(cherry picked from commit 4266e1e9ba)
2021-05-27 21:55:04 +00:00
John Thacker 0d8be1fb79 DVB-S2-BB: Prevent infinite loop
Commit 4bf4ee88f0 removed an else
statement that broke out of the BBFrame processing loop. Without
it, infinite loops might be possible if the GSE frames have bit errors
in the length field.


(cherry picked from commit 0137c24d60)
2021-05-26 04:54:11 +00:00
John Thacker b20a77698d ftype-protocol: Fix crash when comparing _ws.expert to literals
The ftype-protocol has two components to its value - a tvb, which is
allowed to be be NULL (most notably in _ws.expert), and a string
description. They can also be created from string literals, such as
in display filters. It's possible to compare protocols with a NULL
tvb with protocol terms created from literals, e.g. entering the
display filter "_ws_expert < 1".

Partially revert 69e2603c48 so that
this doesn't crash, by assigning proto_string to the empty string
instead of null when creating from a literal. Fixes #17316


(cherry picked from commit 31297dbb82)
2021-05-25 23:09:21 +00:00
Gerald Combs 13546c7a18 CMake: Update autogen properties.
Set the AUTOMOC, AUTOUIC, and AUTORCC properties for the qtui and
wireshark targets to match what we currently do in master. This should
keep us from running moc and uic on unwanted targets.
2021-05-25 21:58:05 +00:00
Pascal Quantin 113062025d Qt: fix some Qt 5.15.2 deprecation warnings
(cherry picked from commit fb2414ae6d)
2021-05-25 20:28:48 +00:00
Gerald Combs 1d22f8f6b6 Release notes: The Windows installers now ship with Qt 5.15.2. 2021-05-25 12:44:08 -07:00
Gerald Combs 6da1114152 GitLab CI: Enable ccache for fuzz builds.
Enable ccache for our fuzz builds. Add sections as described at
https://docs.gitlab.com/ee/ci/jobs/#expand-and-collapse-job-log-sections
for the CMake step as well.


(cherry picked from commit 02f4dcb0ad)
2021-05-25 18:43:34 +00:00
John Thacker ffe59d91a1 RANAP: Don't attempt to re-register heuristic dissectors
Move the RANAP heuristic dissector registration under the initialization
guard that they're only registered once. Prevents console warnings about
the dissectors already being registered to the sccp and sua tables if
a RANAP preference is changed. (Backported manually to regenerate the
dissector via asn2wrs.py)
2021-05-24 19:43:20 -04:00
Guy Harris 67ca5e98c7 k12: plug a memory leak.
If the two putative number-of-records values don't match (meaning one of
them is presumably the number of records and the other one isn't - we
don't know which is the case), free up the private data structure we
allocated before returning an error.


(cherry picked from commit 7f6c5d0137)
2021-05-24 06:39:33 +00:00
Guy Harris 7438c67f06 erf: set USERAPPL if we have the application version but not the name.
Just say "(Unknown application) <version>".

This also means that we don't leak the app_version string if there's no
app_name string.


(cherry picked from commit 297b6c5407)
2021-05-24 04:46:47 +00:00
Guy Harris ac7673bd0a netscaler: plug a memory leak.
Free the read buffer if the first read fails.


(cherry picked from commit 976ccc9a00)
2021-05-24 01:16:32 +00:00
Guy Harris 7c969e2deb tacacs: free a buffer if it's not used.
Plugs a leak.


(cherry picked from commit 1bb64b7e0c)
2021-05-24 00:28:05 +00:00
Guy Harris f032d776e6 dnp: plug a memory leak.
If we're throwing away the data, *throw away the data* - free it, as
we're not using it as the backing data for a tvbuff.


(cherry picked from commit 618661b22e)
2021-05-23 22:08:25 +00:00
Gerald Combs 191e6744f9 [Automatic update for 2021-05-23]
Update manuf, services enterprise numbers, translations, and other items.
2021-05-23 16:20:18 +00:00
Guy Harris ecf1616e35 OID handling: fix a memory leak.
There's a "break" in some code that appears to be copied and pasted from
a switch statement; the break would exit the loop (and leak memory
allocated within the loop), which does not appear to be the intent, so
it may have been copied over incorrectly.  Remove it.

While we're at it, redo the "constant-time append to the end of a loop"
code to be a bit clearer, both to humans reading the code and code
analyzers reading the code.


(cherry picked from commit c73ab16bef)
2021-05-23 09:54:43 +00:00
Guy Harris faea31d0a1 epl-profile-parser: plug a memory leak.
g_key_file_get_groups() returns a pointer to g_mallocated data; we need
to pass its return value to g_strfreev() when we're done with that data,
to free it up.


(cherry picked from commit 64f3f08702)
2021-05-23 07:27:31 +00:00
Guy Harris 54b8952150 Plug another leak.
If cf_export_specified_packets() succeeds, and it wrote to a temporary
file, it leaks the name of the file to which it was writing.  Free that
after we've renamed that file on top of the target file (safe save).


(cherry picked from commit 8ca86b29bf)
2021-05-23 02:23:09 +00:00