Commit Graph

80097 Commits

Author SHA1 Message Date
Guy Harris 8f700ab1f3 peektagged: guess the PHY for 11b/11g/11a.
FOr 11b and 11g, also set the metadata to provide the "short preamble"
indication.

Add some macros to wsutil/802_11-utils.h to help there, as I threatened
to do in the previous commit. :-)
2021-03-04 16:07:23 -08:00
Guy Harris 25d44cde11 wsutil: rename frequency-utils.[ch] to 802_11-utils.[ch].
It's 802.11-specific, and may include non-frequency/channel-related
items in the future.
2021-03-04 15:41:00 -08:00
Thomas Dreibholz e60bdb8d9a Replaced large NetPerfMeter captures by one small capture.
Changes:
* Replaced large netperfmeter-dccp.pcapng.gz and netperfmeter.pcap.gz captures
by one common small netperfmeter.pcapng.gz for the suites follow_dccp and
netperfmeter.
* Updated test suites "follow_dccp" and "netperfmeter".
2021-03-04 20:27:24 +01:00
Thomas Dreibholz a5757e77a4 Fixed detection of NetPerfMeter data pattern in dissector heuristics. 2021-03-04 20:27:24 +01:00
Alexis La Goutte 5efe21850d IPVS: Fix commit hook warning 2021-03-04 15:12:37 +00:00
Alexis La Goutte aae3c634b4 IPVS: Add COL_INFO with version and number of connection 2021-03-04 15:12:37 +00:00
Alexis La Goutte efae777674 IPVS: Add Payload version 1 2021-03-04 15:12:37 +00:00
Alexis La Goutte efb27fe2e3 IPVS: Add support of Header Version 1
if Count Conns equal 0 it is header version 1 (or after) with version and reserved bytes
2021-03-04 15:12:37 +00:00
Grzegorz Niemirowski bae98a46e9 ZVT: Added dissection of missing fields in Status Information packet
BMPs: trace number, expiry date, card number, card name, additional data,
contract number, authorization attribute
TLVs: card type, receipt parameter, application
2021-03-04 14:14:31 +00:00
João Valverde 4628a60740 debian: config.h is not a public header
The configuration of the build machine is not part of our public
API. 'config.h' must not be installed with system headers,
otherwise it generates all sorts of collisions and generally makes
life unpleasant.
2021-03-04 10:16:41 +00:00
John Thacker 1796053491 dvb-data-mpe: Decode MAC address, don't process scrambled data
Use FT_ETHER for the MAC address, unless the scrambling bits are set,
in which case use a FT_BYTES field. Don't put the address in a separate
tvb, so the bytes it is extracted from can be highlighted. Don't decode
the payload if the payload scrambling bits are set. Add value_strings and
expert infos.
2021-03-04 09:53:29 +00:00
Martin Mathieson bd044e5ec0 PDCP-NR: some decryption changes.
- show 'deciphering disabled' context setting in tree
- decrypt DRBs even if don't think have seen securityModeComplete
2021-03-04 08:42:52 +00:00
Preston Hunt 6b6a2f77ad IEEE 802.11: Add constants for az, aj, and aq 2021-03-04 07:31:10 +00:00
Guy Harris b8d90bb548 netxray: update a comment.
Add additional information derived from more reverse engineering.
2021-03-03 15:19:18 -08:00
João Valverde e536166b38 Fix warnings with GCC and -O3
When building with GCC 10.2.0 and optimization level 3 some new
warnings turn up. Fix them.

./epan/crypt/dot11decrypt_util.c: In function ‘dot11decrypt_derive_pmk_r0’:
../epan/crypt/dot11decrypt_util.c:308:5: error: ‘sha256_res’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  308 |     memcpy(pmk_r0_name, sha256_res, 16);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../epan/crypt/dot11decrypt_util.c: In function ‘dot11decrypt_derive_pmk_r1’:
../epan/crypt/dot11decrypt_util.c:357:5: error: ‘sha256_res’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  357 |     memcpy(pmk_r1_name, sha256_res, 16);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../wiretap/wtap_opttypes.c: In function ‘wtap_block_add_if_filter_option’:
../wiretap/wtap_opttypes.c:782:12: error: ‘*((void *)&filter_dest+8)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  782 |     return filter_dest;
      |            ^~~~~~~~~~~
../wiretap/wtap_opttypes.c: In function ‘wtap_block_set_if_filter_option_value’:
../wiretap/wtap_opttypes.c:782:12: error: ‘*((void *)&filter_dest+8)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  782 |     return filter_dest;
      |            ^~~~~~~~~~~
2021-03-03 15:15:25 +00:00
Martin Mathieson 1e17f3f287 MPEG-DSMCC: Increase size of private data length field.
From tools/check_typed_item_calls.py:
epan/dissectors/packet-mpeg-dsmcc.c:1212 proto_tree_add_item called for hf_dsmcc_dii_private_data_length  -  item type is FT_UINT8 but call has len 2
- add an option to decrypt even if not strictly in-sequence
2021-03-03 08:38:59 +00:00
Martin Mathieson fc6bdbfe71 ORAN: Fix a param name, and some section refs 2021-03-02 22:36:19 +00:00
Thomas Dreibholz eabca2f2b8 Header updates, pointing to up-to-date I-D versions. 2021-03-02 21:35:24 +00:00
Thomas Dreibholz 57300b5008 Moved some more definitions. 2021-03-02 21:35:24 +00:00
Thomas Dreibholz 957ab6370a Removed defines from packet-enrp.c, since they are now already defined in packet-asap+enrp-common.h. 2021-03-02 21:35:24 +00:00
Thomas Dreibholz 80b723dc1b Moved common definitions from packet-asap.c to packet-asap+enrp-common.h. 2021-03-02 21:35:24 +00:00
Grzegorz Niemirowski fb3de6ef04 ZVT: Add receipt parameter dissection 2021-03-02 20:51:35 +00:00
Gerald Combs 481b490b82 Miscellaneous EditorConfig fixes
In the top-level .editorconfig, note that we don't use CMake's standard
indentation.

Remove ascendtext.[ch] from wiretap/.editorconfig since it's no longer
needed.
2021-03-02 19:13:54 +00:00
João Valverde b807020537 'stats_tree' is not a dissector plugin (CheckAPI.pl) 2021-03-02 18:38:30 +00:00
John Thacker 470f94cc3d mpeg-sect: Support Decode As; only register one dissector (MPE) to TID 0x3E
DVB-DATA Multiprotocol Encapsulation (MPE) has the table id 0x3E, which
is conformant to DSM-CC sections with private data, and is by far the
most common "private" implementation. Only register MPE as the default
subdissector for 0x3E, don't register DSM-CC as well. (The order of
registration means that MPE is already the current default, but this
is not reliable.)

Support Decode As for the table ids so that DSM-CC can be used instead if
someone really wants that, and so that some other user private dissector
plugin (on 0x3E or any other user private table_id) can be used.
2021-03-02 06:12:18 +00:00
Gerald Combs 25edc7439b Make ui/*.[ch] indentation consistent.
Switch ui/clopts_common.c, ui/filter_files.[ch], and ui/summary.[ch] to
4 space indentation. This brings them in line with all of the other
files in that directory and with ui/qt.

Fix the modelines in ui/qt/models/filter_list_model.cpp.
2021-03-01 22:41:23 +00:00
João Valverde 8f7303df82 Fix checkapi stats_tree files
Should not include "plugin.c".
2021-03-01 21:19:40 +00:00
João Valverde 7f105d3981 CMake: Use CheckAPI's abort/termoutput with dissectors only
I believe this was the original intention, to use these API restricitons
with dissectors only (not that I necessarily agree with that policy either),
and through copy-paste and lack of clear guidelines it spread to other
parts of the build.

Rename the checkAPI groups to make it very clear that this is dissector-only.

This doesn't mean, of course, that good programming practices shouldn't be
followed everywhere. In particular assertions need to be used properly.
Don't use them to catch runtime errors or validate input data.

This commit will be followed by another removing the various ugly hacks
people have been using to get around the checkAPI hammer.
2021-03-01 20:59:39 +00:00
Nardi Ivan 142cfb03ac GQUIC: fix parsing of unknown (but valid) tags
This commit should be a proper fix for the regression reported in #17250
(7fd71536 is a simple workaround). Such regression has been introduced by
b287e716 while fixing the infinite loop reported in #16897.

b287e716, while fixing the infinite loop, broke the decoding of perfectly
valid tags not yet supported by Wireshark.

AFAIK, the root cause of the infinite loop is the overflow of the `offset`
variable. Therefore checking for this overflow should be sufficient to avoid
the loop.
Note that we already check for sensible values for the 'tag_len' variable;
we should update `total_tag_len` accordingly.

Some words about testing: other than correctly handling unknown but valid
tags, it is important that this commit doesn't reintroduce the infinite
loop bug.
Fortunately #16897 provided a POC trace. Unfortunately, if you revert
b287e716, this POC doesn't work anymore in master-3.4 and master branches,
but it still triggers the infinite loop in master-3.2 branch.
Therefore I have been able to manually check that this MR + the
overflow check is enough to avoid the infinite loop bug, at least in master-3.2.

Some traffic with unknown but valid tags is available in e2ee14ae03.
2021-03-01 12:29:35 +01:00
Lin Sun 26b602a7ae [dissector] add dissector for OPUS packet support
*packet-opus.c: dissector for OPUS packet.
2021-03-01 09:11:34 +00:00
Darius Davis a3be7e898c column-utils: Get snprintf prototype from stdio.h.
Commit 73d793788c removed ws_printf.h from
column-utils.c, but left no prototype for snprintf, causing a build failure on
my Debian testing host.  Let's #include <stdio.h> here.
2021-03-01 07:13:12 +00:00
Guy Harris e31bddb16f geonw: fix the column formatting.
1) G_GUINT16_FORMAT produces warnings about mismatched format string
formats and arguments if you use it with a 32-bit value.

2) There's no reason to format into a string buffer and then use
col_append_lstr(); col_append_fstr() suffices.  (In col_append_ports(),
the formatting is done with col_snprint_port(), which attempts to
resolve the port number to a name, but we don't do that here, we just
format it as a number.)
2021-02-28 22:21:33 -08:00
João Valverde 73d793788c Remove and replace obsolete ws_snprintf() definition
Since fe94133f0d ws_snprintf()
and ws_vsnprintf() don't actually do anything anymore.

The return value of ws_[v]snprintf was discarded before,
now it too conforms to C99.
2021-02-28 22:03:42 +00:00
Alexis La Goutte 670fab2ce5 ieee80211: Fix Dead Store found by Clang Analyzer
Value stored to 'offset' is never read
2021-02-28 15:44:15 +00:00
Alexis La Goutte b140ea6f50 ieee80211: Add FILS Discovery to COL_INFO 2021-02-28 15:44:15 +00:00
Alexis La Goutte fc9fe99234 ieee80211: Fix FILS Discovery Offset 2021-02-28 15:44:15 +00:00
Preston Hunt fae1067d59 IEEE 802.11: Add FTM Sync Info extended tag
This tag contains a single element, which is the 4-octet field TSF Sync
Info.
2021-02-28 15:02:57 +00:00
Vahap Emin Agaogullari e247ffa906 PROFINET: Multiple write in record dissection
COContainerContent dissects PDInterfaceMrpDataAdjust and
PDInterfaceMrpDataAdjust dissects remaining COContainerContent
because of offset problem. Offset problem is fixed.
2021-02-28 14:45:55 +00:00
Adam Mitz a23fe56980 RTPS: move PID_DATA_REPRESENTATION dissection
This Parameter ID is in the XTypes spec, not RTI-specific
2021-02-28 14:06:27 +00:00
Grzegorz Niemirowski be68150021 ZVT: Dissect Print Text Block packet 2021-02-28 13:49:15 +00:00
Gerald Combs e075626611 [Automatic update for 2021-02-28]
Update manuf, services enterprise numbers, translations, and other items.
2021-02-28 12:45:18 +00:00
Preston Hunt 76ae08b7b8 WIP: IEEE 802.11: fix ieee80211_tag_rsnx length processing
Use tvb_captured_length() instead of returning integer offset.
Otherwise, the packet is marked as malformed and the rest of the
packet is not processed.
2021-02-28 09:39:08 +00:00
Thomas Dreibholz 23a5ebf2d9 ASAP+ENRP dissector clean-ups.
Moved common definitions and value strings from ASAP and ENRP dissectors
into separate files packet-asap+enrp-common.h/packet-asap+enrp-common.c.
2021-02-28 08:59:31 +00:00
Uli Heilmeier 984f3372c8 DNS: Ignore req/resp tracking when in_error_pkt
Don't handle request/response tracking when pinfo->flags.in_error_pkt
is set (DNS packets contained within ICMP/ICMPv6 error packets).

Fix: wireshark/wireshark#15036
2021-02-28 08:38:15 +00:00
Guy Harris ab7375dc6b Check for CaptureFileDialog::selectedFileType() failing.
Have it return WTAP_FILE_TYPE_SUBTYPE_UNKNOWN, rather than an
undecorated -1, if the hash table lookup fails.

Check for that as a return value, and pop up a "file an issue" dialog if
WTAP_FILE_TYPE_SUBTYPE_UNKNOWN is returned.

This should squelch Coverity CID 1473325; the error Coverity reports is
bogus, as negative file type/subtype values are check for before we try
to use them as suffixes, but this should catch the "this should not
happen" case that caused the error to pop up.
2021-02-27 14:25:55 -08:00
naf 2f31927dcc tls: improve TLS-SRP support with decryption and username dissection
Dissect client hello SRP extension to extract SRP username.

Decryption is already supported by SSLKEYLOGFILE's client random
and pre-master secret. Add ciphers to decryptable cipher list
so that a decoder is created.
2021-02-27 14:52:50 +00:00
Joey Salazar f503117689 git: Add HTTPS support to Git Protocol
Git protocol version 2[1] supports multiple transport mechanisms, one
of which is via HTTPS.

Adapt the existing Git-over-TCP dissector to support Git-over-HTTP for
fetch and clone requests, following Git's http-protocol
specifications[2].

[1] https://www.kernel.org/pub/software/scm/git/docs/technical/protocol-v2.html
[2] https://www.kernel.org/pub/software/scm/git/docs/technical/http-protocol.html

Part of #17093

Based-on-patch-by: Richard Sharpe <realrichardsharpe@gmail.com>
2021-02-26 20:58:04 +00:00
João Valverde 72dcf04a1b plugins.example: Be less terse in the README description 2021-02-26 16:19:51 +00:00
João Valverde e20ca8e9e8 tests: skip plugin count test if feature is disabled 2021-02-26 15:57:10 +00:00
Thomas Dreibholz 404f619ea2 Added decoding of ProtocolID and PPID into Component Status Protocol dissector.
This merge request adds:
* Decoding of ProtocolID and PPID in Component Status Protocol dissector.
* Moved SCTP PPID list from SCTP dissector into separate file sctpppids.c,
  due to reuse in Component Status Protocol dissector.
* Export of sctpppid_val_ext containing the PPID list.
2021-02-26 15:31:44 +00:00