Commit Graph

79060 Commits

Author SHA1 Message Date
Guy Harris b45aad9be2 Apparently, WS_WIKI_URL() can work in Qt C++ code.
(cherry picked from commit 32b64c1694)
2020-10-27 05:05:51 +00:00
Guy Harris 9b437e3c2d Include <ui/urls.h>
If you're going to use #defines from ui/urls.h, it reeeeeeeeeally helps
if you *include* ui/urls.h.


(cherry picked from commit a8d023ba58)
2020-10-27 04:17:27 +00:00
Stig Bjørlykke fe86435dd7 Qt: Avoid crash on ProtoTree item deselect
Handle the case of deselecting a ProtoTree item.


(cherry picked from commit a88d72dc8e)
2020-10-26 14:44:54 +00:00
Gerald Combs 38207edc52 [Automatic update for 2020-10-25]
Update manuf, services enterprise numbers, translations, and other items.
2020-10-25 16:00:26 +00:00
Gerald Combs 74eeba5787 USB HID: Initialize a struct.
Initialize a variable caught by Valgrind. Fixes #16938.


(cherry picked from commit 273eb06390)
2020-10-25 09:32:30 +00:00
Jaap Keuter f7a46fbed9 MATE: Improve MATE debug facility
1) Allow AVP_DEBUGGING settings to be made from Preferences, iff compiled so.
2) Flush MATE/AVP debug output once sequential packet parse has completed.


(cherry picked from commit 5b2901d090)
2020-10-25 09:08:51 +00:00
Gerald Combs 24450d9c51 tools: Skip over commit body checks.
Cherry-pick the part of 507dd98a58 that skips over commit body checks
since they might contain extra newlines due to appending "(cherry picked
from commit xxx)".
2020-10-24 15:21:26 -07:00
John Thacker de81bd705a Export Objects: Don't double increment count
Don't double increment the count when saving all Export Objects,
which effectively halves the maximum number allowed.
(cherry picked from commit 56e19bec49)
2020-10-23 07:52:42 -04:00
Gerald Combs d1865925ee Build: 3.4.0rc1. 2020-10-22 15:21:22 -07:00
Gerald Combs dfae8942af Fix our version, update the release notes. 2020-10-22 13:47:50 -07:00
Gerald Combs eff9f0fb0d Initialize release-3.4.
Initialize the release-3.4 branch.
2020-10-22 11:38:47 -07:00
Jaap Keuter 87a42de393 MATE: allow _AVP_DEBUGGING flag to be set 2020-10-22 16:07:55 +00:00
Stig Bjørlykke 10e6cb5f37 wslua: Make pinfo.p2p_dir writable
Make pinfo.p2p_dir writeble from Lua to be able to set the direction
for sub-dissectors.
2020-10-22 14:18:58 +00:00
Stig Bjørlykke 158f67e344 wslua: Fix generate doc for WSLUA_ATTRIBUTE
Allow digits in Pinfo names when generating documentation.
2020-10-22 13:55:22 +00:00
robionekenobi f267a0433d packet-mq: Improve and fix bugs
Improve MultiSegment display
Fix Option (endianess) in MQCLOSE
Add missing parsing for Q_MGR_STATUS_ATTRS
Some minor code reformatting
2020-10-22 12:04:27 +00:00
Guy Harris d0270415a9 editcap, tshark: process IDBs in the middle of input files.
Instead of grabbing the set of IDBs found at open time, have a loop
using wtap_get_next_interface_description() to read all unread IDBs run
after opening the input file, after reading a packet from the input
file, and after getting an EOF on the input file.

Add a routine wtap_uses_interface_ids() to check whether the file type
and subtype for a dump file uses interface IDs and requires IDBs.  If
so, in the aforementioned loop, add the IDBs to the dump stream.

Add a routine wtap_dump_add_idb() to add IDBs to a dump stream.  Have it
call a file-format-specific routine to add the IDBs; the only file type
that supports it is pcapng, and it 1) writes out the IDB and 2) adds it
to the set of IDBs for the stream.

Add a wtap_dump_params_init_no_idbs() routine that prevents the IDBs
from the input file from being used to initialize the output file; use
it in cases where we're using the aforementioned loop to copy over IDBs.

Don't require any IDBs to be present when opening a pcapng file for
writing; 1) the simplest pcapng file has just an SHB in it, 2) that
requirement causes dumps that don't provide IDBs at open time to fail,
and 3) the real issue is that we don't want packets with an interface ID
not corresponding to a known IDB, and we already have a check for that.

(There are some hacks here; eventually, when everything processes the
IDBs in such a loop, we may be able to get rid of the "two favors of
dump parameter initialization" hack.)

Fixes #15844.

Addresses the same issue in #15502, but there are other issues there
that also need to be addressed.

In addition, the merge code also needs to be changed to handle this.
2020-10-22 02:58:07 -07:00
George Hopkins e16ef82d7c Elasticsearch: support for version >= 5 2020-10-22 08:23:10 +00:00
Nardi Ivan e6adc940ac QUIC: update to draft-32 2020-10-22 07:43:01 +00:00
Gerald Combs 8b80b9111a Qt: Fix QCustomPlot deprecation warnings.
Fix Qt 5.15 deprecation warnings in QCustomPlot, similar to 76d92ba7e7.

Use default flags constructors instead of 0.

Use QWheelEvent::angleDelta() instead of QWheelEvent::angle().

Use QWheelEvent::position() instead of QWheelEvent::pos().

Use date::startOfDay() instead of QDateTime(date).

Use QMultiMap instead of QMap where needed.
2020-10-22 07:19:14 +00:00
aaptel fef3b86b38 SMB2: fix EaSize field in QUERY DIR responses
According to [MS-FSCC] if the file has the REPARSE_TAG attribute, the
EaSize field must be interpreted as a reparse tag for the following
info levels:

* FileFullDirectoryInfo
* FileBothDirectoryInfo
* FileIdFullDirectoryInfo
* FileIdBothDirectoryInfo
2020-10-22 06:48:26 +00:00
John Thacker e110da70a4 Update validate_single_byte_ascii_encoding with new encodings
Add various other encodings that differ from ASCII in the ISO/IEC 646
invariant region to the reject list for validate_single_byte_ascii_encoding()
2020-10-22 05:21:39 +00:00
Joakim Karlsson 0929eea9fc pfcp: Update to 3GPP TS 29.244 V16.4.0
Change-Id: I31d3123c948cf3f472a384143ca77b756e83c773
2020-10-22 04:58:52 +00:00
Martin Mathieson 27157055cf BSSGP: Make some item calls match field lengths.
From tools/check_typed_item_calls.py output:

epan/dissectors/packet-bssgp.c:655 proto_tree_add_item called for hf_bssgp_bss_area_ind  -  item type is FT_UINT8 but call has len  2
epan/dissectors/packet-bssgp.c:1468 proto_tree_add_item called for hf_bssgp_unit_val  -  item type is FT_UINT8 but call has len  3
epan/dissectors/packet-bssgp.c:1469 proto_tree_add_item called for hf_bssgp_gprs_timer  -  item type is FT_UINT8 but call has len  3
epan/dissectors/packet-bssgp.c:2606 proto_tree_add_item called for hf_bssgp_unit_val  -  item type is FT_UINT8 but call has len  3
epan/dissectors/packet-bssgp.c:2607 proto_tree_add_item called for hf_bssgp_gprs_timer  -  item type is FT_UINT8 but call has len  3
epan/dissectors/packet-bssgp.c:2635 proto_tree_add_item called for hf_bssgp_unit_val  -  item type is FT_UINT8 but call has len  3
epan/dissectors/packet-bssgp.c:2636 proto_tree_add_item called for hf_bssgp_gprs_timer  -  item type is FT_UINT8 but call has len  3
epan/dissectors/packet-bssgp.c:3276 proto_tree_add_item called for hf_bssgp_cell_acc_mode  -  item type is FT_UINT8 but call has len  4
2020-10-22 04:36:30 +00:00
Joakim Karlsson d1f0f08052 gprscdr: Update to 3GPP TS 32.298 V16.6.1
Change-Id: Id6e4504405b2d909d0ff9f044b4c1b1f99d3d407
2020-10-22 03:40:38 +00:00
Guy Harris 7c488e4c71 Add a routine to make a newly-allocated copy of a block.
It currently wraps wtap_block_create() and wtap_block_copy(); if there
are no remaining use cases for wtap_block_copy() at some point, it can
just *replace* wtap_block_copy().
2020-10-21 19:10:49 -07:00
Jaap Keuter ec59b17544 WSUG: Fix Wiki leaks^Wlinks 2020-10-21 21:14:52 +02:00
Guy Harris b478e60b29 Add a routine to get the next as-yet-unfetched interface description.
In a wtap, keep track of the first interface description not yet fetched
with wtap_get_next_interface_description() and, when
wtap_get_next_interface_description() is called, have it return that
description, as a wtap_block_t for its IDB.  If there are no
as-yet-unfetched interface descriptions, return NULL; there may, in the
future, be more interface descriptions for the file, so this should be
called:

* after the file is opened;

* after wtap_read() returns TRUE, indicating that it's returned a
record (and *before* you process the record that wtap_read()
returns, as it might be the interface description for the
interface on which the packet in that record arrived);

* after wtap_read() returns FALSE, indicating an EOF or an error
return (as there might have been interfaces at the end of the
file or before the error point).

At each of those points, the caller should loop until
wtap_get_next_interface_description() returns NULL.

Not used yet (but tested with capinfos, which found a reason why you
have to wait until the end of the file before processing the interface
information - there's now a comment in the code giving that reason).

This will probably be used in the future.
2020-10-21 17:57:17 +00:00
John Thacker e20bd408de Use iconv to support GB 18030 and EUC-KR, allow future encodings
Add support internally to using iconv (always present with glib) to convert
strings from various encodings to UTF-8 (using REPLACEMENT CHARACTER as
recommended), and use that to support GB 18030 and EUC-KR. Replace call
directly to iconv in ANSI 637 for EUC-KR to new API. Update comments
and documentation around character encodings. It is possible to replace
the calls to iconv with an internal decoder later. Tested on Linux and
on Windows (including with illegal characters). Closes #16630.
2020-10-21 11:26:23 +00:00
Mikael Kanstrup ad69ec2e11 dot11decrypt: Fix WEP decryption
For WPA security association (SA) entries are created on sucessful
PTK derivation from 4-way handshake frames. WEP though don't use
4-way handshake frames for key derivation and therefore no SA entry
is created. Still WEP decryption implementaton expects to find
an SA otherwise the decryption is skipped.

Fix broken WEP decryption by removing the check for an existing SA
entry and instead form the SA on first successful decryption.

Add also a test for WEP decryption.

Fixes: v3.3.0rc0-1263-g099d241046 ("dot11decrypt: Avoid allocating SA on packet decryption")
2020-10-21 11:03:44 +00:00
John Thacker e814fe0c9b SOCKS: fix desegmentation over multiple TCP segments
The SOCKS dissector temporarily changes the pinfo values for destport
or srcport, so it should get the tcp_conversation_data after doing so
before recursively calling the TCP dissector again. Otherwise the TCP
dissector will be confused about whether a TCP multisegment PDU is in
progress or not, causing failure to lookup and store fragments correctly,
including both failed desegmentation and failed asserts (when it expects
an entry in the table which isn't there, as it was stored under a different
port number.) Fixes #16646.
2020-10-21 10:03:38 +00:00
Kenneth Soerensen 38cdd3df4e ieee802154: Add timeout to ACK tracking
In captures where a lot of packets are missing, requests and ACKs are
sometimes incorrectly paired. With this improvement, ACKs must arrive in
a reasonable time to be paired with a request.
2020-10-21 10:02:56 +00:00
Guy Harris 847046a773 capinfos: give another reason to process the IDBs at the end of the file.
Note that reason in a comment.
2020-10-21 01:57:33 -07:00
Stig Bjørlykke 93ea780e7c tls/dtls: Add a generated field for Application Data Protocol 2020-10-21 08:18:22 +00:00
Martin Mathieson 3f0649bbe5 Correct a few more item lengths. 2020-10-20 21:23:53 +01:00
Gerald Combs 4955219d1a Qt: Add a filter button menu indicator.
Fixes #16918.
2020-10-20 17:49:20 +00:00
Chuck Craft 5b242d62b0 WIN32 logging: connect stdio earlier in main() 2020-10-20 13:49:27 +00:00
Guy Harris 194e74321a editcap: use packet encapsulation, not file type, to check for DCT2000.
What we care about here is the packet type, not the file type, as we
care what's at the beginning of the packet.  This should have no effect
in practice, but it makes it clearer what we're testing for.
2020-10-20 01:50:00 -07:00
Guy Harris a11b9fb7a0 Add an API to determine whether a file type uses interface IDs.
Currently, the only file types that use them are pcapng and IBM's
iptrace; we don't support writing the latter, so this is mainly of
interest for pcapng.

This makes it a bit more obvious what some "is this pcapng?" tests are
really trying to determine, and allows them to automatically support any
new file types that use them.

(With regard to interface descriptions, tere are three types of file:

1) files that contain no interface information;

2) files that contain "just FYI" interface information but that don't
tie packets or other records to particular interfaces;

3) files that contain interface information and tie all packets (and
possibly other records) to an interface.

This tests for files of type 3.)
2020-10-20 00:39:37 -07:00
Martin Mathieson 89e96c1e77 XML Escaping: Don't need to escape unprintable chars.
Should not be needed because the attribute encoding="utf-8" is there.

closes #10445
2020-10-20 05:32:29 +00:00
Martin Mathieson d86df72da3 RTCP: Fix length of PTT participant ref
Found by ./tools/check_typed_item_calls.py
2020-10-20 05:08:56 +00:00
Guy Harris c8882c0f29 bthci: add a note about the case where we hve no connection handle.
A previous change initialized the k_connection_handle, so we don't
compare random data with remote_bdaddr->chandle, but perhaps we
shouldn't compare it at all if we didn't find a handle pair.
2020-10-19 21:19:39 -07:00
Gerald Combs 666e74401a BT ISO Data: Initialize a variable.
Initialize a variable caught by Valgrind. Fixes #16926.
2020-10-19 20:21:45 +00:00
Guy Harris 0d2277bca5 Include <stdint.h> in YACC/Bison parsers if necessary.
MSVC doesn't, by default, define __STDC_VERSION__, which means that the
code generated by newer versions of winflexbison3's Bison end up
defining YYPTRDIFF_T as long, which is wrong on 64-bit Windows, as
that's an LLP64 platform, not an LP64 platform, and causes warnings to
be generated.  Those warnings turn into errors.

With MSVC, if __STDC_VERSION__ isn't defined, Forcibly include
<stdint.h> here to work around that.

Fixes #16924.
2020-10-19 11:17:43 -07:00
João Valverde a76c11e290 CMake: Make pkg-config functions quiet 2020-10-19 16:10:33 +00:00
João Valverde cffd219764 CMake: Replace checking with a status message 2020-10-19 16:10:33 +00:00
Gerald Combs 1a244f9de5 CMake: Configure our .y files for different Bison/YACC flavors.
Bison 3.4 and later generate deprecation warnings for the "%pure-parser"
directive. As https://git.savannah.gnu.org/cgit/bison.git/tree/NEWS says,

----
** Deprecated features

  The %pure-parser directive is deprecated in favor of '%define api.pure'
  since Bison 2.3b (2008-05-27), but no warning was issued; there is one
  now.  Note that since Bison 2.7 you are strongly encouraged to use
  '%define api.pure full' instead of '%define api.pure'.
----

Rename our .y files to .y.in, and modify FindYACC.cmake to detect newer
versions of Bison and configure our .y files with "%pure-parser" or
"%define api.pure" as needed. Squelches warnings from Bison in #16924.
2020-10-19 08:46:32 -07:00
Huang Qiangxiong 0a219bf8b9 Protobuf: dissect a google.protobuf.Timestamp as absolute time field
The google.protobuf.Timestamp is a standard protobuf message type and
consists of seconds and nanos fields. We dissect protobuf field in
google.protobuf.Timestamp type as wireshark FT_ABSOLUTE_TIME field.
And add tvb_get_protobuf_field_uint() to make it easy to get a
Protobuf field of varint type from the tvb.

close #16927
2020-10-19 10:57:50 +00:00
Martin Mathieson a480d91a5b Revert temp changes to valgrind-wireshark.sh 2020-10-19 10:35:26 +00:00
Mikael Kanstrup 3b74cbcf4e EAP: Let dissect_eap_psk_pchannel return offset
For consistency with other functions in this dissector let
dissect_eap_psk_pchannel also return offset instead of "number of
bytes dissected".
2020-10-19 10:09:41 +00:00
Mikael Kanstrup 279bde1a0e EAP: Fix GPSK CSuite Sel dissection
The function to dissect CSuite Sel returns offset not number of
dissected bytes so calling function must assign new offset rather
than incrementing. For consistency also update the CSuite List
function to return offset.
2020-10-19 10:09:41 +00:00