aboutsummaryrefslogtreecommitdiffstats
path: root/epan
AgeCommit message (Collapse)AuthorFilesLines
2022-05-31epan: Don't free epan-scoped memory.Gerald Combs1-1/+0
e6a8318f18 allocated our element list map key in epan scope. Don't try to free it.
2022-05-29epan: Remove conversation_create_endpoint options.Gerald Combs5-8/+7
The "options" paramameter was never used, so remove it.
2022-05-29[Automatic update for 2022-05-29]Gerald Combs1-0/+1
Update manuf, services enterprise numbers, translations, and other items.
2022-05-29TCP: Don't add [TCP segment of a reassembled PDU] to the second PDUJohn Thacker1-2/+8
When desegmenting, don't add [TCP segment of a reassembled PDU] to the INFO column if we've already dissected a complete PDU in this frame. This is for the same reasons that we set a fence in the INFO column and set the PROTOCOL column to be not writable. It's not of particular interest that this frame also contains the start of a new PDU when the INFO column has information about a complete higher level PDU. The information about the other PDU is contained in the tcp tree elements. Fix #15494
2022-05-29TCP: Report reassembled in for more PDUs where we know itJohn Thacker1-49/+58
In the case where the beginning of a TCP segment does not continue a higher-level PDU, but the end of the segment is the beginning of another PDU, we don't need to create the MSP for the second PDU after the first time we visit the packet. However, we do want to retrieve that MSP for determining in which frame the second PDU was reassembled. Make "Reassembled PDU in frame:" messages be added in that case like it already is for other frames with MSPs.
2022-05-28TCP: reset addresses and ports after each segmentJohn Thacker1-5/+79
TCP can contain multiple PDUs of the next layer protocol, and the subdissector (or further subdissectors called from it) can change the addresses and ports. However, the addresses and ports are used for the desegmentation tables at the TCP level, as well as for various purposes in encapsulated protocols. Restore the addresses and ports values of packet_info before each PDU, and in desegment_tcp after returning from a subdissector. When leaving desegment_tcp ensure that the addresses and ports are set to whatever they were after the last subdissector call that successfully desegmented a PDU. Fix #2345. Fix #9782.
2022-05-28TCP: Handle additional data requested with ooo reassemblyJohn Thacker1-69/+14
The test for "old_len" with a reassembled MSP has never been accurate for out of order reassembly, where it caused additional data requested to be taken from the end of the current frame instead of from the correct portion of the reassembled MSP, which could be from an out of order frame (later in sequence, but arrived earlier.) The test is unnecessary - the other case, where we need more data but there's more in the current frame is already handled by looping again. This fixes reassembly where TCP is out of order and those out of order segments don't align on PDU boundaries. Fix #13317. Also fix a minor issue in the same situation where the length of the current segment was indicated incorrectly for out of order frames contributing to multiple MSPs.
2022-05-28Make a couple of functions static.Martin Mathieson2-2/+2
2022-05-28Zigbee: Touchlink typoDana Sy1-1/+1
Fixed typo for Touchlink command filter name
2022-05-28Zigbee: Touchlink missing info fieldDana Sy1-0/+14
Added in the profile interop bit for the Touhlink information field.
2022-05-27EOBI: Disable dissector by defaultUli Heilmeier1-0/+1
The EOBI dissector has no heuristic and is using several nonstandardized high ports. Therefore disabling it by default. Fixes #18103
2022-05-27O-RAN: Fix offset extension 10 and beam vector listUli Heilmeier1-5/+5
Increment offset and use numPortc for number of beam vector list items Fixes: #18116
2022-05-27lrexlib: Disable a warning [-Wshorten-64-to-32]João Valverde1-0/+1
The warning is harmless and we want to keep upstream code as pristine as possible (unless there is a real issue in the code of course) so disable the warning.
2022-05-26epan: Fix our conversation key lifetimes.Gerald Combs1-41/+36
wmem_map doesn't copy keys, so we need to keep them around.
2022-05-26lrexlib: Pacify checkAPIsJoão Valverde2-4/+9
2022-05-26Lua: Add lrexlib-pcre2 Lua regex bindingsJoão Valverde11-2/+2082
Add the de facto standard Lua regex API to Wireshark. Upstream code is copied verbatim and the module opened in the "rex" table. This is just a user convenience and developer quality of life improvement over the GRegex Lua API because it has always been possible to load lrexlib-pcre2 as a Lua module from Wireshark.
2022-05-26Lua: Remove on-life-support GRegex bindingsJoão Valverde8-1722/+2
This code has been unmaintained and does not pass the lrexlib test suite. GRegex itself has been obsolescent for some time, although GNOME has recently restarted trying to move it to PCRE2. Remove it in preparation for a move to lrexlib-pcre2.
2022-05-26tcp: Split MSPs in out of order processingJohn Thacker3-53/+276
When processing segments out of order in TCP, it is possible to get new segments that fill a sequence gap and be able to dissect at least one PDU but need more data for additional PDUs (that have data from the contiguous stream bytes.) We can only determine this after passing the reassembled segments to the subdissector first. To keep dissection and layer numbers consistent between passes, split the multisegment PDU, keeping the already dissect PDU(s) in the current reassembly and creating a new MSP for the parts not yet dissected. Update the dissection test to enable the currently skipped test that require MSP splitting and remove test_tcp_out_of_order_twopass_with_bug
2022-05-25MSYS2: Fix compilation errorJoão Valverde1-2/+2
2022-05-25epan+Qt: Add element tables to the ConversationHashTablesDialog.Gerald Combs2-0/+14
Add get_conversation_hashtables() and use it to populate the conversation hash tables dialog.
2022-05-25conversation(.h): Fix -WdocumentationAlexis La Goutte1-4/+4
2022-05-25USB: Sanitize USB 2.0 endpoint max packet sizeTomasz Moń5-31/+263
Introduce Wireshark specific enum to facilitate USB speed specific dissection. Any similarity of actual enum values with any protocol is coincidence and should not be relied upon. Rename speed defines in USBIP dissector to not collide with Wireshark USB speed enum. The values used in USBIP are implementation specific. Allow user to set capture speed in USBLL dissector preferences. Use the selected speed in USB dissector to sanitize endpoint maximum packet size value based on speed specfic requirements from USB 2.0 specification. Close #18062
2022-05-25epan: Allocate a conversation key.Gerald Combs1-6/+6
Blind attempt at fixing #18113.
2022-05-25epan: Lazily create conversation dissector trees.Gerald Combs1-6/+20
Create our dissector tree maps only when we need them. Fixes #18109.
2022-05-25gprscdr: Update to 3GPP TS 32.298 V17.2.0Joakim Karlsson2-2/+2
Only documentation changes, no new c file is generated
2022-05-25ORAN FH-CUS: Section type 5 has ef field.Martin Mathieson1-0/+1
2022-05-24epan: Switch the conversation IDs back to guint32s.Gerald Combs2-21/+20
Switch the _by_id IDs back to guint32s. None of the current callers need 64 bits and if someone needs 64-bit IDs they can use conversation_new_full.
2022-05-24epan: Switch some _by_id conversation routines to elements.Gerald Combs15-53/+91
Switch the non-endpoint *_by_id conversation routines to use element lists. Change the ID type from guint32 to guint64. None of them used the address+port option flag arguments, so remove them.
2022-05-24PDCP-NR: Fix a test (flagged by coverity)Martin Mathieson1-2/+4
2022-05-24SIP: Add a filter for VIA parameter be-routeAnders Broman1-4/+20
2022-05-24SIP: Handle short frame in dissect_sip_sec_mechanism()Anders Broman1-0/+2
2022-05-24PDCP-NR: Add separate UL/DL expert info ei items for missing SNsMartin Mathieson1-5/+13
2022-05-23Try to fix some warnings.João Valverde1-6/+17
[1638/2312] Building C object epan/ftypes/CMakeFiles/ftypes.dir/ftype-protocol.c.o FAILED: epan/ftypes/CMakeFiles/ftypes.dir/ftype-protocol.c.o /usr/bin/ccache /usr/bin/cc -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DWS_BUILD_DLL -I. -I../ -I../include -Iepan/ftypes -I../epan/ftypes -I../epan -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -fvisibility=hidden -fexcess-precision=fast -Wall -Wextra -Wendif-labels -Wpointer-arith -Wformat-security -fwrapv -fno-strict-overflow -Wvla -Waddress -Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wpragmas -Wno-overlength-strings -Wno-long-long -Wredundant-decls -Wno-error=maybe-uninitialized -Wno-format-truncation -Wframe-larger-than=32768 -fdiagnostics-color=always -Wunused-const-variable -Wshadow -Wold-style-definition -Wstrict-prototypes -Wlogical-op -Wjump-misses-init -Werror=implicit -Wno-pointer-sign -fmacro-prefix-map=/builds/wireshark/wireshark/= -fmacro-prefix-map=/builds/wireshark/wireshark/build/= -fmacro-prefix-map=../= -O2 -g -DNDEBUG -fPIC -std=gnu11 -Werror -MD -MT epan/ftypes/CMakeFiles/ftypes.dir/ftype-protocol.c.o -MF epan/ftypes/CMakeFiles/ftypes.dir/ftype-protocol.c.o.d -o epan/ftypes/CMakeFiles/ftypes.dir/ftype-protocol.c.o -c ../epan/ftypes/ftype-protocol.c ../epan/ftypes/ftype-protocol.c: In function ‘_tvbcmp’: ../epan/ftypes/ftype-protocol.c:248:62: error: operand of ?: changes signedness from ‘int’ to ‘guint’ {aka ‘unsigned int’} due to unsignedness of other operand [-Werror=sign-compare] 248 | guint a_len = a->length < 0 ? tvb_captured_length(a->tvb) : a->length; | ^~~~~~~~~ ../epan/ftypes/ftype-protocol.c:249:62: error: operand of ?: changes signedness from ‘int’ to ‘guint’ {aka ‘unsigned int’} due to unsignedness of other operand [-Werror=sign-compare] 249 | guint b_len = b->length < 0 ? tvb_captured_length(b->tvb) : b->length; | ^~~~~~~~~ ../epan/ftypes/ftype-protocol.c: In function ‘slice’: ../epan/ftypes/ftype-protocol.c:224:60: error: argument ‘length’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] 224 | slice(fvalue_t *fv, GByteArray *bytes, guint offset, guint length) | ~~~~~~^~~~~~ cc1: all warnings being treated as errors
2022-05-23dfilter: Fix protocol slices with negative indexesJoão Valverde5-24/+52
Field infos have a length property that was not stored with the field value so when using a negative index the end was computed from the captured length of the frame tvbuff, leading to incorrect results. The documentation in wireshark-filter(5) describes how this was supposed to work but as far as I can tell it never worked properly. We now store the length and use that (when it is different from -1) to locate the end of the protocol data in the tvbuff. An extra wrinkle is that sometimes the length is set after the field value is created. This is the most common case as the majority of protocols have a variable length and dissection generally proceeds with a TVB subset from the current layer (with offset zero) through all remaining layers to the end of the captured length. For that reason we must use an expedient to allow changing the protocol length of an existing protocol fvalue, whenever proto_item_set_len() is called. Fixes #17772.
2022-05-23epan: Consolidate some duplicate conversation code.Gerald Combs1-50/+34
Rename conversation_lookup_hashtable to conversation_lookup_addr_port. Add a new conversation_lookup_hashtable that consolidates some duplicate code and takes a general set of arguments similar to the other conversation_*_hashtable routines.
2022-05-23epan: Allow conversations based on arbitrary element lists.Gerald Combs4-32/+380
Add conversation_new_full and find_conversation_full, which take arbitrary element lists instead of fixed addresses and ports. Update the comments in conversation.h to be more Doxygen-conformant. Update README.dissector. Use the new functionality to add initial conversation support to the Falco Bridge dissector.
2022-05-23TECMP: Renaming to Device and Interface for TECMP 1.7Dr. Lars Völker1-239/+238
The new TECMP release renames as follows: - Capture Module -> Device - Channel -> Interface Header fields (incl. filters) and Config UATs are affected.
2022-05-22Some check_typed_item_calls.py warning fixes.Martin Mathieson12-15/+14
2022-05-22[Automatic update for 2022-05-22]Gerald Combs3-19/+59
Update manuf, services enterprise numbers, translations, and other items. services failed.
2022-05-22TECMP: Update to TECMP 1.7 specificationDr. Lars Völker1-57/+235
This patch updates the TECMP dissector with 1.6 and 1.7 changes. Changes: - Multiple new flags for CAN, CAN-FD, FlexRay, LIN, Analog, etc. - Reordering of flags - Additional data units for Analog - New Header CRC and Frame CRC for FlexRay (1.6 change) - New CRCs for CAN and CAN-FD (1.6 change) - Deprecated the removed Analog Threshold Undershot/Exceeded flags, since they were removed This patch does not include the renaming to Device and Interface.
2022-05-22smc: fix clang analyzer warning (Dead.Store)Alexis La Goutte1-2/+2
packet-smc.c:722:4: warning: Value stored to 'offset' is never read [deadcode.DeadStores] packet-smc.c:887:4: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2022-05-22couchbase: fix clang analyzer warning (Dead.Store)Alexis La Goutte1-1/+0
packet-couchbase.c:2685:17: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2022-05-22catapult-dct200: fix clang analyer warning (Dead.Store)Alexis La Goutte1-3/+3
packet-catapult-dct2000.c:1099:13: warning: Value stored to 'tag' is never read [deadcode.DeadStores] packet-catapult-dct2000.c:1100:13: warning: Value stored to 'len' is never read [deadcode.DeadStores] packet-catapult-dct2000.c:3076:21: warning: Value stored to 'sub_dissector_result' is never read [deadcode.DeadStores]
2022-05-22dfvm(dfilter): fix clang analyzer warning (Dead.Store)Alexis La Goutte1-1/+0
2022-05-20RLC-NR: When have NACK Range, clearly show which SNs were lostMartin Mathieson1-0/+1
2022-05-19BPv7 and TCPCL: Update references to published RFCsBrian Sipos6-13/+14
2022-05-18epan: Document the epan, file, and packet scopes.Gerald Combs1-6/+15
2022-05-18Update bpv7 and bpsec dissectors to resolve ticket 17727lindnerp2-59/+113
2022-05-18SDP: Minor Refactoring by Extract Methodeasonweii1-399/+444
Extract Method for multiple message of SDP Media Attribute to simplify things and Make processes clearer. dissect_sdp_media_attribute_rtpmap dissect_sdp_media_attribute_fmtp dissect_sdp_media_attribute_path dissect_sdp_media_attribute_h248_item dissect_sdp_media_attribute_crypto The original function remain unchanged.
2022-05-18f5ethtrailer: Decode TLS 1.3 trailer info on some versionsJason Cohen1-3/+8