Commit Graph

81098 Commits

Author SHA1 Message Date
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
Gtker 3ab1ad6a45 WOW: Refactor parse_logon_proof into two functions
The changes for 2.4.3 and forward brings complexity to fields and
parsing that are best performed in separate functions.
2021-06-09 05:53:52 +00:00
Eugene Adell 8d27c5617d TCP: Don't reassemble OoO segments when TCP SEQ Analysis is not enabled.
In rare circumstances where port numbers are reused and sequence
numbers are lower in the later conversations, disabling TCP
sequence numbers analysis while enabling out-of-order reassembly
was leading to reassembly inconsistency. Closes #15096.
2021-06-09 05:38:19 +00:00
basakkalfa 7132fcaeb0 PROFINET: DCP SET Block with 0 Block Length
If there is DCP SET block with 0 block length, it is dissected
as erroneous block since DCP SET block can not have 0 block
length. Moreover, DCPBlockLength is not decoded if DCP option
and suboption is 0. However, each DCP block must have
Option/Suboption/DCPBlockLength. This is also fixed.
2021-06-09 05:23:16 +00:00
Thomas Dreibholz d346ab21d6 Updated unit test with relative sequence numbers. 2021-06-09 05:08:11 +00:00
Thomas Dreibholz 29f8579ac1 Pointer "ha" needs to be checked before using it. 2021-06-09 05:08:11 +00:00
Thomas Dreibholz 927b9619e0 Minor clean-ups. 2021-06-09 05:08:11 +00:00
Thomas Dreibholz a91231f1a0 SCTP: Added option to show relative TSNs instead of absolute ones. 2021-06-09 05:08:11 +00:00
Chuck Craft 55511e61bb Qt: Protocol Hierarchy - protocol abbrev tooltip
Closes #16781
2021-06-09 04:52:29 +00:00
Chuck Craft bfd5e3f9aa Qt: Protocol Hierarchy - protocol abbrev tooltip
Partial solution for #16781
2021-06-09 04:52:29 +00:00
Chuck Craft 26210c1fe9 WSUG: README.Debian - update file: link; add online link
Debian policy (https://www.debian.org/doc/debian-policy/ch-docs.html)
is to store README in gzip format.
Add online link for those without local copy installed.
2021-06-09 04:36:34 +00:00
John Thacker c8301ce979 DVB-S2-BB: Make compute_crc8 offset parameter a guint
There's no reason to limit the tvb offset input parameter of this CRC8
function to a guint8, particularly now that the User Packet CRCs
later in the Base Band Frame are being checked.
2021-06-08 19:30:30 -04:00
Isaac Boukris 07bc6e4399 krb5: fix PAC server signature verification in U2U 2021-06-08 17:36:44 +00:00
Isaac Boukris f94f22b7f8 krb5: add TGT-REQ/TGT-REP dissection per the U2U RFC draft
https://datatracker.ietf.org/doc/html/draft-swift-win2k-krb-user2user-03
2021-06-08 17:36:44 +00:00
Isaac Boukris 33a61d14b5 credssp: also decrypt TSRequest/pubKeyAuth blobs 2021-06-08 17:36:44 +00:00
Isaac Boukris 81bed686da credssp: decrypt TSRequest/authInfo using the gssapi_wrap handler
and fix TSCredentials/TSPasswordCreds dissection.
2021-06-08 17:36:44 +00:00
Isaac Boukris fa1204c02c credssp: add support for gss-api and krb5 dissection
Since the gssapi handler can cope fine with ntlm blobs, remove the
heuristic in ntlmssp and call the gssapi dissector directly. In turn
we get kerberos support, including decpryption with keytab etc.
2021-06-08 17:36:44 +00:00
Isaac Boukris 6f528e6cd7 credssp: update TSRequest asn1 struct with new optional fields
and limit errorCode and clientNonce to respective versions as per MS-CSSP.
2021-06-08 17:36:44 +00:00
Isaac Boukris 2764f53e20 credssp: fix dissect_credssp_heur() with modern clients (using version 6) 2021-06-08 17:36:44 +00:00
Isaac Boukris 9147201351 credssp: fix dissection in RDP stream
When there are more packets on the stream after credssp, like tpkt-rpd
data, the credssp heuristics fails when invoked by tls and then even the
packets for which the credssp heuristics succeeded do not get dissected
as credssp but as tpkt-continuation data.
To work around that, call the credssp heuristic dissector directly from
the rdp dissector before trying fastpath.
Leave the credssp heursitics in TLS for other protocols such as HTTP
where it may work.
2021-06-08 17:36:44 +00:00
Isaac Boukris 5363626d5a rdp: add basic dissection of fastpath PDUs
See MS-RDPBCGR 5.4.4 Packet Layout in the I/O Data Stream
2021-06-08 17:36:44 +00:00
Developer Alexander 3827f16d37 PTP: Make PTP dissector accessible for lua scripts
Use register_dissector to dissector handle for PTP dissector to make
it accessible by name for lua scripts via Dissector.get().
2021-06-08 17:20:34 +00:00
Joakim Karlsson 37f53ee543 file-pcapng: fix might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] 2021-06-08 17:45:30 +02:00
Martin Mathieson 8775e2c694 check_static.py: remove unused option 2021-06-08 10:47:59 +01:00
Stig Bjørlykke 76a93df87c smb: Fix 32bit build
The maximum size stored in calculated_size is already checked if
bigger than G_MAXUINT32, so add a cast to size_t.
2021-06-08 10:18:10 +02:00
Stig Bjørlykke 1bb3d761b8 epan: Change export_object_entry_t.payload_len to size_t
The *real* maximum object size is size_t, so change payload_len
to match this.
2021-06-08 07:16:22 +00:00
Simon Barber 97e5b64f6f ieee80211_radio: Clarify Aggregate duration field description.
Change-Id: Ieaff474e4be59b5b41a8262431dbfbc6995579c9
2021-06-08 05:32:16 +00:00
John Thacker 73eca0905d DVB-S2-BB: Two coverity flagged issues from !3239
Address two issues found by coverity.
2021-06-07 20:10:41 -04:00
Alexis La Goutte 307b669aa5 ieee80211: rename TBTT Information to Neighbor AP Information 2021-06-07 20:00:47 +00:00
Alexis La Goutte 17893e35c6 rtps-processed: remove unused else block
From review of Luis
2021-06-07 19:27:27 +00:00