Commit Graph

81127 Commits

Author SHA1 Message Date
João Valverde 5a662ba3fb wslog: Add support for domain filtering
A domain filter can be given in the environment variable
'WS_LOG_DOMAINS' or in a command-line options "--log-domains".

The filter is specified as a comma separated case insensitive list,
for example:

    ./tshark  --log-domains=main,capture

Domain data type switches from an enum to a string. There is no
constaint on adding new domains, neither in code or at runtime.
The string format is arbitrary, only positive matches will produce
output.
2021-06-14 13:13:12 +01:00
João Valverde 82739fc4f5 wslog: Improve code modularity and efficiency
Also tweak format for readability.
2021-06-14 13:13:12 +01:00
João Valverde c025e793dd CMake: Remove -Wc++-compat
Happy days are here again.
2021-06-14 11:47:53 +00:00
Martin Mathieson d9c150169d NVME: fix typo 2021-06-14 09:22:17 +01:00
Martin Mathieson 8e099bb0c7 print.c: add length check to loop
Note that it was impossible to actually overflow
the buffer, and there is a check to flush and restart
if it gets to within a few bytes of the end, but static
analyzers (CID: 1477927) are unlikely to be able to work
this out.
2021-06-14 07:03:49 +00:00
Thomas Dreibholz 30f3d72061 Added corresponding documentation for new statistics. 2021-06-14 06:41:44 +00:00
Thomas Dreibholz 7ee68a7904 Added statistics for ScriptingServiceProtocol (SSP). 2021-06-14 06:41:44 +00:00
Thomas Dreibholz e204bb3205 Added statistics for PingPongProtocol. 2021-06-14 06:41:44 +00:00
Constantine Gavrilov 74a3fac004 NVMeOF: rename fields to pass code validation. 2021-06-14 06:21:46 +00:00
Constantine Gavrilov 5d35e28e45 NVMeOF: complete decoding of fabric commands.
Add support for:
* Authentication Send
* Authentication Receive
* Disconnect
2021-06-14 06:21:46 +00:00
Constantine Gavrilov c7e082c6de NVMe: use common block for decoding CQEs for fabric and IO commands. 2021-06-14 06:21:46 +00:00
Constantine Gavrilov 8bc0924c25 NVMeOF fabric commands: simplify decoding code using field definitions. 2021-06-14 06:21:46 +00:00
Constantine Gavrilov 45201049e0 NVMeOF fabric commands: switch TCP dissect to common NVMe code. 2021-06-14 06:21:46 +00:00
Constantine Gavrilov 0b101d54da NVMeOF fabric commands: support offset in commands and completions dissectors. 2021-06-14 06:21:46 +00:00
Constantine Gavrilov d576719df4 NVMeOF: move handling of NVMeOF fabric commands, fabric completions and fabric command transfers to packet-nvme.c.
RMDA implementation is moved to packet-nvme.c, will become common implementation.
2021-06-14 06:21:46 +00:00
Constantine Gavrilov c47294197e NVMEoF: rename rdma fields names to nvmeof.
This is a preparation step to move NVMeOF parsing to generic code.
2021-06-14 06:21:46 +00:00
Constantine Gavrilov 7874e01686 NVMeOF Connect command decoding fixes. 2021-06-14 06:21:46 +00:00
Moshe Kaplan 5e2a8f37f0 Avoid duplicating duplicated memory
No reason to call wmem_strdup() on newly-allocated
memory that is exclusively used for that call
and they both have wmem_packet_scope().
2021-06-14 05:22:45 +00:00
Guy Harris 9f18356888 netlink-route: handle the padding in legacy dump request messages.
The structure containing struct rtgenmsg in the message header also
includes a structure that's aligned on a 4-byte boundary, so there's 3
bytes of padding after the struct rtgenmsg.
2021-06-13 19:19:55 -07:00
Martin Mathieson 10d0a8fd8a IPSEC: free error string
Free error string that may be set during call to
esp_sa_record_add_from_dissector().

Fixes CID: 1485671
2021-06-13 19:58:06 +01:00
John Thacker 73256b3fb7 Remove lingering circuit API from stream.h
The circuit API was removed and replaced with the conversation
"_by_id" API that uses a single uint32 value by commit
800b26edbe

Remove the lingering references to circuits from the stream API,
since it's just used with conversations now.
2021-06-13 11:51:44 +00:00
Gerald Combs 13e5cff6e8 [Automatic update for 2021-06-13]
Update manuf, services enterprise numbers, translations, and other items.
2021-06-13 09:28:55 +00:00
Guy Harris 76174b19b0 file-pcapng: correctly check whether there are any options in the block.
Check whether the length of data remaining in the block content,
starting at the offset past the data preceding options, is > 0, don't
check whether the *total* block content length is > 0.
2021-06-12 15:58:56 -07:00
Guy Harris 14b695d9b3 file-pcapng: report different "block length too short" conditions differently.
Report "length less than the minimum length for a pcapng block"
differently from "length less than the block content of this block".
2021-06-12 15:25:52 -07:00
Guy Harris 016f193111 pcapng: fix routine name.
This processes pcapng files, not pcap files, so call it
pcapng_process_unhandled_option(), not pcap_process_unhandled_option().
2021-06-12 14:08:16 -07:00
Adrian Granados 5b4e814221 ieee80211: fixes Hotspot 2.0 Indication IE dissector
Fixes mask for reserved field, and adds support for ver. number 3.x.
Also, renames "Release Number" to "Version Number" to match
latest WFA Passpoint specification document (ver 3.2).
2021-06-12 09:18:09 +00:00
Adrian Granados 3663277f07 ieee80211: Fix RNR IE field names
Fixes a few typos and makes sure field names in the RNR IE
match the IEEE Std 802.11ax-2021 amendment.
2021-06-12 08:47:08 +00:00
Joerg Mayer 5fc88c671a Strip comment lines before validating format
Fixes the problem that a one line commit message followed by the default
comment lines was rejected.
2021-06-11 16:46:13 +02:00
Gerald Combs b86ec10ca4 CMake: Fixup our glibconfig.h discovery.
On Windows, search for glibconfig.h in the vcpkg lib directory. Search
for it in the directory that contains libglib-2.0 on other platforms.
Avoid a side effect that caused us to search in `/lib` on non-Windows
platforms. Don't add GLIB2_LIBRARY to the search path -- that contains
the path to a file, not a directory.
2021-06-11 11:22:11 +00:00
João Valverde dc7f0b88bb Refactor our logging and extend the wslog API
Experience has shown that:

  1. The current logging methods are not very reliable or practical.
A logging bitmask makes little sense as the user-facing interface (who
would want debug but not crtical messages for example?); it's
computer-friendly and user-unfriendly. More importantly the console
log level preference is initialized too late in the startup process
to be used for the logging subsystem and that fact raises a number
of annoying and hard-to-fix usability issues.

  2. Coding around G_MESSAGES_DEBUG to comply with our log level mask
and not clobber the user's settings or not create unexpected log misses
is unworkable and generally follows the principle of most surprise.
The fact that G_MESSAGES_DEBUG="all" can leak to other programs using
GLib is also annoying.

  3. The non-structured GLib logging API is very opinionated and lacks
configurability beyond replacing the log handler.

  4. Windows GUI has some special code to attach to a console,
but it would be nice to abstract away the rest under a single
interface.

  5. Using this logger seems to be noticeably faster.

Deprecate the console log level preference and extend our API to
implement a log handler in wsutil/wslog.h to provide easy-to-use,
flexible and dependable logging during all execution phases.

Log levels have a hierarchy, from most verbose to least verbose
(debug to error). When a given level is set everything above that
is also enabled.

The log level can be set with an environment variable or a command
line option (parsed as soon as possible but still later than the
environment). The default log level is "message".

Dissector logging is not included because it is not clear what log
domain they should use. An explosion to thousands of domains is
not desirable and putting everything in a single domain is probably
too coarse and noisy. For now I think it makes sense to let them do
their own thing using g_log_default_handler() and continue using the
G_MESSAGES_DEBUG mechanism with specific domains for each individual
dissector.

In the future a mechanism may be added to selectively enable these
domains at runtime while trying to avoid the problems introduced
by G_MESSAGES_DEBUG.
2021-06-11 09:40:28 +00:00
Pascal Quantin c0f8812c31 Kerberos: fix compilation without HAVE_KERBEROS flag
Closes #17439
2021-06-11 09:38:02 +02:00
Guy Harris 5d053016c4 Remove a byte-order mark from two files.
Fixes #17440.
2021-06-10 21:33:08 -07:00
Vadim Yanitskiy bffb6c881a osmo_trx: add primary/shadow TRXDv2 PDU classification 2021-06-10 19:51:57 +00:00
João Valverde 70cea91c8a wsutil: argv[] is a NULL terminated array 2021-06-10 16:22:12 +00:00
Pascal Quantin 1636feb822 PFCP: update 3GPP enterprise ID decoding after g9e8e4f3e
Closes #17436
2021-06-10 11:44:35 +00:00
Constantine Gavrilov 3c075bd11b NVMe RDMA CM decoding fixes
* use SPEC names for fields
* decode missing controller ID
* fix reject payload parsing (size is 4 and not 32; no reserved field)
* simplify custom decoding using CF_FUNC.
2021-06-10 12:36:46 +03:00
John Thacker d8cc21397c DVB-S2-BB: Fix off by one error
Missed reducing the size of the subset to append by one octet
to account for already including the Sync byte from the header
in one location.
2021-06-10 04:20:12 +00:00
Alexis La Goutte b716e2f1a2 wifi-nan: Fix length for availability attribute
Issue reported by Behzad Mokhtari

Fix #17431
2021-06-10 04:04:17 +00:00
Gerald Combs 6357f46bc6 Windows: Update GLib to 2.66.4.
Upgrade our vcpkg bundle to one that includes GLib 2.66.4 and libxml2
2.9.10.

Avoid running pkgconfig on Windows so that we don't find Strawberry
Perl's headers.
2021-06-10 03:48:28 +00:00
João Valverde af2a88cd18 CMake: Reverse logic to handle debug code
Only enabling debug code by default with Debug build type
seems overly restrictive; debug output is still conditional
on the log level.
2021-06-10 00:57:49 +01:00
João Valverde 1a702e5430 Try to avoid -Wunused with vanishing macros 2021-06-10 00:51:59 +01:00
yuanjungong e0d420ac48 Fix a resource leak by closing skf before return 2021-06-09 17:26:24 +00:00
yuanjungong ca42e4a9ad Wiretap: Fix a resource leak
call destroy_k12_file_data to destory file_data before return.
2021-06-09 17:09:44 +00:00
Nicolás Alvarez 391c4ef517 Remove unnecessary null check in diameter dissector
dissect_diameter_mip6_feature_vector is checking whether the data argument
(assigned to diam_sub_dis_inf) is null, but later dereferences it outside
the conditional, so if it was null it would crash anyway. It doesn't seem
possible for the data argument to actually be null, so this commit removes
the redundant check. I'm also adding an assert to document the non-null
assumption.

Bug found by clang static analyzer.

Fixes #17427.
2021-06-09 13:58:44 +00:00
Anders Broman a948542b56 geographical-description: Fixes to the high accuracy dissection. 2021-06-09 15:29:00 +02:00
Vadim Yanitskiy 41f52f5715 GSM A-bis/OML: implement dissection of NM_ATT_INTERF_BOUND
See 3GPP TS 52.021, section 9.4.25 "Interference level Boundaries".
2021-06-09 06:58:41 +00:00
Vadim Yanitskiy e450911f43 GSM A-bis/OML: fix regression in dissect_oml_manuf()
In ca86d0ab38 I introduced a regression
that caused the A-bis/OML dissector to not recognize ip.access
specific messages as such.  The value returned by tvb_memeql() needs
to be reverted, because it returns 0 on success, just like memcmp().

Additionally, I noticed that some implementations of the ip.access
dialect do terminate the manufacturer ID string with a null character,
while some do not.  Handle both cases properly.
2021-06-09 06:58:41 +00:00
Gtker 1689c1c638 WOW: Add SPECIFY_BUILD support to realmlist
Wiki:
https://wowdev.wiki/CMD_REALM_LIST_Server#_.282.4.3.8606.29

C++ implementation:
ee05ec5a40/src/realmd/AuthSocket.cpp (L935)
2021-06-09 05:53:53 +00:00
Gtker f5212ff5cb WOW: Add realmlist support for 2.4.3
Wiki:
https://wowdev.wiki/CMD_REALM_LIST_Server

C++ implementation:
ee05ec5a40/src/realmd/AuthSocket.cpp (L821)
2021-06-09 05:53:52 +00:00
Gtker 5d6dcbcdd2 WOW: Add TBC support for logon proof server to client
Wiki:
https://wowdev.wiki/CMD_AUTH_LOGON_PROOF_Server

C++ implementation:
ee05ec5a40/src/realmd/AuthSocket.cpp (L261)
2021-06-09 05:53:52 +00:00