Commit Graph

88435 Commits

Author SHA1 Message Date
João Valverde 1d0c142a9a GUI: Implement Tools->MAC Address Blocks menu entry
Add a dialog to lookup a MAC address or vendor name in the\
internal IEEE manufacturer registry.
2023-07-30 20:54:28 +00:00
Gerald Combs d5fb4db20c [Automatic update for 2023-07-30]
Update manuf, services enterprise numbers, translations, and other items.
2023-07-30 19:52:02 +00:00
John Thacker 788be03d90 debian: New lintian override format
lintian changed its hint forma to a new "pointed hint" format
with filenames in square brackets, invalidating our overrides
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1007002

Try to eliminate the resultant mismatch-override warnings.
2023-07-30 01:46:35 +00:00
Gerald Combs 66cc899624 GitLab CI: Fix up our manuf header 2023-07-29 14:12:43 -07:00
Markku Leiniö b1f00bc411 UI: Fix path separators for profiles 2023-07-29 19:04:39 +03:00
John Thacker ad6cedb564 debian: Add missing symbols
[skip ci]
2023-07-29 07:04:57 -04:00
John Thacker 4052d2c7f4 debian: Override lintian embedded-library complaint about manuf data
Lintian errors out because we embed the manuf data from the CSV files
into static C arrays. Override that.
2023-07-29 06:41:02 -04:00
Van Ly Vu 5eb3fdc47a Fix typo for field wlan.wfa.ie.wpau.cs.oui 2023-07-29 03:24:06 +00:00
João Valverde a582dc8ae5 manuf: Add ws_manuf_count() 2023-07-28 21:07:44 +00:00
João Valverde 9179ba9667 manuf: More cleanups
Rename function to use the ws_manuf namespace.

Make all the interface functions public.
2023-07-28 21:07:44 +00:00
João Valverde 341c03713f manuf: Move private declarations out of header 2023-07-28 21:07:44 +00:00
Gerald Combs 4838556b3a GitLab CI: Move manuf to the Code Lines job
Code Lines does a full build.
2023-07-28 11:35:16 -07:00
Gerald Combs af2830be7b GitLab CI: Build manuf
Add manuf to the documentation job.
2023-07-28 18:17:57 +00:00
Gerald Combs 36e7876851 GitLab CI: Restrict "web" pipeline sources
Restrict our "web" pipeline sources to the master branch in the main
repository similar to "push"es.
2023-07-28 17:44:32 +00:00
Gerald Combs 6897e5cd04 Docs: Document `tshark -G {manuf,services,enterprises}`
Add manuf, services, and enterprises to the `-G` section in the tshark
man page.
2023-07-28 17:43:16 +00:00
Ismael Mendez Matamoros b14d514541 RTPS: New algorithm PIDs values set woth their final values
Set the PIDs of the new algorthms with their final values
2023-07-28 13:22:30 +02:00
Ivan Tan 74406642ae ieee802.11be draft2.0:Fix mlo assoc response && EHT NDP Announcement 2023-07-28 06:20:15 +00:00
Markku Leiniö a9241ef14e Change data size formatting to use SI units and 0 precision 2023-07-28 02:22:18 +00:00
Guy Harris 4c5c969023 Clean up the cleaning-up of wtap_dump_params structures.
Use wtap_free_idb_info() to clean up the idb_inf member, rather than
duplicating what wtap_free_idb_info() does.

Don't call wtap_block_array_free() on the shb_hdrs member and then call
wtap_dump_params_cleanup() on the entire structure - that causes a
double-free of the SHB headers.

In text2pcap.c, have a routine that calls wtap_free_idb_info() and then
calls wtap_dump_params_cleanup(), and replace that sequence of calls
with calls to the routine.

Fixes #19235.
2023-07-27 13:31:05 -07:00
João Valverde b3e09c65d3 manuf: Mask out broadcast flag 2023-07-27 17:46:03 +00:00
João Valverde 0ebe3bc0d4 manuf: Improve iteration logic
Fill the temporary buffer with existing entries only. Use
a for loop to iterate and select the smallest.
2023-07-27 17:46:03 +00:00
João Valverde 611bf80be3 manuf: Code cleanup
Make global_manuf_lookup() return a struct ws_manuf pointer.

Use a function to handle each switch case.
2023-07-27 17:46:03 +00:00
João Valverde d2e85d783c Update release notes 2023-07-27 18:09:31 +01:00
João Valverde 7f06df2d0c Add tshark -G services 2023-07-27 18:09:27 +01:00
João Valverde 734a675938 Add description to IANA services table 2023-07-27 15:40:29 +01:00
João Valverde a3142d25bf Add tshark -G enterprises 2023-07-27 15:40:25 +01:00
Eugène Adell 939a9fb0a7 TCP: Summarize the completeness bitmask as a string 2023-07-27 07:34:52 +00:00
John Thacker 5218affca5 debian: Add missing symbols 2023-07-26 21:29:57 -04:00
John Thacker 75585a7607 http: Don't create extra TCP streams and conversation data
Don't just call get_tcp_conversation_data in the HTTP dissector,
because HTTP is not necessarily over TCP, and that ends up creating
extra TCP streams and conversation data in such cases (e.g., SSDP
over UDP, or HTTP over SCTP, also some proxied connections.)

Instead, just determine the direction the same way that the TCP
dissector does using addresses and ports, because that's all that's
being used here.
2023-07-26 23:26:12 +00:00
Maxim Kolesnikov 6b630a65dc PROXYv2: support coalesced packets
Call next dissector when there is data remaining after dissection the same way PROXYv1 dissector does

Closes #19208
2023-07-26 23:18:06 +00:00
Alexis La Goutte 0f7b431de4 cql: fix Dead Store found by Clang Analyzer 2023-07-26 07:09:44 +00:00
John Thacker edd0517fae Websocket: Restore the text payload field
Add back the websocket.payload.text field, always displaying the
unmasked payload, so that the entire payload string can be filtered
or added to the info column.

Fix #19220
2023-07-25 23:29:36 -04:00
João Valverde dae58c9a69 manuf: Add table dump with tshark -G 2023-07-26 00:13:32 +00:00
Vadim Yanitskiy a6bd924c0a GSM A DTAP: fix value-string for Signalling Access Protocol
Last time this value-string was edited in 959a290961, and before
this commit there was only one value (all other values resevred):

  case 0x01: str = "According to ITU-T Rec. Q.920 and ITU-T Rec. Q.930";
  case 0x02: str = "Reserved: was allocated in earlier phases of the protocol";
  case 0x03: str = "Reserved: was allocated in earlier phases of the protocol";
  case 0x04: str = "Reserved: was allocated in earlier phases of the protocol";
  case 0x05: str = "Reserved: was allocated in earlier phases of the protocol";
  case 0x06: str = "Reserved: was allocated in earlier phases of the protocol";
  default:   str = "Reserved";

This matches the definition of the "Signalling access protocol (octet 5)"
in recent version (17.8.0, 2022-10) of 3GPP TS 24.008.  However, the
above-mentioned commit replaced the switch statement with a value-string
conforming neither 3GPP TS 24.008, nor the earlier GSM 04.08.

Let's revert back to the correct description, and additionally take
a chance to specify the old meaning of reserved values (from GSM 04.08).
2023-07-26 00:00:21 +00:00
Darius Davis 36c6616b7d telnet: Simplify handling of Telnet option lookup.
Handling telnet options by their "tn_opt" structure pointer allows for
elimination of some duplicated logic and will make it easier to add support for
Telnet options which are not consecutively numbered.  Unknown options are
handled through a special tn_opt just for that purpose.  Behavior should be
unchanged.

While we're here, constify the option table.
2023-07-25 22:42:29 +00:00
Huang Qiangxiong 0fd01fbd6d HTTP2: Modified to use common streaming reassembly helper function
The reassemble_streaming_data_and_call_subdissector() of 'epan/reassemble.c'
is originated from the mechanism of HTTP/2 streaming reassembly and have
some enhancements. Making HTTP/2 to use this common helper function is beneficial
for resolving common streaming reassembly issues encountered in the future.

Add '-2' in test/suite_dissection.py because some reassembly issues may
happen in second pass.
2023-07-25 20:51:53 +00:00
Huang Qiangxiong edbb5272ac Reassembly: add additional_bytes_expected_to_complete_reassembly function
Get how many additional bytes are expected to complete current streaming
reassembly. Used to check if the current streaming reassembly is complete.
2023-07-25 20:51:53 +00:00
Eugène Adell 783918a93b IRC: Interpret CTCP commands with a Name Only protocol 2023-07-25 19:19:34 +00:00
David Johansen a6bab78815 Add H.265 to video codecs 2023-07-25 17:39:08 +00:00
João Valverde b4a421cf82 Replace "manuf" files with static arrays
To reduce startup external file parsing replce the manuf file with
static arrays compiled into the binary.

Add 3 tables for MA-L, MA-M and MA-S. Add a fourth table to direct
a 24-bit MAC prefix (OUI) to one of these tables.

Adapt the make-manuf.py script to generate the static C data
instead of the text file.

The arrays are sorted and a binary search is performed to map
an OUI (24bit/28bit/36bit) to a short and long name.
2023-07-25 16:23:26 +00:00
Yaniv Kaul 7e08afb478 packet-cql.c: fix ERROR message parsing
offset parameter was not moved forward by 4 bytes, causing ERROR messages not to be parsed properly.

Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com>
2023-07-25 12:46:35 +00:00
João Valverde 74bfa8a03d dfilter: Remove deprecated ~= operator symbol 2023-07-25 12:18:16 +00:00
João Valverde ca8976020f dfilter: Change "not in" behaviour to match inequality
"A not in S" is now implemented as "A and A not_in S"
instead of "not (A in S)".

"not A in S" is implemented as "not A or A not_in S".

This is to be consistent with the way inequality has historically
worked, where "A != B" is not the same as "not A == B".

Maybe we should change both propositions to have inequality
be the same as not equality instead.

Fixes #19187.
2023-07-25 12:17:25 +00:00
John Thacker 1b82eda9eb epan: Register dynamic column fields and make them filterable
Make the text of each registered column a FT_STRING field that can be
filtered, prefixed with _ws.col - these work in display filters, filters
in taps, coloring rules, Wireshark read filters, and in the -Y, -R, -e,
and -j options to tshark. Use them as the default "Apply as Filter" value
for the columns that aren't handled by anything else currently.

Because only the columns formats that actually correspond to columns
get filled in (invisible columns work), register and deregister the
fields when the columns change.

Use the lower case version of the rest of the COL_* define for each
column as the field name.

This adds a number of conditions to "when are the columns needed",
including when the main display filter or any filter on a tap is
using one of these fields.

Custom columns are currently not implemented. For custom columns, the
tree then has to be further primed with any fields used by the custom
columns as well. (Perhaps that should happen in epan_dissect_run() -
are there any cases where we construct the columns and don't want to
prime with any field that custom columns contains? Possibly in taps
that we know only use build in columns.)

Thus, for performance reasons, you're better off matching an ordinary
field if possible; it takes extra time to generate the columns and many
of them are numeric types. (Note that you can always convert a non-string
field to a string field if you want regex matching, consult the
*wireshark-filter(4)* man page.) It does save a bit on typing (especially
for a multifield custom column) and remembering the column title might
be easier in some cases.

The columns are set before the color filters, which means that you
can have a color filter that depends on a built-in column like Info or
Protocol.

Remove the special handling for the -e option to tshark. Note that
the behavior is a little different now, because fixed field names
are used instead of the titles (using the titles allowed illegal
filter names, because it wasn't going through the filter engine.)
For default names, this means that they're no longer capitalized,
so "_ws.col.info" instead of "_ws.col.Info" - hopefully a small
price in exchange for the filters working everywhere.

The output format for -T fields remains the same; all that special
handling is removed (except for remembering if someone asked for
a column field to know that columns should be constructed.)

They're also set before the postdissectors, so postdissectors can
have access.

Anything that depends on whether a packet and previous packets are
displayed (COL_DELTA_TIME_DIS or COL_CUMULATIVE_BYTES) doesn't work
the way most people expect, so don't register fields for those.
(The same is already true of color filters that use those, along with
color filters that use the color filter fields.)

Fix #16576. Fix #17971. Fix #4684. Fix #13491. Fix #13941.
2023-07-25 00:49:52 +00:00
Peter Wu 99ef0560b7 zabbix: fix buffer overflow in zabbix_desegment preference
The `sizeof(bool)` is 1 byte whereas `prefs_register_bool_preference`
expects a `gboolean` of size 4 bytes. Caught by ASAN at startup.

Fixes: v4.1.0rc0-3228-g261c2f24cc ("Add Zabbix protocol dissector")
2023-07-25 00:40:49 +02:00
João Valverde d138e594b5 dfilter: Fix `all .. in` operator semantics
Fix the "all X in S" expression to be implemented as

    (x1 in S) AND (x2 in S) AND ... AND (xn in S)

Previously it was implemented as

    (X all_eq s1) OR (X all_eq s2) OR ... OR (X all_eq sn)

which does not implement set membership semantics correctly.

The implementation uses a list to build the set and the
set membership test is done with a SET_*_IN instruction
that tests if a register belongs to the set (list contents).

Example:

    Filter:
     all tcp.port in {10..15,20,30}

    Instructions:
     0000 READ_TREE        tcp.port         -> R0
     0001 IF_FALSE_GOTO    7
     0002 SET_ADD_RANGE    10 .. 15
     0003 SET_ADD          20
     0004 SET_ADD          30
     0005 SET_ALL_IN       R0
     0006 SET_CLEAR
     0007 RETURN

Fixes  #19188.
2023-07-24 22:25:33 +00:00
João Valverde f743fa5249 dfilter: Refactor DFVM values
Use a GPtrArray of length one to store fvalues in a
dfvm_value_t. This simplifies our internal logic by
using the same underlying representation for register
contents and constant values and allows us to take
advantage of the existing reference counting support
of GPtrArray.
2023-07-24 22:25:33 +00:00
Markku Leiniö 261c2f24cc Add Zabbix protocol dissector
Features:
- Supports also compressed and TLS-encrypted Zabbix connections as well
  as TCP desegmenting
- Dissects both passive agent connections (10050/tcp, plaintext-based)
  and active agent, proxy and sender/trapper connections (10051/tcp,
  JSON-based), ports are configurable
- Detects passive agent conversations by checking the request being
  non-JSON (not depending on the well-known TCP ports)
- Calculates response times using protocol data saved in conversations
- Detects the connection type (proxy, agent, sender/trapper) and shows
  tree and Info column information accordingly
- Dissects protocols up to Zabbix version 6.4 (currently latest) and
  7.0 (currently in alpha)
- Does not support passive agent connections in Zabbix 3.x or earlier
  (it does not have the normal Zabbix header; note that Zabbix 4.0 was
  released in 2018)
2023-07-24 17:38:15 +03:00
Gerald Combs 6885d787fd [Automatic update for 2023-07-23]
Update manuf, services enterprise numbers, translations, and other items.
2023-07-23 18:17:07 +00:00
Gtker 207321b4b1 woww: Fix inconsistencies 2023-07-23 19:30:17 +02:00