Commit Graph

84565 Commits

Author SHA1 Message Date
Moshe Kaplan 1fdbc65394 tools: Port colorfilters2js.pl to colorfilters2js.py
Port colorfilters2js.pl to Python.
Slight differences in output code formatting,
but is otherwise consistent.
Ping #18152
2022-06-28 19:05:29 +00:00
Dr. Lars Völker 487165dd50 DoIP: Support UAT for User defined payload types
This patch allows user defined payload types to have names.
2022-06-28 18:38:53 +00:00
Martin Mathieson 33031c8955 Make some variables in packet-grebonding.c static. 2022-06-28 16:51:35 +01:00
Roland Knall c3b2cec3f2 Ui: Cleanup row number and select packet
Remove unneeded row number in capture file. The packet list is
the only object that should know the correct number, propagating
it further only complicates things. At the same time, rework
cf_select_packet to select the packet based on frame_data not on
the row (which can be unreliable).
2022-06-28 14:56:06 +02:00
Roland Knall f210edeaf0 Ui: Further simplify ws_ui_util
Remove duplicate functionality for jumping to packet and
remove unused function to move to the end. Furthermore
move the code for redraws of visible packets directly
into the calling code
2022-06-28 14:39:27 +02:00
Roland Knall ef8ed9dff9 Ui: Remove time column reformat callback
The code can be placed directly to packet list model
and does not need to be a generic callback
2022-06-28 14:23:05 +02:00
Roland Knall 1d42fcdd76 Ui: Remove call to recoloring
No callback needed, we can call the model directly
2022-06-28 14:06:49 +02:00
Roland Knall 865141e61b Ui: Remove unused prototype declaration
The functions are nowhere implemented
2022-06-28 11:34:22 +02:00
Roland Knall b6226cb136 Qt: Better handle sort restriction
Setting sorting enabled/disabled resorts the list. If this happens
too often, sometimes it can lead to the physical view models
not present anymore and therefore crashing.

Ping #18159
2022-06-28 10:12:24 +02:00
John Thacker 4ed4678859 Qt: Make the Resolve Names buttons checkable again
The checkable property got lost at some point, rendering it impossible
to make columns resolved.
2022-06-27 20:26:08 -04:00
Gerald Combs 7c96053f3b Version: 3.7.1 → 3.7.2
[skip ci]
2022-06-27 12:10:57 -07:00
Gerald Combs 5ee0b97c96 Build: 3.7.1
[skip ci]
2022-06-27 10:05:04 -07:00
Gerald Combs eaae2d0ee7 Minor Python3 script fixups.
Make some scripts executable and use the shebang line recommended at
https://docs.python.org/3/using/unix.html#miscellaneous
2022-06-27 16:46:55 +00:00
Gerald Combs 4153af1dc7 wslua: Port make-init-lua to Python3
Port the script that creates init.lua to Python3. The generated init.lua
removes one newline and adds another, otherwise the output is identical
to the Perl version.
Ping #18152.
2022-06-27 16:28:36 +00:00
Gerald Combs ae3010cabe wslua: Port make-taps to Python3
Port the script that creates taps_wslua.c and taps.txt to Python3. The
generated taps_wslua.c has one less newline, otherwise the output is
identical to the Perl version. Make the "taps" configuration file an
ConfigParser / .ini file.
Ping #18152.
2022-06-27 16:11:34 +00:00
Gerald Combs dac75fba7f CMake: Bump the minimum Python version to 3.6.
Make Python 3.6 the minimum required version. Version 3.6 added support
for f-strings.
2022-06-27 15:54:40 +00:00
Roland Knall 8bdff72625 dfilter: Fix undefined dereference and add null check
A value of ref could be accessed undefined and add additional
checks to ensure, that refs_array actually contains data or return
null immediately
2022-06-27 14:57:01 +00:00
Roland Knall 7f951eda3e Qt: Increase animation speed for progress frame
The progress frame animation is so slow, that it might not show
up on certain setups. Reduce the initial speed and duration for
the animation, which also speeds up calculations as well as dissection
as less animation has to be rendered/calculated
2022-06-27 14:03:34 +00:00
Dr. Lars Völker d562cc3033 PTP: Improved robustness on wrong 2-step flag and 1-step
This code adds more robust handling of smaller issues with PTP messages,
like a missing 2-step flag of a not quite correct implementation of
802.1AS and improves 1-step support.

Changes:
- Handle 1-step syncs in analysis.
- Handle missing 2-step flag on pDelay more robust and warn in analysis.
- Handle missing F'up TLV in 802.1AS Sync more robust and warn.
2022-06-27 13:23:27 +00:00
John Thacker 26b0a0a8d3 stun: Tighten heuristic by rejecting restricted values
Reject the previous reserved and unassigned TURN channels and
STUN methods restricted by RFC 5764 and RFC 7983 to allow
multiplexing of STUN with DTLS-SRTP (and ZRTP) on the same
addresses and ports. (As an exception, allow the special MS
Multiplex TURN channel value.) Earlier versions of the specs
had these as unassigned (or did not support TURN Channels), and
no implementation has used them.

This prevents the STUN dissector from claiming RTP packets
going to the same port as set for STUN by Decode As, and should
allow us to set the STUN dissector as the dissector for a conversation
on UDP if we see any STUN message, not just a TURN message type.
2022-06-27 08:56:44 -04:00
Jo-Philipp Wich 1433104479 IEEE1905: fix IPv6 type TLV parsing
- Declare a separate type for the IPv6 TLV MAC address, otherwise its
   filter key is `ieee1905.ipv4_type.mac_addres` instead of the expected
   `ieee1905.ipv6_type.mac_addres` one which is confusing

 - Fix label for `hf_ieee1905_ipv6_type_count` to read "IPv6 address count"
   instead of the wrong "IPv4 address count"

 - Parse the IPv6 link local address which appears between the EUI-48 and
   the IPv6 address count in IPv6 type TLVs, without that, valid IPv6 TLVs
   are wrongly parsed and reported as malformed

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-06-27 11:47:57 +00:00
Dr. Lars Völker 2c9675b759 TECMP: fix typo 2022-06-27 11:31:35 +00:00
John Thacker dda4af1fc5 STUN: Update some comments 2022-06-26 15:03:23 -04:00
Gerald Combs b5e1e63dd0 [Automatic update for 2022-06-26]
Update manuf, services enterprise numbers, translations, and other items.
2022-06-26 17:40:36 +00:00
Roland Knall 006d20db9e Qt: Only sort if there are actually lines to sort
Remove the sort for physical rows, if there are no rows to sort

Ping #18159
2022-06-26 15:59:41 +00:00
John Thacker cc52ef4d12 STUN: Fix MS-IMPLEMENTATION-VERSION value string
MS-IMPLEMENTATION-VERSION is not a duplicate of MS-VERSION, and
has a different interpretation. MS-VERSION is the version number
of MS-TURN, its values described in 2.2.2.17 of its spec, and
MS-IMPLEMENTATION-VERSION is the version of MS-ICE2, its values
described in section 3.1.5.2 of its spec.

The latter indicates whether the STUN message format must be that of
Internet-Draft behave-rfc3489bis-02 (that is, roughly the final
form of classic STUN, also used in MS-TURN) or whether that of
RFC 5389 is also supported.
2022-06-25 23:01:26 -04:00
John Thacker e49a69f361 HTTP: Add chunks as items instead of calling data dissector
HTTP chunked transfer encoding can have lots of chunks, and calling
the data dissector for each individual chunk adds a large number of
layers to the frame and doesn't really make sense. (As opposed to
calling the data dissector on the reassembled data if we can't handle
the content type, which does make sense.) In particular, this can
cause a failed assertion by adding more layers than
PINFO_LAYER_MAX_RECURSION_DEPTH.

Just add each data chunk as a FT_BYTES item. Fix #18130.
2022-06-25 20:28:10 +00:00
João Valverde efbe699756 dfilter: Remove STTYPE_RANGE_NODE
STTYPE_RANGE_NODE is just a lexical token, it is
not used withi the syntax tree so remove it.
2022-06-25 16:06:48 +01:00
João Valverde aaff0d21ae dfilter: Add layer support for references
This adds support for using the layers filter
with field references.

Before:
    $ dftest 'ip.src != ${ip.src#2}'
    dftest: invalid character in macro name

After:
    $ dftest 'ip.src != ${ip.src#2}'
    Filter: ip.src != ${ip.src#2}

    Syntax tree:
     0 TEST_ALL_NE:
       1 FIELD(ip.src <FT_IPv4>)
       1 REFERENCE(ip.src#[2:1] <FT_IPv4>)

    Instructions:
    00000 READ_TREE		ip.src <FT_IPv4> -> reg#0
    00001 IF_FALSE_GOTO	5
    00002 READ_REFERENCE_R	${ip.src <FT_IPv4>} #[2:1] -> reg#1
    00003 IF_FALSE_GOTO	5
    00004 ALL_NE		reg#0 != reg#1
    00005 RETURN

This requires adding another level of complexity to references.
When loading references we need to copy the 'proto_layer_num'
and add the logic to filter on that.

The "layer" sttype is removed and replace by a new
field sttype with support for a range. This is a nice
cleanup for the semantic check and general simplification.
The grammar is better too with this design.

Range sttype is renamed to slice for clarity.
2022-06-25 14:57:40 +01:00
João Valverde e9e6431d7b dfilter: Change boolean string representation
Use "True" or "TRUE" instead of "true" and remove case insensivity.
Same for false. This should serve to differentiate booleans a bit
more from protocol names, which should be using lower-case.
2022-06-25 13:02:34 +01:00
João Valverde 229dad6a75 X509IF: Fix duplicate filter name
Fixes #18155.
2022-06-24 21:10:45 +00:00
João Valverde 8793650707 dftest: Print ftype of protocol fields 2022-06-24 21:10:45 +00:00
João Valverde f1902c643e Regenerate ASN.1 dissectors 2022-06-24 21:10:45 +00:00
João Valverde 0dbd0a6903 Qt: Fix endianness for an IPv4 value
ws_in4_addr is in network byte order (big endian) so convert from
BE to host byte order, not the other way around.
2022-06-24 20:26:38 +00:00
Gerald Combs d3e2f1053b Doc: Port make-authors-short to Python3.
Port the script that creates AUTHORS-SHORT to Python3.
Ping #18152.
2022-06-24 18:32:50 +00:00
Gerald Combs 602e87d6c5 Make sure our Python scripts read and write UTF-8.
Explicitly set "encoding='utf-8'" for each of the files we read and
write in make-reg.py and generate_authors.py.
2022-06-24 11:08:37 -07:00
Moshe Kaplan 26f87b3250 wslua: Port epan/wslua/make-reg.py to Python3
Port the script that creates
declare_wslua.h and register_wslua.c
to Python3.
Ping #18152.
2022-06-24 15:02:38 +00:00
Moshe Kaplan acb8158033 Tools: Port tools/generate_authors.py to Python3.
Port the script that creates AUTHORS to Python3.
Ping #18152.
2022-06-24 08:05:50 +00:00
Jim Young a9bcbaf738 DNS: Note and dissect any extraneous payload bytes 2022-06-24 08:04:40 +00:00
Eelco Chaudron e79630f1d9 Frame: Fix segmentation dump when parsing packet_verdict
This change fixes a segmentation fault core dump in tshark/Wireshark
when loading a pcapng file that contains the packet verdict option.

This problem got introduced in the commit mentioned below.

Fixes: 030b06ba3c ("pcapng: write packet and Netflix custom blocks the same as other blocks.")
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
2022-06-24 00:02:29 +00:00
Thomas Vogt 95b01dc4bf GREbond: Add support for Huawei's GRE bonding (RFC8157) control protocol
This dissector is for the control messages of the GRE bonding protocol by
Huawei. These messages are encapsulated in GRE and can appear on both/all
bonding links.

During development, I made heavy use of traffic for Deutsche Telekom Hybrid
service. There fore, it also supports the first version which did not have an
IEEE assigned ethertype.
2022-06-23 19:40:25 +00:00
Dr. Lars Völker 181a7c7d7d Signal-PDU: Fix performance degradation on config switch
By adding signal aggregation the time to change profiles changed
dramatically. This is due to unregistering header fields being a very
slow operation and for aggregation each signal line did not lead to 2
but to 5 hfs.

Unregistering header fields for 150k signal example config (debug build):
- 3.6: 	 50s
- 3.7: 	592s (9:52!!!)

This patch brings the time back to 50s, if no aggregation is configured.
2022-06-23 19:24:17 +00:00
João Valverde d7322e757e epan: Use host byte order with AT_NUMERIC
Use host byte-order with AT_NUMERIC to make it more generic
and practical.

Change openSAFETY to pass addresses in host byte-order (the
previous code assumed they were in little-endian).

Plus a few cleanups.
2022-06-23 16:58:07 +01:00
Roland Knall 0079058837 openSAFETY: Define broadcast address globaly 2022-06-23 16:34:07 +02:00
Joerg Mayer 342af4727d Cisco Mis-Cabling Protocol: Support strict mode PDUs
Content of the new Type is still to be determined.
Also hack around an unsolved "mystery".
2022-06-23 12:09:10 +02:00
Roland Knall 4c768f54a7 epan: Make AT_NUMERIC behave more safely
Implement a better handling of byte sizes as well as preventing
possible memory bleeds

Fixes: 18147
2022-06-23 11:00:51 +02:00
Chuck Craft 39fc49b792 wsdg: escape tick marks after backtick; fix typo 2022-06-22 18:55:27 -05:00
Chuck Craft ff4663931c wsdg: docbook\README.adoc - filename 2022-06-22 16:27:21 +00:00
Roland Knall 2e5b09f486 Qt: Fix compiler warning on macOS 2022-06-22 17:52:15 +02:00
Roland Knall 1424e28c7d Qt: Fix stream id display in context menu
It was displayed for every protocol, but should only be displayed
for TCP and UDP alone
2022-06-22 15:48:51 +02:00