Commit Graph

80109 Commits

Author SHA1 Message Date
João Valverde b5530e7021 Teach our console log handler to use log domains (Unix)
By punting to the default log handler. tshark is using
g_log_default_handler(), Qt is too. Is there a reason
Wireshark cannot do the same?

Using g_defaut_log_handler() allows the user to
selectively turn on INFO and DEBUG messages using
the environment variable G_MESSAGES_DEBUG.

The fact that the output format is now consistent with
tshark is also a nice bonus.

Ping #17271.
2021-03-06 12:40:20 +00:00
João Valverde cff3a1c08d prefs: Don't clobber env variable G_MESSAGES_DEBUG
Avoid silently overwriting the user's configuration.

Ping #17271.
2021-03-06 12:40:20 +00:00
João Valverde e4b5573ff5 RPM: Fix build using the Unix Makefiles generator 2021-03-06 12:25:14 +00:00
Guy Harris 6b830718d2 niobserver: some work.
Put all the TLV stuff together.  *If* some TLVs are only in the file
header and others are only in packets, thot should be the split; it
appears that the TLVS with a type with the 0x01 bit clear are for the
file header, so perhaps they can be split based on that.

Don't include the TLV header in the structure for the time_info TLV;
that matches other TLV structures.  Write the time_info TLV in two
parts, as we do with the comment TLV.

Consistently use _TO_LE macros in our _TO_LE_IN_PLACE macros.

Add _FROM_LE_IN_PLACE and _TO_LE_IN_PLACE macros for the network_load
TLV.

Use %z, now that we require C99-or-later.

Check the length of TLVs.

Note some things found in files while reverse engineering.
2021-03-05 18:08:10 -08:00
Martin Mathieson ad143c382b BTLMP: Fix a value_string value 2021-03-05 20:24:08 +00:00
Martin Mathieson ed9d35df92 MBIM: Fix value_string entry
Field 'Mico Mode' (mbim.control.ms_registration_params_info.mico_mode) has a conflicting entry in its value_string: 1 is at indices 1 (Enabled) and 3 (Default)

https://download.microsoft.com/download/8/3/a/83a64106-a1f4-4a03-811f-4dbef2e3bf7a/MBIM extensions for 5G.docx
2021-03-05 18:51:57 +00:00
João Valverde f13fd55663 rpm-setup.sh: Fix typo 2021-03-05 16:40:28 +00:00
João Valverde 2d7b68aa09 Replace g_assert() with g_assert_true() for testing
g_assert_true() is always enabled, unlike g_assert().

Bump minimum GLib 2 required version to 2.38.
2021-03-05 14:54:58 +00:00
João Valverde b2bb8bf4e0 Replace g_assert(0) with g_assert_not_reached() 2021-03-05 14:54:58 +00:00
Martin Mathieson d617f197e8 IEEE80211-Radiotap: Fix a typo 2021-03-05 09:10:21 +00:00
Thomas Dreibholz fadbb0a31b Fix for NetPerfMeter Results message.
Fixed length field decoding in NetPerfMeter Results message:
type is uint16, not uint8.
2021-03-05 07:18:10 +00:00
Guy Harris 2627bd4b84 snoop: expand a comment.
There's a bunch of information about the Shomiti wireless header that
would be Nice To Have.  Note it.
2021-03-04 20:40:30 -08:00
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