Commit Graph

81393 Commits

Author SHA1 Message Date
ZhongYao Luo 64155132ea Fix null pointer
In some cases, the fds parameter of frame_data_sequence_find is invalid,
causing the software to crash, For example, this command
echo'{"req":"frame","bytes":"yes","proto":"yes","frame":"1" }'|sharkd-
2021-06-21 18:12:45 +00:00
João Valverde 759bb234d0 wslog: Check if we are initialized and add missing inits
Instead of receiving the program name from GLib, pass it explicitly
to ws_log_init() instead  and use that to initialize the GLib program
name.

ws_log_parse_args() will now exit the program when it encounters an
argument error if exit_failure >= 0.
2021-06-21 16:03:29 +00:00
João Valverde c216bb85e7 wslog: Reverse order for level priority
Consistently speaking of ascending priority for higher levels
seems slightly more intuitive. Use that instead.
2021-06-21 16:03:29 +00:00
João Valverde b23d2f8519 wslog: Cleanup the filter/match logic 2021-06-21 16:03:29 +00:00
João Valverde 3256e45b4e wslog: Critical and error are always active.
The intention was that "error" and "critical" are *always*
active (always...). Do that.
2021-06-21 16:03:29 +00:00
João Valverde 256f5f6e30 wslog: "Warning" can also be set as fatal 2021-06-21 16:03:29 +00:00
Chuck Craft 54baebad48 Lua: reconcile expert info groups; add PI_ASSUMPTION 2021-06-21 15:27:51 +00:00
Chuck Craft a08a118d04 Qt: match Capture Options column header for snapshot length 2021-06-21 15:05:17 +00:00
Eugene Adell c3b280df8f TCP: Introduce an alternative method for the in-flight calculation.
Historically Wireshark evaluated the TCP in-flight value from the
payload actually seen all along the traffic captured.
We introduce another method to meet an observer paying greater
interest in the in-flight deduced from a ponctual SEQ analysis. It
may result in another value when analyzing incomplete conversations,
particularly when the beginning is missing.
The latter is activated by a User Preference setting added in this
release. Closes #7703.
2021-06-21 14:24:02 +00:00
Pascal Quantin 07e8e38d67 sharkd: fix compilation with gcc 11.0.1 2021-06-21 15:58:32 +02:00
Pascal Quantin 3ea51dba87 NGAP: fix dissection of multiple NGAP messages in the same HTTP2 packet
Also add dissection for more containers
2021-06-21 13:33:55 +00:00
Paul Offord 6912666568 removed reference to wsutil/ws_printf.h 2021-06-21 12:49:47 +00:00
Paul Offord 6472051771 solved code conflicts pre rebase 2021-06-21 12:49:47 +00:00
Stig Bjørlykke 553e9e83d2 Lua: Add redissect_packets()
Add Lua function redissect_packets() to redissect packets in live
capture. The use case is to reload packets after a preference change.
2021-06-21 09:52:46 +02:00
Chuck Craft 79bdde7c82 Qt: Filter button label syntax for groups - add hint 2021-06-21 05:41:32 +00:00
João Valverde 7dea683bf1 wslog: Shorten ws_log_message_is_active() name 2021-06-21 00:07:21 +00:00
Guy Harris 628fe2549a mergecap: improve the example.
Explain, in detail, exactly what it's trying to do and, for each of the
three commands in the example, what each step does, as well as
explaining what the calculation using the end time of one capture and
start time of another capture is doing.

(Where did this example come from?  What is the real-world goal of this
exercise?  And why is it an example in which all the fancy stuff is done
in commands *other* than mergecap?)
2021-06-20 23:50:25 +00:00
Mikael Kanstrup 95e7c06d58 dot11decrypt: Cleanup debug log level usage
The debug log levels used in dot11decrypt are pretty much random.
Cleanup how the different levels are used and at the same time change
to standard wslog log levels.

With this change log levels are used as follows:

WARNING - Allocation failures or unexpected (but handled) errors.
DEBUG - Debug messages mainly related to key derivation.
NOISY - Debug messages related to packet decryption.
2021-06-20 23:32:17 +02:00
João Valverde c0a734bdf4 tests: Remove duplicate test 2021-06-20 20:51:00 +01:00
João Valverde 72ea33ae20 epan: Change bytes_to_str() length argument to a size_t 2021-06-20 18:58:10 +00:00
João Valverde ab37610f08 Change my email address 2021-06-20 19:02:53 +01:00
Gerald Combs 3d18e1d439 [Automatic update for 2021-06-20]
Update manuf, services enterprise numbers, translations, and other items.
2021-06-20 16:48:15 +00:00
Developer Alexander cf10c766d2 signal_pdu: dissector handles registered by name
Dissector handles are registered by name so that they become accessible from
lua scripts via Dissector.get()
2021-06-20 12:48:07 +02:00
Gerald Combs 798e45aaeb GitLab CI: Update to match recent PortableApps changes. 2021-06-19 16:51:55 -07:00
Gerald Combs 6495e7da99 Packaging: Add 64-bit PortableApps packages.
Build WiresharkPortable32 or WiresharkPortable64 as appropriate for our
target platform. Add WiresharkPortable64 steps to the Win64 builder.
Update the Developer's Guide. Fixes #17260.
2021-06-19 22:53:45 +00:00
Guy Harris 1fe3ed4940 erf: fix a comment to match reality.
It's not that Wireshark only supports one copy of some block options,
it's that *the pcapng specification* only supports one instance of some
block options, and it's not that wtap_block_set_*_value() fails on
non-string values, it's that the set_XXX_option_value routines currently
only support changing the value of an existing option, not adding a new
instance of an option - the latter requires the add_XXX_option_value
routine.
2021-06-19 15:37:43 -07:00
Guy Harris 98b72220f4 Remove uninteresting information from REPORT_DISSECTOR_BUG() etc. messages.
ws_warning() logs the source file name, source line number, and calling
function name for the ws_warning() call; for errors reported by
REPORT_DISSECTOR_BUG() and macros that call it, the message isn't
reported directly by the macro - the macro formats the error message
into a string, saves the string, and throws a DissectorError exception,
to terminate the dissection, and the exception handler uses the
formatted string in its messages.

Thus, the location in the exception handler isn't interesting; it's not
where the error occurred, it's just where the message is logged, which i
the same for all such errors.

Don't use ws_warning(); instead, directly call ws_log() with
WS_LOG_DOMAIN and LOG_LEVEL_WARNING, which doesn't log the location of
the ws_log() call.
2021-06-19 04:37:26 -07:00
Guy Harris 72b2cf6672 ws_assert: remove a stray semicolon at the end of an inline function. 2021-06-19 03:04:49 +00:00
João Valverde 8cf9791679 Replace some lingering references to g_log() 2021-06-19 02:34:36 +00:00
João Valverde 145ba2e071 Rename a variable that clashes with GLib 2021-06-19 02:34:36 +00:00
João Valverde 0e50979b3f Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
João Valverde b4eddd32c1 wslog: Set registered name earlier 2021-06-19 02:07:34 +01:00
João Valverde dddb33e398 wslog: Be more obvious in the log that the domain is unset
Currently we are not filtering the unset (NULL) domain, on
the assumption that every log call should belong to a defined
domain.

However there are still many places in the codebase where this isn't
true and the fact that the null/default domain name is omitted from
the output and never filtered is probably surprising and user-unfriendly.
Users might understandably assume the filtering is buggy.

Give an indication, such as (none)-MESSAGE, to make this more
obvious.
2021-06-19 02:07:34 +01:00
Guy Harris 39315979c6 pcap-common: set the time stamp precision correctly for LINKTYPE_ERF.
LINKTYPE_ERF pcap files are really ERF files inside a thin pcap wrapper
(don't even ask what a pcapng file with some or all interfaces being
LINKTYPE_ERF is...), so the time stamp comes from the ERF record, not
from the pcap packet header or pcapng block header.

The time stamp reslution for the record should reflect that, so set it
to WTAP_TSPREC_NSEC (ERF time stamps are fractional-power-of-2, not
fractional-power-of-10, so that's the best we can do).
2021-06-18 17:43:36 -07:00
João Valverde 7f17d18012 wslog: Fix domain filtering
Fixes 051a74378d.
2021-06-19 01:17:05 +01:00
Guy Harris 02cffb51a9 erf: handle errors in some routines more completely.
Have them take error code and error information string arguments and,
for various failures, fill them in as "internal error" indications.

Check their return codes to see if they got an error.
2021-06-18 16:22:54 -07:00
Guy Harris d69d1271f0 libpcap: don't generate a fake interface for LINKTYPE_ERF files.
The ERF code will generate interfaces based on the ERF records in the
file, so don't bother adding an additional dummy interface.
2021-06-18 15:34:49 -07:00
Uli Heilmeier d195847bb1 Prefs: Mark gui.packet_editor.enabled obsoleted
Preference has been removed with fca78f9f1f
without obsoleting it.
2021-06-18 20:11:31 +00:00
João Valverde a6738d72a0 wslog: Add support for inverted debug matches
The --log-debug and --log-noisy now accepts a '!' to invert the
match and disable the debug (noisy respectively) log level for
the listed domains.

Note this is different from --log-domains, that option
enables/disables the entire log domain itself, regardless of log
level.
2021-06-18 10:43:39 +01:00
João Valverde 051a74378d wslog: Use NULL for empty/default domain 2021-06-18 10:43:39 +01:00
Guy Harris 49ec11f5aa erf: set the tsprecision value of a newly-created IDB.
Don't assume the default is correct, because there's no guarantee of
that - in fact, there's currently a guarantee that it's not, as it's
initialized to 0, which is WTAP_TSPREC_SECS.
2021-06-18 01:24:41 -07:00
Gerald Combs 1a7041c742 WSDG: Lowercase our Chocolatey package IDs.
Ensure that the `choco install` command examples are all uniformly lower
case. This matches the naming recommendations at

https://docs.chocolatey.org/en-us/create/create-packages#naming-your-package

and the various installation examples at https://chocolatey.org/packages.
2021-06-18 06:56:28 +00:00
Gerald Combs 0ae9c3e8eb Docs: Remove the authors list from wireshark(1).
The AUTHORS section of wireshark(1) is about half the content of the man
page. While it's important to acknowledge the people who have
contributed to the project, the goal of the man page is to tell people
how to use Wireshark.

Replace the list of authors with text that acknowledges their
contributions along with pointers to the AUTHORS file and the list on
the main web site.
2021-06-17 18:33:09 -07:00
Guy Harris 5eda4c0128 pcapng: update a comment to reflect the name cleanups. 2021-06-17 15:55:18 -07:00
Guy Harris 9773b5a4a7 Just call the block type for custom blocks WTAP_BLOCK_CUSTOM.
No need to add a redundant "_BLOCK" at the end.
2021-06-17 15:04:44 -07:00
Guy Harris 6eb3703379 Make various names match the name of the systemd journal export block.
The name of the block, in the pcapng specification is the systemd
Journal Export Block; add "export" after "journal" in various
variable/enum/define names.
2021-06-17 13:52:45 -07:00
Abhinay Ramesh 829082c191 OSPFv3: To decode ospfv3 authentication trailer header for DD packet.
Problem Statement:
=================
OSPFv3 authentication trailer header is not get decoded for
Database description(DD) packets.

RCA:
====
OSPFv3 supports decoding of authentication trailer header only
for Hello packets as of now. Even DD packets have options and
it can be decoded based on AT bit.

Fix:
====
In the function to check if Auth trailer is supported,
Have added a check for DD packet also.

Risk:
=====
Low - Platform independent code.

Tests Executed:
===============
Download the code from CI and test DD packet decoding.

Signed-off-by: Abhinay Ramesh <rabhinay@vmware.com>
2021-06-17 19:23:33 +00:00
Adrian Granados 81233baa6e Rename he_fragmentation_support to he_dynamic_fragmentation_support 2021-06-17 19:03:00 +00:00
Adrian Granados 0348198540 Remove amendment labels from HE Capabilities and HE Operation IEs names 2021-06-17 19:03:00 +00:00
Adrian Granados daf7c2f580 ieee80211: Update HE Capabilities and Operation IEs
Updates/fixes HE Capabilities and Operation IEs to match
the IEEE Std 802.11ax-2021 amendment.
2021-06-17 19:03:00 +00:00