Commit Graph

44582 Commits

Author SHA1 Message Date
Guy Harris 109b92b5d7 wiretap: have wtap_dump_close() provide a "needs to be reloaded" indication.
This allows the "needs to be reloaded" indication to be set in the close
process, as is the case for ERF; having a routine that returns the value
of that indication is not useful if it gets seet in the close process,
as the handle for the wtap_dumper is no longer valid after
wtap_dump_close() finishes.

We also get rid of wtap_dump_get_needs_reload(), as callers should get
that information via the added argument to wtap_dump_close().

Fixes #17989.
2022-03-14 19:12:20 +00:00
Dario Lombardo 9012722f9b elastic: fix mapping with recent es versions. 2022-03-14 08:34:48 +00:00
Konrad Wolsing f9ee2c14a0 IEC-60870-5-104: apci type endianness bugfix
The type field in the IEC-60870-5-104 header is parsed wrongly. The type is
encoded in the headers third byte: I.e. a U-frame is encoded as xxxxxx11b, a
S-frame as xxxxxx01b and an I-frame as xxxxxxx0b. Yet the current parser reads
the information from the MSB.
2022-03-13 20:45:54 +00:00
Jaap Keuter 676ed85296 Bluetooth: Amend ID's with additional entries from registry
Also update registry references to current locations.
2022-03-13 20:00:02 +00:00
Gerald Combs 24420ceb47 [Automatic update for 2022-03-13]
Update manuf, services enterprise numbers, translations, and other items.
2022-03-13 16:46:10 +00:00
Alexis La Goutte 7747189861 couchbase: fix clang warnings
Remove unused assigne varible
2022-03-12 21:53:44 +00:00
Alexis La Goutte b630fdfb98 rfc7468: fix warning found by Clang analyzer
rfc7468.c:195:76: warning: The left operand of '-' is a garbage value [core.UndefinedBinaryOperatorResult]
2022-03-12 21:53:44 +00:00
Alexis La Goutte f6ce1bd5a3 rfc7468: fix warning found by Clang analyzer
3rd function call argument is an uninitialized value
2022-03-12 21:53:44 +00:00
Gerald Combs 8575914213 epan: Make sure we always set our return values.
Make sure we always set a return value in our various
proto_tree_add_item_ret_* routines. Fixes #17994.
2022-03-12 01:52:56 +00:00
Dylan Ulis f4703d4dcf CIP: Forward Close Req: Show connection parameters 2022-03-10 21:13:25 +00:00
Nan Xiao 3f9fdc373e QUIC: fix typos 2022-03-10 07:17:51 +00:00
Dylan Ulis 1a4ef97e45 CIP Security: Update attribute values 2022-03-09 10:49:52 -05:00
Nan Xiao 42035b61aa quic: fix bug in decrypting draft-34 version 2022-03-09 13:05:29 +00:00
João Valverde 7e07f373f5 dfilter: Remove unused function
Clean-up for a68b408a9f.
2022-03-09 11:51:47 +00:00
João Valverde 8983dda8f2 dfilter: Deprecate "~=" (any_ne)
The representation "~= has been superseded by "!==" with the same
meaning, making it superfluous and somewhat confusing. Deprecate
"~=" and recommend "!==" instead.
2022-03-09 11:28:39 +00:00
Joerg Mayer ad48c4050d IEEE 802.11: Additional countrycode environment values 2022-03-09 07:30:42 +01:00
Gerald Combs e482b375f2 Rename the "image" directory to "resources".
The "image" directory contains resource compiler assets and other
application resources, so name it "resources."
2022-03-09 02:07:51 +00:00
easonweii 0ebf7b6de5 iwarp: optimize the parsing of the MPA protocol
Some optimizations will be made to solve the crash problem caused by abnormal pcap files.
Related to #17983
2022-03-08 17:42:02 +00:00
ismaelrti f7e0c7028b RTPS: Filter description changes in RTI_BINDING_PING and locators.
More generic string used in UDPv4 WAN locator and RTI_BINDING_PING
fields.
2022-03-08 10:17:48 +00:00
Gerald Combs 5fc1ed369c USB HID: Initialize some variables.
Fixes #17984.
2022-03-07 14:01:38 -08:00
Christoph Zeller dae7cb354f BACnet: update to protocol revision 24 2022-03-07 20:11:26 +00:00
chiachin2686 ec8c547136 Added the OIDs and codepoints of OQS-OpenSSL supported algorithms to Wireshark
Added PQC key exchange algorithms and PQC signature algorithms
in "epan/dissectors/packet-tls-utils.c". Added PQC signature algorithms
in "epan/dissectors/packet-pkcs1.c".

OQS-OpenSSL_1_1_1-stable is a fork that integrates liboqs into OpenSSL 1.1.1,
which provides a simple prototype of quantum-safe cryptography in TLS 1.3.
liboqs is an open-source C library for quantum-safe cryptographic algorithms.
Both are part of the Open Quantum Safe (OQS) project.
2022-03-07 20:49:59 +08:00
Sake Blok be915d7374 epan: Allow nested dependent packets
Save all dependent frames when there are multiple levels
of reassembly.
2022-03-06 23:43:03 +00:00
Gerald Combs 1d2a8bff3c [Automatic update for 2022-03-06]
Update manuf, services enterprise numbers, translations, and other items.
2022-03-06 16:41:06 +00:00
easonweii dad78d209a iWARP MPA: Resolved the problem that the iWARP Marker parses abnormally
Fix the wrong iWARP Marker value in version 3.6
Related to #17739
2022-03-06 14:59:43 +00:00
João Valverde df0fc8b517 dfilter: Try to be more flexible with leading colons
For an expression starting with a colon (a literal) try to parse
the value with and without colon. This avoids excluding some
valid representations like the IPv6 address "::1".
2022-03-05 11:10:54 +00:00
João Valverde bd48f947b0 dfilter: Require a field-like value on the LHS
Comparisons require a field-like value on one of the sides,
or both. Change this to require on the LHS or both. There is
realy no reason that I can see to allow the relation to commute,
and it allows removing a lot of unnecessary code and extra tests.
2022-03-05 11:10:54 +00:00
João Valverde a68b408a9f dfilter: Add RHS bias for literal values
For unparsed values on the RHS of a comparison try
to parse them first as a literal and only then as
a protocol. This is more complicated in code but
should be a use case a lot more common and useful in
practice.

It removes some annoying special cases and applies this
rule consistently to any expression. Consistency is
important otherwise the special cases and exceptions
make the language confusing and difficult to learn.

For values on the LHS the rule remains to first try a
protocol value, then a literal.

Related with issue #17731.
2022-03-05 11:10:54 +00:00
João Valverde c4f9d8abda dfilter: Rename "unparsed" to "literal"
A literal value is a value that cannot be interpreted as a
registered protocol. An unparsed value can be a literal or
an identifier (protocol/field) according to context and the
current disambiguation rules.

Strictly literal here is to be understood to  mean "numeric
literal, including numeric arrays, but not strings or character
constants".
2022-03-05 11:10:54 +00:00
João Valverde 6d520addd1 dfilter: Add special syntax for literals and names
The syntax for protocols and some literals like numbers
and bytes/addresses can be  ambiguous. Some protocols can
be parsed as a literal, for example the protocol "fc"
(Fibre Channel) can be parsed as 0xFC.

If a numeric protocol is registered that will also take
precedence over any literal, according to the current
rules, thereby breaking numerical comparisons to that
number. The same for an hypothetical protocol named "true",
etc.

To allow the user to disambiguate this meaning introduce
new syntax.

Any value prefixed with ':' or enclosed in <,> will be treated
as a literal value only. The value :fc or <fc> will always
mean 0xFC, under any context. Never a protocol whose filter
name is "fc".

Likewise any value prefixed with a dot will always be parsed
as an identifier (protocol or protocol field) in the language.
Never any literal value parsed from the token "fc".

This allows the user to be explicit about the meaning,
and between the two explicit methods plus the ambiguous one
it doesn't completely break any one meaning.

The difference can be seen in the following two programs:

    Filter: frame == fc

    Constants:

    Instructions:
    00000 READ_TREE		frame -> reg#0
    00001 IF-FALSE-GOTO	5
    00002 READ_TREE		fc -> reg#1
    00003 IF-FALSE-GOTO	5
    00004 ANY_EQ		reg#0 == reg#1
    00005 RETURN

    --------

    Filter: frame == :fc

    Constants:
    00000 PUT_FVALUE	fc <FT_PROTOCOL> -> reg#1

    Instructions:
    00000 READ_TREE		frame -> reg#0
    00001 IF-FALSE-GOTO	3
    00002 ANY_EQ		reg#0 == reg#1
    00003 RETURN

The filter "frame == fc" is the same as "filter == .fc",
according to the current heuristic, except the first form
will try to parse it as a literal if the name does not
correspond to any registered protocol.

By treating a leading dot as a name in the language we
necessarily disallow writing floats with a leading dot. We
will also disallow writing with an ending dot when using
unparsed values. This is a backward incompatibility but has
the happy side effect of making the expression {1...2}
unambiguous.

This could either mean "1 .. .2" or "1. .. 2". If we require
a leading and ending digit then the meaning is clear:
    1.0..0.2 -> 1.0 .. 0.2

Fixes #17731.
2022-03-05 11:10:54 +00:00
Martin Mathieson 5db8d0930a NVME: Make an array of hf items static. 2022-03-04 20:19:56 +00:00
John Thacker f43ce70fd9 HTTP2: Don't add a proto item before seeing if we'll dissect anything
Behave like other protcols that call tcp_dissect_pdus and don't set
COL_PROTOCOL or add a proto item before the call to tcp_dissect_pdus.

This avoids adding an empty tree in cases where there isn't enough
of the PDU to actually dissect anything. This makes the protocol
tree the same in the first pass (and thus tshark output), as in later
passes where the HTTP2 dissector won't get called.
2022-03-04 14:26:15 +00:00
Oke Hargens f461e33a41 column-utils: Add missing check for frame_data::has_ts
Adds check for frame_data::has_ts in col_set_delta_time before calling
set_time_seconds. This is the same check that is done in multiple other
methods in column-utils.c. Because frame_data::tsprec might not be
initialized if has_ts is false, this resulted in a failed assertion in
set_time_seconds if the user created a column with "Delta time".

Also adds an assertion for frame_data::has_ts in set_time_seconds.
2022-03-04 12:03:36 +00:00
Huang Qiangxiong 0d0c1ceead Protobuf: Support to display JSON mapping for Protobuf message
Add option display_json_mapping, that make a new JSON view of
this protobuf message displayed.

close #17797
2022-03-03 14:47:32 +00:00
John Thacker 3846d35529 TLS: Don't add to the info column if the msp ends in the same frame
If a multisegment TLS pdu begins and ends in the same frame, don't
add "[TLS segment of a reassembled PDU]" to the info column.
2022-03-03 07:09:55 -05:00
Stig Bjørlykke db85804e92 cbor: Use common fields for uint and tag
Use the same field name for 8/16/32/64 bits uint and tag to align
with nint and length fields.
2022-03-03 08:19:54 +01:00
Stig Bjørlykke c12a41e970 cbor: Add items for header fields
Add items for major type, additional information and lengths.
Create an entry for each element which contains the header details.

Change error handling from returning a proto_item to return a boolean.
Change naming to Indefinite length instead of Undefined length.
Dissect "break" using dissect_cbor_float_simple_data().
2022-03-03 08:19:54 +01:00
Moshe Kaplan fd8a1e6f4a packet-ftp: Add support for exporting objects
Add supports for exporting objects transferred
over FTP. The max size for files to be
exported can be configured via preferences,
and is unlimited (0) by default.
2022-03-03 02:45:42 +00:00
Gerald Combs 041b9d6ade MySQL: Fix a buffer overrun.
Fixes #17976.
2022-03-02 13:37:56 -08:00
Constantine Gavrilov b32659a5bc NVMe: decode Get Features transfers. 2022-03-02 16:04:56 +00:00
Constantine Gavrilov a97fc26d9d NVMe: decode Get Features CQE. 2022-03-02 16:04:56 +00:00
Constantine Gavrilov d06781ee9b NVMe: fix decoding of bad CQE status. 2022-03-02 16:04:56 +00:00
Trond Norbye 6977bc18ec Couchbase: Add support for server push messages
The server may push the following messages to the client:

ClustermapChangeNotification - If the client asked for it via
a hello flag the server will push out notifications to the
client when the topology changed

There are also a few "internal" messages which are used
between various components on the server:

Authenticate - Try to authenticate the externally defined user

ActiveExternalUsers -  Push the list of active externally
                       defined users.

GetAuthorization - Request the authorization profile for the
                   given user.
2022-03-02 11:46:06 +00:00
Martin Mathieson e9aca17038 ORAN FH-CUS: Getting ready to add modulation compression 2022-03-02 09:48:53 +00:00
Constantine Gavrilov 0760bfd1f5 NVMe: decode partial transfers
* Add support for partial transfers decoding for Connect command.
2022-03-02 05:10:12 +00:00
Constantine Gavrilov dc1c251310 NVMe: decode partial transfers
* Add support for partial transfers decoding for GetLogPage command.
2022-03-02 05:10:12 +00:00
Constantine Gavrilov 2126920200 NVMe: decode partial transfers
* Add support for partial transfers decoding for SetFeatures command.
2022-03-02 05:10:12 +00:00
Constantine Gavrilov ff298c9876 NVMe: decode partial transfers
* Add support for partial transfers decoding for Identify command
2022-03-02 05:10:12 +00:00
Constantine Gavrilov dc4c32ebda NVMe: decode partial transfers
* link multiple transfers to commands
* link multiple transfers to transfer requests
* link multiple transfers to each other (prev and next)
* track offset of each transfer
* display offset of each transfer.
2022-03-02 05:10:12 +00:00
Gerald Combs 17ddf0e247 MySQL: Add a cast.
Try to fix

```
epan\dissectors\packet-mysql.c(2793,35): error C2220: the following warning is treated as an error [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2793,35): error C2220: 		field_metas->flags = (guint16 *)wmem_alloc0_array(wmem_file_scope(), guint16, num_fields); [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2793,35): error C2220: 		                                ^ [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2793,35): warning C4244: 'function': conversion from 'guint64' to 'const size_t', possible loss of data [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2793,35): warning C4244: 		field_metas->flags = (guint16 *)wmem_alloc0_array(wmem_file_scope(), guint16, num_fields); [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2793,35): warning C4244: 		                                ^ [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2794,34): warning C4244: 'function': conversion from 'guint64' to 'const size_t', possible loss of data [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2794,34): warning C4244: 		field_metas->types = (guint8 *)wmem_alloc0_array(wmem_file_scope(), guint8, num_fields); [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2794,34): warning C4244: 		                               ^ [build\epan\dissectors\dissectors.vcxproj]
```
2022-03-01 16:01:47 -08:00