Commit Graph

86218 Commits

Author SHA1 Message Date
Gerald Combs cf4d88d320 [Automatic update for 2023-01-01]
Update manuf, services enterprise numbers, translations, and other items.
2023-01-02 12:15:00 +00:00
Kevin Albertson 336c0ae992 zstd: fix leak of tvbs
Replace use of composite tvb with creation of one tvb.
2023-01-02 12:13:54 +00:00
Kevin Albertson 8ad7e2f538 zstd: add test for uncompressing 0 length 2023-01-02 12:13:54 +00:00
Yaniv Kaul a2e18feae7 packet-cql: keys with length -1 are NULL values in BATCH operations
When procssing BATCH statements, Wireshark did not properly handled keys with length < 0 , which actually means that no value
is sent on the wire..
This fixes it (and as a results, parses properly some result packets it failed to parse properly before).

Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com>
2023-01-02 12:13:17 +00:00
Yaniv Kaul 140ebf5829 packet-cql: keys with length -1 are NULL values
When procssing results, Wireshark did not properly handled keys with length -1, which actually means NULL.
This fixes it (and as a results, parses properly some result packets it failed to parse properly before).

Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com>
2023-01-02 12:13:17 +00:00
Yaniv Kaul cffdb5945e packet-cql.c: add row number in display for RESULT opcode
Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com>
2023-01-02 12:12:58 +00:00
Yaniv Kaul 91cf033cec packet-cql.c: distinguish between Snappy and LZ4 decompressed data
Simply print if it's Snappy or LZ4.

Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com>
2023-01-02 11:25:12 +00:00
Yaniv Kaul 7eb8065e63 packet-cql.c: add support for SUPPORTED mesage type
Signed-off-by: yaniv.kaul@scylladb.com
2023-01-02 09:58:24 +00:00
PMcL 7d66154242 Support for an Arista Vendor Specific Protocol subtype
packet.avsp.c: Updated to include a new protocol subtype called TGen;
packet-ethertype.c: Changed AVSP to Arista Vendor Specific Protocol;
2023-01-02 07:56:43 +00:00
João Valverde f37c7c4062 dfilter: Tweak representation for length-1 byte array
Make dfilter byte representation always use ':' for consistency.

Make 1 byte be represented as "XX:" with the colon suffix to
make it nonambiguous that is is a byte and not other type,
like a protocol.

The difference is can be seen in the following programs. In the
before representation it is not obvious at all that the second
"fc" value is a literal bytes value and not the value of the
protocol "fc", although it can be inferred from the lack of
a READ_TREE instruction. In the After we know that "fc:" must
be bytes and not a protocol.

Note that a leading colon is a syntactical expedient to say
"this value with any type is a literal value and not a protocol
field." A terminating colon is just a part of the dfilter
literal bytes syntax.

Before:

Filter: fc == :fc

Syntax tree:
 0 TEST_ANY_EQ:
   1 FIELD(fc <FT_PROTOCOL>)
   1 FVALUE(fc <FT_PROTOCOL>)

Instructions:
00000 READ_TREE		fc <FT_PROTOCOL> -> reg#0
00001 IF_FALSE_GOTO	3
00002 ANY_EQ		reg#0 == fc <FT_PROTOCOL>

After:

Filter: fc == :fc

Syntax tree:
 0 TEST_ANY_EQ:
   1 FIELD(fc <FT_PROTOCOL>)
   1 FVALUE(fc: <FT_PROTOCOL>)

Instructions:
00000 READ_TREE		fc <FT_PROTOCOL> -> reg#0
00001 IF_FALSE_GOTO	3
00002 ANY_EQ		reg#0 == fc: <FT_PROTOCOL>
2023-01-02 02:54:38 +00:00
João Valverde c762d8492b dfilter: Improve debug format 2023-01-02 02:53:21 +00:00
João Valverde f5bfe89785 dfilter: Replace global variable 2023-01-02 01:19:51 +00:00
João Valverde 5d8f495233 dfilter: Minor flex clean up
Replace flex prefix to improve readability.

Remove two no-longer-needed workarounds to suppress warnings.
2023-01-02 01:19:26 +00:00
João Valverde f2218ae5f0 Lemon: Update code and remove cruft
Remove some unused historical files.

Aggressively disable warnings to keep the lemon source
pristine and avoid the maintenance burden for lemon itself.

Lemon has its own lax policy for warnings that doesn't match our
own and they won't accept external patches to remove the
warnings, so just ignore them. Lemon is just executed to generate
code for the Wireshark build and the minor code issues it has
have no influence at runtime.

For lemon generated code we selectively disable some linting
warnings.

Remove patches for lemon and lempar, they are no longer required
with these changes to silence warnings.
2023-01-01 18:18:06 +00:00
Stig Bjørlykke 67a788b29c Happy New Year 2023 2023-01-01 10:22:36 +01:00
Alexander Clouter ee7d3507eb qt: Ignore gcc 12.1 optimization bug with Qt (more e1a6913a) 2022-12-31 20:45:15 +00:00
Alexander Clouter a8b16d74e1 eap: tweak conversation tracking to avoid breaking pinfo horribly
Looks like conversation_set_conv_addr_port_endpoints() from 66b441f3d is
designed with this use case in mind.

This should resolve issue #18622
2022-12-31 20:43:22 +00:00
Gerald Combs b15eb8a82f macOS: Don't try to copy a nonexistent plist
In the ChmodBPF postinstall script, don't try to copy
org.wireshark.ChmodBPF.plist from a nonexistent location.

Ping #18734.
2022-12-30 18:05:01 -08:00
Matan Perelman 3a23f6e6c9 gsm_a_rr: Support parsing channel requests on RACH 2022-12-30 19:44:49 +00:00
João Valverde 6bdc85e37f dfilter: Reject constant expressions
Constant logical expressions are tautologies and almost certainly
user error. Reject them as invalid.

Most of them were already rejected with insufficient type information
but some corner cases were still valid.

Before:

    Filter: ${frame.number} == 3

    Syntax tree:
     0 TEST_ANY_EQ:
       1 REFERENCE(frame.number <FT_UINT32>)
       1 FVALUE(3 <FT_UINT32>)

    Instructions:
    00000 READ_REFERENCE	${frame.number <FT_UINT32>} -> reg#0
    00001 IF_FALSE_GOTO	3
    00002 ANY_EQ		reg#0 == 3 <FT_UINT32>
    00003 RETURN

After:

    Filter: ${frame.number} == 3
    dftest: Constant expression is invalid.
    	${frame.number} == 3
    	^~~~~~~~~~~~~~~~~~~~
2022-12-30 18:46:22 +00:00
João Valverde a17fb20550 dfilter: Remove commute argument from semantic check
Take a more conservative, less flexible, maybe more elegant,
approach to type inference for now.
2022-12-30 18:46:22 +00:00
João Valverde 2ff6139307 dfilter: Add a check_nonzero() function
Small refactoring with no functional difference.
2022-12-30 18:46:22 +00:00
João Valverde bc74d2e3e4 dftest: Fix command-line argument parsing
Expressions that start with hyphen clash with command-line options.
In that case we need to pass "--" to dftest to stop processing
options.

Fix the test suite to do this. Fixes failures with dftest and
expressions like:

    -2 == tcp.port

Replace the GLib option parser with getopt while at it. The GLib API
is nice but isn't a good fit for this utility and the code appears to
be inconsistent on whether "--" is left in the argv or not.
2022-12-30 18:27:30 +00:00
João Valverde d3d06c2552 dftest: Add debug command-line options 2022-12-30 13:42:26 +00:00
John Thacker 55ffdb08bb conversation: Remove conversation from the correct table
In conversation_set_addr2, if the existing conversation has
a port2, remove it from the _no_addr2 hashtable, not the _no_port2
hashtable.

Fix #18766
2022-12-30 13:16:56 +00:00
Martin Mathieson dfd3a4d61b check_tfs: find entries that define value_string identical to common tfs 2022-12-30 11:56:41 +00:00
Joakim Karlsson a661ebaae2 DECT-NWK: fix build issue [-Werror=maybe-uninitialized] 2022-12-30 11:17:06 +00:00
Joakim Karlsson 3c0cdc9e3d SNMP: generate ASN1 2022-12-30 10:34:21 +01:00
John Thacker 67db53abbf epan: Fixup get_ascii_string change
prev needs to be advanced to ptr on an invalid character even
if there aren't any bytes to copy (because we have two invalid
characters in a row.) Fixup ba7917309a

Fix #18769.
2022-12-29 22:44:37 -05:00
Joakim Karlsson 2ce57fcc19 pfcp: correction of IE 5GS User Plane Node
Fix #18760
2022-12-30 02:09:55 +00:00
Joakim Karlsson 5c151df3ad diameter: Update geographical_description 2022-12-30 02:04:42 +00:00
Joakim Karlsson 23427cc9ba LCS-AP: Update to 3GPP TS 29.171 V17.2.0 2022-12-30 02:03:33 +00:00
Joakim Karlsson 931824f4ff gsm_common: Update geographical_description 2022-12-30 02:02:42 +00:00
João Valverde 53153725bb dftest: Add a missing goto statement 2022-12-30 01:10:27 +00:00
João Valverde 1400d92724 dfilter: Add compilation warning for ambiguous syntax
$ dfilter 'frame contains fc'
    Filter: frame contains fc

    Warning: Interpreting "fc" as "Fibre Channel". Consider writing :fc or .fc.
    (...)
2022-12-29 23:48:56 +00:00
John Thacker ba7917309a charsets: Optimize ENC_ASCII by appending valid bytes at once
For ASCII encoding, most bytes are copied directly. Count consecutive
valid bytes in an accumulator and append them all at once when we
get an invalid character with the high bit set, or at the end.
This reduces the number of reallocations and allows larger, more
optimized memcpys.
2022-12-29 21:02:12 +00:00
Gerald Combs afe5ed0aa5 epan: Initialize variables in various dissectors
Fix the following valgrind warnings:

==15172== Conditional jump or move depends on uninitialised value(s)
==15172==    at 0x78B0849: unescape_and_tvbuffify_telnet_option (epan/dissectors/packet-telnet.c:1043)

==15172== Conditional jump or move depends on uninitialised value(s)
==15172==    at 0x76917C8: dissect_rohc_ir_rtp_profile_dynamic (epan/dissectors/packet-rohc.c:1667)

==15172== Conditional jump or move depends on uninitialised value(s)
==15172==    at 0x70DCBF1: dissect_gsm_rlcmac_downlink (epan/dissectors/packet-gsm_rlcmac.c:9770)

==15172== Conditional jump or move depends on uninitialised value(s)
==15172==    at 0x6C7958E: set_mime_hdr_flags (epan/dissectors/packet-beep.c:392)

Fixes #18742
2022-12-29 19:27:16 +00:00
João Valverde af22c743bd dfilter: Refactor error location for expressions
Underline the whole expression for errors, not just the token.
Implement it for all expressions.
2022-12-29 18:28:54 +00:00
João Valverde 77ef21f86e dfilter: Replace unparsed lexical type and simplify grammar
Remove unparsed lexical type and replace it with identifier
and constant. This separation is still necessary to differentiate
names (fields and function) from literals that look like names
but it has some advantages to do it at the lexical level.

The main advantage is a much cleaner and simplified grammar,
because we only have a single token type for field names, without
any loss of generality (the same name is valid for fields and
function names for example).

The CONSTANT token type is necessary to be different from literal
to provide errors for function rules.
2022-12-29 18:28:54 +00:00
João Valverde bdd00edac8 dfilter: Rename grammar rules 2022-12-29 18:28:54 +00:00
João Valverde b577b8a37f Add WS_WARN_UNUSED function attribute 2022-12-29 18:28:54 +00:00
João Valverde 508a4011ac tests: Rename test group 2022-12-29 18:28:54 +00:00
João Valverde 0fbf65f48b dftest: Add elapsed time 2022-12-29 18:28:54 +00:00
Martin Mathieson 92a81b1361 Enable checks for proto_tree_add_bits APIs 2022-12-29 17:35:18 +00:00
Bernhard Dick fefc28a743 DECT-NWK: Fix BCD encoded non byte aligned strings
As proto_tree_add_bits_item does not support FT_STRING header fields
dissection of non byte aligned fields containing BCD values has been
rewritten using explicit reading of the BCD values and usage of
proto_tree_add_string
2022-12-29 09:05:29 +00:00
Bernhard Dick 4a0d7e9bbb DECT-NWK: Fix hf types for bitfields
Bitfields are neither allowed to be of type FT_NONE or FT_UINT_BYTES.
This commit fixes this for padding fields (being max 7 bits of zeroes,
thus FT_UINT8) and one field currently named as FT_UINT_BYTES that can
just be represented as FT_BYTES
2022-12-29 09:05:29 +00:00
Chuck Craft 1d6cf2f513 prefs: report load error in gui popup
ws_warning logs to console which most users will never see.
https://ask.wireshark.org/question/30035/new-computer-setup-custom-columns/
2022-12-29 04:02:15 +00:00
João Valverde 95f705dd8b dfilter: Improve error location for functions
Underline the whole expression if the error is for the function.

Before:

    Filter: frame.number == abs(1, 2)
    dftest: Function abs can only accept 1 arguments.
    	frame.number == abs(1, 2)
    	                ^~~
After:

    Filter: frame.number == abs(1, 2)
    dftest: Function abs can only accept 1 arguments.
    	frame.number == abs(1, 2)
    	                ^~~~~~~~~
2022-12-28 20:26:00 +00:00
Kevin Albertson bdb1616cf0 fix size_t cast warnings on Windows 2022-12-28 05:00:45 +00:00
Kevin Albertson 611eae17c8 add mongo zstd test to suite_dissection.py 2022-12-28 05:00:45 +00:00