Commit Graph

78913 Commits

Author SHA1 Message Date
Martin Mathieson a480d91a5b Revert temp changes to valgrind-wireshark.sh 2020-10-19 10:35:26 +00:00
Mikael Kanstrup 3b74cbcf4e EAP: Let dissect_eap_psk_pchannel return offset
For consistency with other functions in this dissector let
dissect_eap_psk_pchannel also return offset instead of "number of
bytes dissected".
2020-10-19 10:09:41 +00:00
Mikael Kanstrup 279bde1a0e EAP: Fix GPSK CSuite Sel dissection
The function to dissect CSuite Sel returns offset not number of
dissected bytes so calling function must assign new offset rather
than incrementing. For consistency also update the CSuite List
function to return offset.
2020-10-19 10:09:41 +00:00
Mikael Kanstrup 72fbe69d9b EAP: Fix GPSK failure code item length
Fix issues found by running ./tools/check_typed_item_calls.py

epan/dissectors/packet-eap.c:1475 proto_tree_add_item called for hf_eap_gpsk_failure_code  -  item type is FT_UINT16 but call has len  4
epan/dissectors/packet-eap.c:1479 proto_tree_add_item called for hf_eap_gpsk_failure_code  -  item type is FT_UINT16 but call has len  4
2020-10-19 10:09:41 +00:00
Mikael Kanstrup 6da08adcca Minor fixes to TEAP dissector
Fix the hf_teap_status item length and hf_teap_prompt diplay name.
2020-10-19 10:09:41 +00:00
Martin Mathieson bf245c5f68 PDML: speed up writing
Speed functions to print hex bytes, escape XML strings and
print out indents by avoiding specifier calls, and building
larger strings before calling fputs().

Someone mentioned this in the sharkfest chat yesterday.
Also, Ostinato relies upon this when importing from pcap.

An example capture I have has gone from 18 to 11 seconds.
2020-10-19 09:32:49 +00:00
David Perry c03011b906 Lua: base64_decode: handle unpadded data
As noted in bug #16386, glib's `g_base64_decode_inplace()` aborts
decoding of base64 strings that aren't padded. This addresses that by
adding padding "=" characters if needed to the buffer which will be
decoded.

I added the test case from the bug report to the test suite, though the
location therein may not be ideal.

Closes #16386
2020-10-19 08:38:31 +00:00
Martin Mathieson 723d0fab8f IEEE80211: Fix the lengths of a couple of items
Found by running ./tools/check_typed_item_calls.py

epan/dissectors/packet-ieee80211.c:14209 proto_tree_add_item called for hf_ieee80211_osen_akm_count  -  item type is FT_UINT8 but call has len  2
epan/dissectors/packet-ieee80211.c:20025 proto_tree_add_item called for hf_ieee80211_tclas_ether_type  -  item type is FT_UINT8 but call has len  2
2020-10-19 06:26:47 +00:00
Martin Mathieson d0fe9cae70 GTP and GTPv2: Fix some item lengths.
Fix issues found by running ./tools/check_typed_item_calls.py

epan/dissectors/packet-gtp.c:4414 proto_tree_add_item called for hf_gtp_sel_mode  -  item type is FT_UINT8 but call has len  2
epan/dissectors/packet-gtp.c:6807 proto_tree_add_item called for hf_gtp_rai_rac  -  item type is FT_UINT8 but call has len  2
epan/dissectors/packet-gtp.c:7600 proto_tree_add_item called for hf_gtp_bssgp_cause  -  item type is FT_UINT8 but call has len  2
epan/dissectors/packet-gtpv2.c:3607 proto_tree_add_item called for hf_gtpv2_trace_id  -  item type is FT_UINT16 but call has len  3
epan/dissectors/packet-gtpv2.c:5049 proto_tree_add_item called for hf_gtpv2_trace_id  -  item type is FT_UINT16 but call has len  3
2020-10-18 20:00:39 +01:00
Gerald Combs 08c2a13892 [Automatic update for 2020-10-18]
Update manuf, services enterprise numbers, translations, and other items.
2020-10-18 16:52:23 +00:00
Guy Harris a58ed646aa Handle relative times with >2^31 seconds.
Make display_signed_time() take a 64-bit signed number of seconds, and,
in calls to it, cast the argument to gint64, not gint32.

Addresses issue #16909.
2020-10-18 02:06:07 -07:00
Martin Mathieson cfa55d6a46 tools/check_type_item_calls.py: Check lengths
For calls to proto_tree_add_item(), compare length field in call
with length implied by type of item.
2020-10-17 22:38:02 +00:00
Joerg Mayer 10297b60be packet-tcp.c: Add tcp D-SACK support
And it's all Sake's fault anyway :-)
2020-10-17 22:09:48 +02:00
Joerg Mayer bf1b34c35d packet-tcp: Rename ei_tcp_connection_sack to ei_tcp_connection_synack
This unfortunately includes the name of the filter element but "sack" in TCP
should not mean "a packet with syn+ack set" to most networking people nowadays.
2020-10-17 22:09:48 +02:00
Gerald Combs 5b8a54ab14 Qt: Add a dark mode warning background.
Add ColorUtils::warningBackground, which returns a theme-appropriate
background color for warnings. Use it where needed.
2020-10-16 23:12:17 +00:00
Gerald Combs 6c4a798307 Image: Add a list of icon libraries to the README.
Start collecting a list of icon libraries, which might come in handy the
next time we update our stock icons.
2020-10-16 22:12:41 +00:00
Gerald Combs 4a8b6da58f CMake+macOS: Explicitly create the extra package directory.
Create Wireshark.app/Contents/Resources/Extras, which is needed by the
Makefile generator.
2020-10-16 13:39:17 -07:00
Nardi Ivan e9ab795179 TLS: fix visualization of QUIC Transport Parameter Preferred Address 2020-10-16 21:27:57 +02:00
Prerit Jain 04145521b4 nrup: fix in Frame Indicator display 2020-10-16 13:42:44 +00:00
Dario Lombardo 1fbc6315c0 docs: remove references to gerrit. 2020-10-16 12:51:13 +00:00
Jamie Hare cf83a67fd3 IPPUSB Protocol
Added a dissector to reassemble IPP Over USB packets and pass them to
the HTTP dissector. Added a display filter so IPPUSB packets can be
filtered. Dissector checks to ensure semgent is IPPUSB and supports
reassembly of send-documents and print-job documents. It also supports
the reassembly and dissection of packets that are truncted or
incomplete.

Change-Id: Icc9525592c07b00baaac887a70bc9e7568273016
2020-10-16 08:49:48 +00:00
Roland Knall cfd9ffbb1b Qt: Show tooltips on submenu items
Tooltips should be shown on submenu entries

Closes !16912
2020-10-15 23:21:25 +00:00
Christian Krump 76e56358c2 EPL: wrong size detection of last segment
- fixed size detection of last segment in multiple read/write ASNDs
2020-10-15 22:35:29 +00:00
Ameya Deshpande 34626f2596 USBLL: Introduce usbll states in usbll_data_t.
This commit introduces usbll states. These states
represent the transaction upto the current packet.

Uses of introducing usbll states:
1. Avoid condition checks upto last three packets.
2. Identify invalid PID sequences.
3. Identify correct transactions. This will help in
   the USB 2.0 reassembly.

Ping-bug: 15908
Signed-off-by: Ameya Deshpande <ameyanrd@outlook.com>
2020-10-15 22:10:59 +00:00
John Thacker 91b792c6dc Replace ill-formed UTF-8 byte sequences with replacement character
Implement the Unicode Standard "best practices" for replacing ill-formed
sequences with the Unicode REPLACEMENT CHARACTER. Add wmem_strbuf_append_len
for appending strings with embedded null characters. Clarify why
wmem_strbuf_grow() doesn't always ensure that there's enough room for
a new string, and short-circuit some tests there. Related to #14948
2020-10-15 21:48:28 +00:00
Joerg Mayer 8b622bffc8 packet-stun.c: Series of small updates
- Rename some elements to their current RFC names
- Add an expert item for msg_len field
- Create an attribute for 8006 as unknown to avoid triggering the expert item for unknown attributes
2020-10-15 20:48:16 +00:00
Moshe Kaplan 3dde70de2c .gitlab-ci: Generate cppcheck reports
Modify the cppcheck job to also generate cppcheck's reports
and provide them as artifacts to the user.
2020-10-15 19:39:11 +00:00
Allan Møller Madsen 6d752876ef bthci_iso: full packet decode and reassembly added
Decode all Bluetooth HCI ISO packet fields and reassemble
fragmented packets.
2020-10-15 19:12:00 +00:00
Joakim Karlsson A 39f6b0d391 pfcp: fix handle of predefined by UP URR ID
Change-Id: Ia6e71c4860503db82c44b03ae1d8ccb3daf94339
2020-10-15 18:22:14 +00:00
Filipe Laíns 0ceb46e1c2 proto: add support for FT_BYTES in proto_tree_add_bits
Change-Id: I5030d550bd760953ac84c2700bb0e03cc7a831a1
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-10-15 18:21:34 +00:00
Dario Lombardo 52d7eb733d github: install biplist for macos. 2020-10-15 17:32:53 +00:00
Pascal Quantin 21d3eb2338 WSP: add application/octet-stream content type 2020-10-15 17:26:20 +02:00
Joerg Mayer 64f6a650ce packet-stun.c: Fix display of nonce and realm attributes when using MS-TURN
Also: Move network_version display to the end of the header
2020-10-15 15:52:18 +02:00
Joakim Karlsson A ddd58fbead fbzero: fix build
packet-fbzero.c:348:47: error: ‘tag_len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

Change-Id: I775edcae2bfdc6184267ee8d1873744a675e0fba
2020-10-15 13:22:20 +00:00
Rene Nielsen b3099a839f New dissector: Added support for IEEE 802.1CB R-Tags (EtherType 0xF1C1) 2020-10-15 13:51:51 +02:00
Jason Cohen 888de57c1b f5ethtrailer: Look for trailer after FCS
Under some conditions the trailer can be added after the FCS has already
been added.  Advance 4 bytes and take a second look for a triler without
needing to resort to walking the trailer.
2020-10-15 10:18:36 +00:00
Chuck Craft 90cd509d92 Consistent "Prepare as Filter" - menus and screenshots #16892 2020-10-15 09:18:56 +00:00
John Thacker dcbe7b6c84 MP2T: Reassembly multiple transport streams between the same IPs properly.
Whether over RTP or just UDP, it's possible to get multiple simultaneous MP2T
transport streams between the same pair of IPs but on different ports. They
will not be part of the same reassembly. Thus the reassembly table functions
that use ports as well should be used to avoid ressembly errors and overlaps.
2020-10-15 08:56:11 +00:00
Pascal Quantin 4744523f92 debian: proto_tree_add_item_ret_ipv4() was introduced in 3.3.2 2020-10-15 08:26:15 +02:00
Guy Harris 3f412284a2 Fix message printed for --skip-radiotap-header for non-radiotap packets.
If the encapsulation is WTAP_ENCAP_PER_PACKET, all we know about the
file is that it might not include radiotap packets and, if it does, it
also includes non-radiotap packets.

If it's *not* WTAP_ENCAP_PER_PACKET, properly report it
(wtap_file_type_subtype() returns the *file type* of the file, not the
*link-layer header type* - yes, that *happens* to work for a pcap file
with Ethernet packets, because the values of WTAP_ENCAP_ETHERNET and
WTAP_FILE_TYPE_SUBTYPE_PCAP both *happen* to be 1, but that's pure
luck).

While we're at it, test only once for --skip-radiotap-header and put
both tests inside that if.
2020-10-14 21:22:53 -07:00
Nardi Ivan baebbbce4d QUIC: fix heuristic
In the heuristic function we don't know the length of the CID in the short
header, so we assume the worst case scenario compatible with packet length
(no more than 20 bytes)
2020-10-14 20:06:53 +00:00
Martin Mathieson d6a9bfa503 NRUP: Add missing SN field indicated by Report Delivered 2020-10-14 13:27:03 +00:00
Martin Mathieson efd1f57057 cppcheck.sh: Suppress syntaxError
I've never seen anything useful in these - presumably code is build-tested.
2020-10-14 12:33:16 +00:00
Pascal Quantin 83af7b89fd 3GPP: add 5G-TMSI to 3gpp.tmsi common filter 2020-10-14 11:08:19 +02:00
Anders Broman e209253636 Create a cross protocol filter 3gpp.tmsi
It can be useful to track a "call" trough multiple protocols to make
that easier create a cross protocol filter, more may come.
2020-10-14 07:56:26 +00:00
Guy Harris 793a57fae4 Give more detail for WTAP_ERR_INTERNAL when writing.
Report the file from which the record to be written came and the record
number within that file.
2020-10-14 00:01:49 -07:00
Guy Harris 6e6233521a Have WTAP_ERR_INTERNAL include an err_info string giving details.
That way, users won't just see "You got an internal error", the details
will be given, so they can report them in a bug.
2020-10-14 04:51:45 +00:00
Martin Kaiser 92e1b110f3 Qt: FieldFilterEdit: remove unused actions
The private members save_action_ and remove_action_ in class FieldFilterEdit
are not used. Remove them.

(It looks as if FieldFilterEdit was copied from DisplayFilterEdit, where
 those two actions are present and linked to slots...)
2020-10-14 03:53:45 +00:00
John Thacker 824eec89ca eassembly: Fix check for no data to prevent NULL deference
There's a check for adding a zero length fragment to a reassembly in progress,
but it accidentally checks fd_head->tvb_data (the reassembly in progress)
instead of fd_i->tvb_data (the new fragment) before calling tvb_get_data() on
fd_i->tvb_data. (Note that data / fd_head->tvb_data is created based on the
sum of the lengths of all the fd_i->tvb_data, so the former can only be NULL
if all the latter are, but it's possible for one fragment to be zero length
but not the entire reassembly. Thus this is the necessary and sufficient check.)
Fixes #15569
2020-10-14 03:31:48 +00:00
Guy Harris 7b5b6501f0 Revert "No need for a local lua_State * variable in file handler routines."
This reverts commit 873e079659.

That change didn't help what I wanted to do; there's another way to do
it.
2020-10-13 17:54:50 -07:00