Commit Graph

85920 Commits

Author SHA1 Message Date
Peter Dobransky 8683c4e328 Add support for missing DPoE and IEEE 1904.1 OAM attributes
DPoE
- D-ONU Packet Buffer (0xD7000A)

IEEE 1904.1
- aReadWriteMACAddress (0x07/0x00-1D)
- aPhyType (0x07/0x00-20)
- aAutoNegotiationAdminState (0X07/0x00-4F)
- aMACControlFunctionsSupported (0x07/0x00-5D)
- acConfigMulticastLlid (0xD9/0x01-07)
2022-12-02 08:35:02 +00:00
John Thacker 13823bb105 openflow_v6: Prevent infinite loops in too short ofp_stats
The ofp_stats struct length field includes the fixed 4 bytes.
If the length is smaller than that, report the length error
and break out. In particular, a value of zero can cause
infinite loops if this isn't done.
2022-12-01 21:18:12 -05:00
John Thacker 0e11932183 kafka: Don't try to decompress if the length is zero.
There's no point in trying to decompress a message with
length zero, and some of the third party decompression
libraries (e.g. zstd) can give unexpected results that
lead to infinite loops if we do so. A message length zero
is almost surely a file with errors.
2022-12-01 20:43:39 -05:00
João Valverde 967a3c3df9 Qt: Check field autocomplete for syntactical validity
Currently the autocompletion engine always suggests a protocol
field completion, even in places where it isn't syntactically
valid.

Fix that by compiling the preamble to the token under the cursor
and checking the returned error. If it is DF_ERROR_UNEXPECTED_END
that indicates a field or literal value was expected. Otherwise
a field replacement is not valid in this position.

Fixes #12811.
2022-12-01 22:50:09 +00:00
Tomasz Moń 5853886d50
reassembly: Store pointer to first gap
Store pointer to first gap to reduce number of full list traversals
needed when linking new fragments. When all captured fragments are in
order, the first gap is effectively pointing to list tail. The best case
scenario, where the list traversals are completely eliminated, happens
every time for protocols that always have the fragments ordered (most
notably USBLL Full-Speed capture containing Bulk OUT transfers with
a lot of retransmissions).

The memory usage is increased by a single pointer and 32-bit contiguous
length counter per fragment head. The additional CPU usage is constant
per insertion, i.e. does not increase with the number of fragments in
the list.

Fixes #17311
2022-12-01 20:14:40 +01:00
John Thacker 8623cd9746 icmpv6: Format DNS name as UTF-8 for output
DNS names technically have arbitrary unknown encoding.
When adding them as a string for output, format as UTF-8.

Fix #18689
2022-12-01 08:23:51 -05:00
John Thacker f2a0d25dba bpv6: Prevent infinite loops
display_extension_block is supposed to return the current offset,
not the number of bytes remaining, which can be less than the current
offset and cause an infinite loop. In the case of errors, set
lastheader and return the current offset to break out of loops.
2022-12-01 01:40:17 +00:00
Bernhard Dick 415296436b DECT-MITEL-ETH: Fix #18683
Adds missing NULL-termination in headerfield list in
dissect_dect_mitel_eth_mac_con_ind and removes handover to general data
dissector as this is path is no longer reached due to handling the
different message types within this dissector.
2022-11-30 23:53:34 +01:00
João Valverde b116ccd6d5 dfilter: Replace compile booleans arguments with a bit flag 2022-11-30 17:36:17 +00:00
João Valverde 84e75be5c6 dfilter: Add optimization flag
When we are just testing code to see if it compiles performing
optimizations is wasteful. Add an option to disable them.
2022-11-30 17:36:17 +00:00
Joakim Karlsson 4b0bf62791 asn2wrs: disable template line directive by default
Same as with !8955, To debug with line directive build with
-DENABLE_DEBUG_A2W=ON flag
2022-11-30 17:31:46 +00:00
João Valverde 729ea56b46 wmem: Remove wmem_strbuf_new_label()
Only dissectors are using this function and there is no use case,
as far as I know, that requires its use. Any limitation of length
is imposed transparently by the UI backend.

This function is problematic because it is not Unicode aware and
will truncate a string on an arbitrary byte boundary for multibyte
strings.

Replace its use with a normal strbuf without a length limite and
remove the function because it is not useful and the ITEM_LABEL_LENGTH
parameter does not belong in wmem anyway.
2022-11-30 15:55:54 +00:00
João Valverde 93814ef740 dfilter: Always set error pointer in case of failure 2022-11-30 15:00:34 +00:00
John Thacker 8a67ca77e6 http: Check CitrixAGBasic Auth encoding
CitrixAGBasic Authentication has Base64 encoded values. The result of
Base64 decoding is not guaranteed to be valid UTF-8 (or ASCII), so
verify it.

Also add the username and password to the credentials tap.

Fix #18677.
2022-11-30 07:54:01 -05:00
John Thacker 10c84b6450 HTTP2: Load dynamic hf entries when UAT is changed
The dynamic hf entries for HTTP2 read from the UAT should be
changed when the UAT is changed or reset, not on each file
load and file close. If a field is added as a column, coloring
rule, or filter, and the capture file is changed, deregistering
the field and reregistering it can cause a crash.

Use the same approach as with HTTP and SIP, slightly modified
because in HTTP2 the header fields hash contains the static
headers as well, to prevent adding duplicate entries via the UAT.

Fix #14768
2022-11-30 11:04:05 +00:00
Joakim Karlsson 5b8cb733fa asn2wrs: disable line directive by default
To debug with line directive build with -DENABLE_DEBUG_A2W=ON flag
2022-11-30 11:03:09 +00:00
Martin Mathieson 6eb734995a Change the re for matching an item's label 2022-11-30 09:25:13 +00:00
Martin Mathieson c69d0114ea tools/check_static.py - fix remaining errors 2022-11-30 08:49:38 +00:00
João Valverde 7336190bbc wslog: Check fileno() for errors
fileno() can fail and GLib will assert on negative fd.

Fixes #18684.
2022-11-29 15:41:20 +00:00
Martin Gallo 129ed6d4c4 SAPSNC: Added SAP SNC as main dissector 2022-11-29 13:34:38 +00:00
John Thacker 9a19d48736 CIMD: Implement User Data encoding
When CIMD indicates that a message was sent in the 7 bit GSM alphabet,
each character has been converted to ASCII or ISO-8559-1 with the
use of combining escape sequences for characters not present in
the destination encoding. Properly convert back to GSM 7 bit encoding
and then to UTF-8 for display.

Fix #18676.
2022-11-29 07:02:26 -05:00
João Valverde f6e850af47 AJP13: Remove odd use of ITEM_LABEL_LENGTH 2022-11-29 10:22:44 +00:00
Gerald Combs 0af3174508 CMake: Updates for CMake 3.25 and later on Windows.
https://cmake.org/cmake/help/latest/release/3.25.html says:

"On Windows, when targeting the MSVC ABI, the find_library() command now
accepts .a file names after first considering .lib. This is symmetric
with existing behavior when targeting the GNU ABI, in which the command
accepts .lib file names after first considering .a."

If "MSVC" is defined, only search for libsmi-2. This keeps us from finding
libsmi.a. Set NO_SYSTEM_ENVIRONMENT_PATH when we're searching for zlib. This
keeps us from finding Strawberry Perl's version.

Some SpanDSP builds link with LibTIFF, but our Windows version doesn't.
2022-11-28 19:15:48 +00:00
João Valverde a0d77e9329 dfilter: Return an error object instead of string
Return an struct containing error information. This simplifies
the interface to more easily provide richer diagnostics in the future.

Add an error code besides a human-readable error string to allow
checking programmatically for errors in a robust manner. Currently
there is only a generic error code, it is expected to increase
in the future.

Move error location information to the struct. Change callers and
implementation to use the new interface.
2022-11-28 15:46:44 +00:00
Bernhard Dick b4196ab772 DECT-AAMIDE: Remove duplicate relnote entry 2022-11-28 15:04:15 +00:00
Bernhard Dick 7fc7830b13 DECT-MITEL-ETH: gint -> int for hf 2022-11-28 15:04:15 +00:00
Bernhard Dick 7cde243a66 DECT-MITEL-RFP: gint -> int for hf 2022-11-28 15:04:15 +00:00
Bernhard Dick 76ff611966 DECT-MITEL-RFP: Dissection of SYNC messages
Adds dissection of the SYNC message type with the following payloads:
* FREQ_CTRL_MODE_IND
* FREQ_CTRL_MODE_CFM
* SET_FREQUENCY
* START_MAC_SLAVE_MODE_IND
* SYSTEM_SEARCH_IND
* SYSTEM_SEARCH_CFM
* PHASE_OFS_WITH_RSSI_IND
2022-11-28 15:04:15 +00:00
Bernhard Dick 03dd33f740 DECT-MITEL-RFP: Improve display
Add unit display for some header fields
2022-11-28 15:04:15 +00:00
Bernhard Dick d67d08cf9b DECT-MITEL-RFP: Improve includes
More of a cosmetic change but ensure all includes refer to their
directory (i.e. epan/)
2022-11-28 15:04:15 +00:00
Bernhard Dick 7afe726007 DECT-MITEL-RFP: Reorder message dissection 2022-11-28 15:04:15 +00:00
Bernhard Dick 992c1fa616 DECT-MITEL-RFP: Add more messages
Add dissection of the following messages:
* SYS-HEARTBEAT-INTERVAL
* SYS-SYSLOG
* SYS-MAX-CHANNELS
* SYS-HTTP-SET
* SYS-PASSWD
* SYS-RPING
* SYS-CORE-DUMP
* SYS-VSNTP-TIME
* SYS-LICENSE-TIMER
2022-11-28 15:04:15 +00:00
Bernhard Dick 6f8a847b63 DECT-MITEL-RFP: Fix MEDIA-OPEN dissection 2022-11-28 15:04:15 +00:00
Bernhard Dick abea8b8b4a DECT-MITEL-RFP: Set proto length in DECToE case 2022-11-28 15:04:15 +00:00
Bernhard Dick a6c6afedef DECT-MITEL-ETH: Improve subtree len handling
Read the length for the subtree length for RFPc items at the same moment
the length field is added and update the subtree's length afterwards.
2022-11-28 15:04:15 +00:00
Bernhard Dick 443b0a4623 DECT-MITEL-RFP: Simpler TCP port registration
When using dissector_add_uint_with_preference no explicit definition of
the Port configuration option is needed. Thus remove unnecessary code.
2022-11-28 15:04:15 +00:00
Bernhard Dick 397d802618 DECT-MITEL-RFP: Fix spelling 2022-11-28 15:04:15 +00:00
Bernhard Dick 9a2cc2f8e2 DECT-MITEL-ETH: Fix spelling 2022-11-28 15:04:15 +00:00
Bernhard Dick 42927f3953 DECT-MITEL-RFP: Add MEDIA message dissection
Add dissection for the following messages:
* MEDIA-OPEN
* MEDIA-CONF
* MEDIA-START
* MEDIA-STOP
* MEDIA-STATISTICS
* MEDIA-REDIRECT-START
* MEDIA-REDIRECT-STOP
* MEDIA-RESTART
* MEDIA-DTMF
* MEDIA-TONE
2022-11-28 15:04:15 +00:00
Bernhard Dick c42800fa4d DECT-MITEL-ETH: Fix filter name 2022-11-28 15:04:15 +00:00
Bernhard Dick 7e5d5c2ddf DECT-MITEL-ETH: Improve MCEI dissection
Transfer dissection of MCEI field into own function and dissect MCEI in
messages where it was missing.
2022-11-28 15:04:15 +00:00
Bernhard Dick 6f216b9dbb DECT-MITEL-RFP: Remove unused assignments 2022-11-28 15:04:15 +00:00
Bernhard Dick 792fdf05ca DECT-MITEL-ETH: Remove unused assignment 2022-11-28 15:04:15 +00:00
Bernhard Dick 863f7d902d DECT-MITEL-ETH: Fix function naming 2022-11-28 15:04:15 +00:00
Bernhard Dick 7fcf2f8d36 DECT-MITEL-RFP: Improve protocol tree structure 2022-11-28 15:04:15 +00:00
Bernhard Dick 6fd2c267b4 DECT-MITEL_RFP: Honour work from zivillian
The dissection of the DECT-MITEL-RFP protocol is based upon findings
that resulted in rfpproxy, so I think it is a good idea to also name the
author in the source file
2022-11-28 15:04:15 +00:00
Bernhard Dick 8a05fc6a2a DECT-MITEL-RFP: Add SYS-IP-OPTIONS dissection 2022-11-28 15:04:15 +00:00
Bernhard Dick ca540b120a DECT-MITEL-ETH: Improve protocol tree
Put DECT-MITEL-ETH content beneath a tree item in the protocol tree and
use own indices for all different subtree types
2022-11-28 15:04:15 +00:00
Bernhard Dick de7594f58d DECT-MITEL-ETH: Add more RFPc item dissections
Add dissection for the following RFPc message item types:
* Revision
* RFPI
* Higher layer capabilities
* MAC capabilities
* Statistics data
* RFP_PLI
* Extended capabilities
2022-11-28 15:04:15 +00:00
Bernhard Dick 4c9da8039f DECT-MITEL-ETH: Begin dissection of RFPc
Add basic function to dissect RFPc messages and dissection of the RFPc
Extended capabilities message
2022-11-28 15:04:15 +00:00