Commit Graph

77851 Commits

Author SHA1 Message Date
Martin Mathieson cf340fa0ec USB: fix redundant assignments or tests flagged by PVS-Studio
Bug: 16335
Change-Id: I19ea32fb607bf4132c1690f46dca5ed055009b84
Reviewed-on: https://code.wireshark.org/review/37211
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-05-16 11:37:06 +00:00
Pau Espin 7794527604 rlcmac: Improve COL_INFO for (E)GPRS packets
Important information to follow GPRS flows is added, and cleanup of
strings is done to follow flows if UL/DL or DATA/CTRL packets are
intersected.

Change-Id: I0f1839a71dc45a2ad9dd273f6ca00a7dfae365e0
Reviewed-on: https://code.wireshark.org/review/37197
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-15 16:22:42 +00:00
Joakim Karlsson 1ddd9932d8 gprscdr: Update to 3GPP TS 32.298 V16.4.1
Change-Id: I8d7d38734055e72cf1ace9a82bd3741ed9464f33
Reviewed-on: https://code.wireshark.org/review/37209
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-15 14:56:43 +00:00
Joakim Karlsson cbb12e04bf pfcp: Update to 3GPP TS 29.244 V16.3.1
Change-Id: Icf5d015cc3f4c2dd26d612b7df1393872c228271
Reviewed-on: https://code.wireshark.org/review/37207
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-15 14:31:38 +00:00
Stig Bjørlykke 454d974fe5 tls: PSK is named "Pre-Shared Key"
In TLS RFCs PSK is referred to as "Pre-Shared Key". Update preference
text to use this.

Change-Id: I13f1380bfc46c90019a3560f316008864aae6ace
Reviewed-on: https://code.wireshark.org/review/37208
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-15 14:23:48 +00:00
Vanson Lim f331b62436 NSH MD Type 2 Context TLV definition updated to conform with RFC8300.
Change-Id: Ibf5af4737d6831a8d5b057560fa9824459ec1c8a
Reviewed-on: https://code.wireshark.org/review/37198
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-15 13:13:04 +00:00
Uli Heilmeier b5dc967c79 Radius: Fix NULL pointer call
Check length before calling tvb_bytes_to_str()

Bug: 16564
Change-Id: I3cfb91d5da5f6f620f8f48c55fb3837ebe70972c
Reviewed-on: https://code.wireshark.org/review/37200
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-15 07:33:35 +00:00
Andy Zhao 6078965ebe smb2: add dissector for App_Instance_Version structure in SMB2 Create Context.
Bug: 16563
Change-Id: I56c1258feeb8135936608049326bda68006e00cd
Reviewed-on: https://code.wireshark.org/review/37187
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-05-15 06:52:53 +00:00
Dylan Ulis 2342872ed4 ENIP: TCP/IP Object Updates
1. Status Attribute - Decode more bits
2. IANA Port Admin Attribute

Bug: 16443
Change-Id: Ic74226c373ba2a68d6e8d8c0e804661b778332a2
Reviewed-on: https://code.wireshark.org/review/37196
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-15 04:00:02 +00:00
Pascal Quantin 536f5b466b sharkd_session.c: fix a warning reported by gcc 10
warning: ‘%s’ directive argument is null [-Wformat-overflow=]
  544 |  fprintf(stderr, "load: filename=%s\n", tok_file);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I583a94308ad53b461606053def17e8537eec8d65
Reviewed-on: https://code.wireshark.org/review/37195
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-05-14 19:56:39 +00:00
Pascal Quantin 4b67b72d2a SBcAP: fix update of info column
Remove the test on tree before decoding the PDU and display the message
name

Change-Id: I2e8d9000d6da4ef812bf84539c1dc32c8ae9e2a1
Reviewed-on: https://code.wireshark.org/review/37194
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-05-14 14:10:11 +00:00
Martin Mathieson d2812de8e7 Fix some more broken web links in dissector code
Change-Id: I57853e706b58fd3bb46d952fcb1f517f435fd737
Reviewed-on: https://code.wireshark.org/review/37193
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-05-14 10:03:39 +00:00
Tomas Kukosa 84e0f45640 Add radiotap.vendor dissector table for vendor namespace
Change-Id: I49f1bd88b887635b2404e15dac60a44963ff9fd7
Reviewed-on: https://code.wireshark.org/review/37188
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-05-14 06:00:31 +00:00
Martin Mathieson 5ed4f53e2b Fix a few broken web links from dissectors
Change-Id: I008a9136890354aae583aaaf9ccf9213d5efe539
Reviewed-on: https://code.wireshark.org/review/37189
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-05-13 19:42:53 +00:00
Piotr Sarna 90d1a9de43 scylla: fix tree sizes and offsets
The following sizes and offsets were incorrect:
 - negotiation frame size (negotiation header size was used)
 - response frame size (response frame header size was used)
 - request frame size (response(sic!) frame header size was used)
 - mutation subtree offset (resulting in wrong subtree size too)
 - partition key subtree offset (resulting in wrong subtree size too)

Also, negotiation/response frames were not dissected correctly if they were
shorter than request header size (28) - they are correctly handled now.
Additionally, Seastar RPC magic sequence (SSTARRPC) is explicitly
added to the negotiation tree in order to explicitly show each part
of the frame.

Change-Id: Ibc5024b329113e98a363cfeb40223d61b9473fb2
Reviewed-on: https://code.wireshark.org/review/37186
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-05-13 14:41:32 +00:00
Dylan Ulis da8c28dc67 CIP Motion: Connection Configuration Data
1. Dissect the Motion Configuration Block from the Forward Open
2. Add Motion Attributes related to #1
3. Save the first/last segment for certain segment types in an EPATH.
Behavior changes based on the values in first segments for a given type,
vs later segments.

Change-Id: Id0552a585d158041c13adfa50f4bb164cada79b7
Reviewed-on: https://code.wireshark.org/review/37168
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-13 11:01:32 +00:00
Adam Mitz 256cc1a85c RTPS: updated submessage parsing to match protocol spec
Change-Id: I1bd5103e5a7c01e0fb1a17091a27b6e5c5c2e69c
Reviewed-on: https://code.wireshark.org/review/37164
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-13 11:01:20 +00:00
Jaap Keuter e8c9b6c0dd DoxyGen: Add Wireshark icon to output
Because we can.

Change-Id: Ic6e43ccea0e556be36c7a41b4fa40d52006e309b
Reviewed-on: https://code.wireshark.org/review/37183
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-13 10:15:25 +00:00
Jaap Keuter 91a4950926 DoxyGen: Remove build dir from input
Change-Id: Ie98d555091d9c3b70aa6d72bde4ec9c8a7f7a12f
Reviewed-on: https://code.wireshark.org/review/37182
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-13 10:15:14 +00:00
Piotr Sarna 17c9a2a2a4 scylla: link requests with responses
Response packets already contained references to their original
requests. Now, the reverse link is provided as well, so the response
frame can be conveniently reached from the request.

Change-Id: I09c7e3fc08c46d14315e2bad01573c20d9a079ad
Reviewed-on: https://code.wireshark.org/review/37179
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-05-12 09:54:59 +00:00
Piotr Sarna 82fb2d1f29 scylla: fill the list of packets that do not expect responses
Two more packets do not expect a response:
 - DEFINITIONS_UPDATE
 - PAXOS_PRUNE

Change-Id: I7159f1311c0884a42e0d347244bfb734465c6fb9
Reviewed-on: https://code.wireshark.org/review/37184
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
2020-05-12 08:20:33 +00:00
Uli Heilmeier 24a2d77ac4 DLEP: Additional data items
Added additional data items as defined in
* RFC 8757 Latency Range Extension
* RFC 8629 Multi-Hop Forwarding Extension
* RFC 8703 Link Identifier Extension

Change-Id: Iaf567911b20bf6e66466da5a3daba0499e2ce527
Reviewed-on: https://code.wireshark.org/review/37165
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-11 17:46:21 +00:00
Piotr Sarna fc1929e9ae scylla: add PAXOS_PRUNE verb
The verb was introduced recently as part of the paxos reconciliation
protocol.

Change-Id: I0c397a45790ff8ff3990c1906297405841b30a09
Reviewed-on: https://code.wireshark.org/review/37178
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-05-11 14:10:07 +00:00
Gerald Combs a941457d91 [Automatic update for 2020-05-10]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: If6b68e242160198aed0de5947813d0db20c799f2
Reviewed-on: https://code.wireshark.org/review/37173
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-05-10 18:18:48 +00:00
Martin Mathieson a32298b7f6 GSM-SMS: add missing increment of offset.
Fixes bug introduced in
https://code.wireshark.org/review/#/c/37160/

Change-Id: I70620dcdf1e1354b9a377a8e755da3a7baa35f6c
Reviewed-on: https://code.wireshark.org/review/37172
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-05-09 15:19:56 +00:00
Guy Harris 366415bcc3 ARP: expand the set of ARPHRD_ definitions from both IANA and Linxu.
While we're at it, fix some typoes, and clean up the white space.

Change-Id: I32cdcb6603bcf76df26f74bd60cdaadc01b28693
Reviewed-on: https://code.wireshark.org/review/37171
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-09 12:08:54 +00:00
Martin Mathieson 569f3bd611 More PVS-Studio issues flagged by Valerii Zapodovnikov.
/opt/SourceCode/wireshark/epan/dissectors/packet-frame.c	818	warn	V547 Expression 'fi' is always true.
/opt/SourceCode/wireshark/epan/dissectors/packet-gsm_sms.c	2692	warn	V547 Expression 'length <= (offset - saved_offset)' is always false.
/opt/SourceCode/wireshark/epan/dissectors/packet-isup.c	4688	warn	V1037 Two or more case-branches perform the same actions. Check lines: 4688, 4697
/opt/SourceCode/wireshark/extcap/androiddump.c	1237	warn	V560 A part of conditional expression is always true: data_str.
/opt/SourceCode/wireshark/extcap/androiddump.c	1603	warn	V547 Expression is always true.
/opt/SourceCode/wireshark/ui/qt/models/packet_list_model.cpp	497	warn	V560 A part of conditional expression is always true: ok_r1.

For the voip_calls.c change, I preferred to initailize along with every other field, rather than set to actual value it gets set to later.

For the isobus-vt change, I could not find a spec but followed the pattern from other error bit fields.

Bug: 16335
Change-Id: Ie55082222b582f6fff4e8c7a992d863acee6cf15
Reviewed-on: https://code.wireshark.org/review/37160
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-05-09 11:34:12 +00:00
Guy Harris d795711a49 sll: se the value_string table for ARP hardware types.
Map the "Link-layer address type" value to ARP hardware types.

Change-Id: I0552bf57bf39e2daa26588181b4a9e343eb9cd6d
Reviewed-on: https://code.wireshark.org/review/37170
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-09 07:20:43 +00:00
Guy Harris 7e7db3e91c sll: add support for LINKTYPE_LINUX_SLL2.
Different header, with a different size, an additional field, and with
fields being in a different order.

Distinguish between V1 and V2 by giving the version.

That means we can no longer use the "ethertype" dissector as it stands,
because the packet type field isn't at the end of the header, right
before the payload; pull the "add the type field to the protocol tree"
functionality out of the "ethertype" dissector and leave it up to the
dissector calling it.

Change-Id: I72b8a2483c0a539919fbe5d35fd7e60bff4bf75a
Reviewed-on: https://code.wireshark.org/review/37169
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-09 03:14:50 +00:00
Guy Harris 2480d9b69a Add an encapsulation table entry for WTAP_ENCAP_MP4.
Change-Id: Ia156359e68fbf543f00e8106ad76f9cf9532d3d8
Reviewed-on: https://code.wireshark.org/review/37166
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-08 19:53:41 +00:00
Dylan Ulis c0a4b8b30f ENIP: Code Cleanup
No real functional changes:
1. Remove some types that don't appear in the spec
2. Change some variable names and text descriptions to match spec
3. Pull out some logic to separate functions
4. Correct variable types to match the interface types

Change-Id: I82ae74fd709c2ec893d20c50eaa36f6c86e20634
Reviewed-on: https://code.wireshark.org/review/37162
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-08 05:37:42 +00:00
Tomasz Moń 63a8ac5210 Qt: Respect user preference to hide packet list
Instead of hiding whole packet list widget when freezing, hide only the
header. This prevents unwanted column resizes while keeping the widget
on screen while capture file is loading.

Prevent flickering by showing master_split_ only after all widgets are
in correct place.

Ping-Bug: 16063
Ping-Bug: 16491
Change-Id: I3bb0763c44b23b1e4118003502d4bf3903591f34
Reviewed-on: https://code.wireshark.org/review/37159
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-08 04:07:35 +00:00
Moshe Kaplan fd7895d37c Replace instances of wmem_alloc with wmem_new
This commit replaces instances of
  (myobj *)wmem_alloc(wmem_file_scope(), sizeof(myobj))
and replaces them with:
  wmem_new(wmem_file_scope(), myobj)
to improve the readability of Wireshark's code.

The replacement locations were identified with grep
and replaced with the Python script below.

grep command:
  egrep "wmem_alloc0?\(wmem_file_scope\(\), sizeof\([a-z_]+\)\)" . -R -l

python script:

import re
import sys
import fileinput

pattern = r'\(([^\s]+) ?\*\) ?wmem_alloc(0?)\((wmem_[a-z]+_scope\(\)), sizeof\(\1\)\)'
replacewith = r'wmem_new\2(\3, \1)'

fname = sys.argv[1]

for line in fileinput.input(fname, inplace=1, mode='rb'):
    output = re.sub(pattern, replacewith, line)
    sys.stdout.write(output)

Change-Id: Ieac246c104bf01e32cbc6e11e53e81c7f639d870
Reviewed-on: https://code.wireshark.org/review/37158
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-05-07 14:47:54 +00:00
Matthew Weant 87f320ec25 IEEE802.11: HS2.0 ANQP Friendly Name Subtree Fix
Set index start to 1 for Friendly Operator Name subtree.
Moved lang code and name string within subtree.

Bug: 16534
Change-Id: I0fd4d926f585ec432a869c7a15e13b84d5d0f2fb
Reviewed-on: https://code.wireshark.org/review/36996
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-07 11:34:37 +00:00
Matthew Weant 9279be0394 IEEE802.11: Fixed HS2.0 Cap List Dissection
Adjusted dissect_anqp_capab_list() to include
~anqp_subtype and ~anqp_reserved fields when
WFA HS2.0 exists as a vendor-specific capability ID.

Bug: 16548
Change-Id: I2923df3f6de42a58af643cd07b29c77e802cdcab
Reviewed-on: https://code.wireshark.org/review/37147
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-07 11:33:42 +00:00
Peter Wu ef67994c90 TCP: Add expert info for SYN-ACK that accepts TFO data
"If the cookie is valid, the server sends a SYN-ACK acknowledging both
the SYN and the data." https://tools.ietf.org/html/rfc7413#page-6

Tested with tcp_tfo_session.pcapng from Bug 12838.

Bug: 16515
Change-Id: Idff67e9098d558ea60337b01e5c74514397a470f
Reviewed-on: https://code.wireshark.org/review/36994
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-05-07 06:54:03 +00:00
Dylan Ulis 3a82774b32 CIP: Various Updates
1. Electronic Key Segment: Add support for Serial Number Key Format
2. Electronic Key Segment: Display more values in generated (response) output
3. Display Route/Connection Path in response data
4. Add more device types, class names
5. Minor display improvements to text strings, units for clarity

Change-Id: Ie7738cb395579674db448535474444da49b5b297
Reviewed-on: https://code.wireshark.org/review/37156
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-05-07 06:53:00 +00:00
Peter Wu ceb45a186c QUIC: append Stream ID to more frame types
Show the Stream ID in the Info column after the RESET_STREAM,
STOP_SENDING, MAX_STREAM_DATA, and STREAM_DATA_BLOCKED frame types.

Change-Id: Icec0b35dcd0cd79d5be519505d7b3b98c0af9ca7
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/37157
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-05-07 06:50:45 +00:00
Martin Kaiser 5d3eea14a3 ConversationDialog: fix a TCP graph race condition
When the user opens the conversation dialog, selects a tcp conversation and
presses the Graph button, the ConversationDialog kicks off these two actions

1.) apply a display filter "tcp.stream eq X" (where X is the number of the stream)
2.) open the tcp stream graph

Both actions are asynchronous and, at least on my machines, the graph is opened
before the filter is applied. The graph requires that the current packet be
part of the selected tcp conversation. If it's not (because the filter isn't
applied yet), we get the "Selected packet isn't a TCP segment or is truncated"
error message and the graph is not shown.

Fix this by enforcing the correct order for the two actions. MainWindow sends
the displayFilterSuccess signal when a display filter was applied. Listen to this
signal in ConversationDialog and launch the tcp graph when the filter was
applied successfully.

Change-Id: I63debe2125ba8f0a737ff4882a9fca0a7bcdb0f5
Reviewed-on: https://code.wireshark.org/review/37130
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-07 03:48:47 +00:00
Moshe Kaplan b869452ba3 packet-dof.c: Remove fprintf
d5fc969e57 removed
stdio.h's include. The missing stdio.h broke
the CentOS7 build. This commit removes calls to
fprintf to fix the CentOS7 build.

Change-Id: I3f93973ae6901a30414a75a8156967a0e470db90
Reviewed-on: https://code.wireshark.org/review/37137
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-07 03:47:02 +00:00
Martin Mathieson a5703f22cb More changes arising from PVS-Studio output.
/opt/SourceCode/wireshark/epan/dissectors/packet-ip.c	1556	err	V547 Expression 'opt == (1 | 0x00)' is always true.
/opt/SourceCode/wireshark/epan/dissectors/packet-ipdc.c	739	warn	V547 Expression 'payload_len < 4' is always false.
/opt/SourceCode/wireshark/ui/text_import.c	1049	err	V547 Expression 'info->offset_type == OFFSET_DEC' is always true.

None of these are actual bugfixes.

Bug: 16335
Change-Id: I6d0d3bb92c70ea625fc8b559e7a2bc5ba4e29e25
Reviewed-on: https://code.wireshark.org/review/37136
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-05-06 08:35:11 +00:00
Tomasz Moń 1d0b233f12 Qt: Stretch last packet list header section
Programatically show the master split widget before elements are added
to prevent pending resize events from resizing packet columns to insane
widths (in my case orders of magnitude higher than display resolution)

Such resize was occuring when loading capture file if configuration file
included hidden columns (e.g. 55 defined columns, 8 visible). The resize
was not directly visible to user. Resize event call chain included calls
to recent_set_column_width() that changed width stored in configuration.
Modified configuration column width value would become effective after
user added or removed columns.

Hide PacketList when freezing and show it when thawing. Do not call
setUpdatesEnabled(false) as it leads to widget/preferences columns
missynchronization.

Clear packet list before freeing frame data. This prevents accessing
freed memory in ProtoTree on file close if packet list was in focus and
the next widget to get focus is packet details.

Ping-Bug: 16063
Bug: 16491
Change-Id: I2c21d928348681af1793b3263815c81ee73d41b0
Reviewed-on: https://code.wireshark.org/review/37029
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-06 03:50:18 +00:00
Jaap Keuter f399d135e0 IDL: Clean up IDL based dissector generation
Clean up the generators and generated dissectors a bit by updating
the header, removing unwanted includes and completing the modelines
block.

Change-Id: I8ff80b05bb598c3fa5a5f91a24d5caba87eb712e
Reviewed-on: https://code.wireshark.org/review/37154
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-06 03:49:52 +00:00
Jaap Keuter 5e4379f5b5 IDL: make code generation reproducible
The current state of generated code from the IDL specification is not
reproducible with the current omniidl backend. This change brings the
backend in line with the currently committed generated source code.

The exception to this is that the exceptions (no pun intended) were
collected in a dictionary of unspecified ordering, therefore inherently
non-reproducible. These thus differ from the previously committed source
code (packet-parlay.c), but do contain the same lines.

Also this rolls back commit 443df93896
because the committed generated source files were not created with the
backend with this change, nor do they fail to build, as claimed in that
commit.

Special thanks to Luke Mewburn for working on the dictionary problem.

Change-Id: I7707746d263c7556eb06883c877f70f0e9b357c5
Reviewed-on: https://code.wireshark.org/review/37153
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-05 20:12:29 +00:00
Matthew Weant ddc5a49ca4 EAP: AT_NOTIFICATION Dissection
Added two fields for EAP-SIM/AKA Notification Type.
Added value_string array for AT_NOTIFICATION types & external ref.
Updated else if statements to a switch for EAP-SIM and EAP-AKA
Updated eap_sim_aka_attribute_vals[] and added Client Error Codes

Bug: 16539
Change-Id: Iaf9949d713d700330536e805d9ceb9328d183744
Reviewed-on: https://code.wireshark.org/review/36999
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-05 20:09:48 +00:00
Pascal Quantin 5dabd51742 Windows: upgrade Npcap to 0.9991
Change-Id: I5c664a26ede1a5904d4f02a38c43af6c15dce5f9
Reviewed-on: https://code.wireshark.org/review/37152
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-05-05 19:35:29 +00:00
Martin Mathieson 1408dd3b50 Last batch of changes from PVS-Studio scan.
/opt/SourceCode/wireshark/epan/dissectors/packet-flip.c	155	warn	V547 Expression 'chksum_hdr_chksum == computed_chksum' is always false.
/opt/SourceCode/wireshark/epan/dissectors/packet-zbee-zcl-meas-sensing.c	1295	err	V590 Consider inspecting the '(value > 0x0000) || (value > 0xfffd)' expression. The expression is excessive or contains a misprint.
/opt/SourceCode/wireshark/ui/qt/lte_rlc_statistics_dialog.cpp	504	warn	V668 There is no sense in testing the 'channel_item' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.

Bug: 16335
Change-Id: Ief19a82e84bd16df33c453d6cc30db37f1c589ea
Reviewed-on: https://code.wireshark.org/review/37150
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-05-05 18:41:30 +00:00
Dr. Lars Völker f263df0a45 SOMEIP: removing warnings due to guint64 (%lx vs %llx)
Change-Id: I5737c4ce48030a650f58df7593182563966c54a2
Reviewed-on: https://code.wireshark.org/review/37148
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-05-05 16:13:05 +00:00
Matthew Weant dba3081f4d EAP: Unknown Data at end of EAP Identities
Added unknown data field at end of EAP Identity
dissection to ensure clean offsets to CRC/Checksum.

Bug: 16529
Change-Id: I09bc945bb89a91231bb82ced011ca3d1075a7788
Reviewed-on: https://code.wireshark.org/review/37094
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-05 11:58:42 +00:00
Dr. Lars Völker 6ada4302b5 SOMEIP: Bugfix for SOME/IP-SD Collision of Unique ID
The unique id for SOME/IP-SD was not unique for eventgroups since
it was made up by the service id and instance id only.
This patch adds the eventgroup id to fix this.

Bug: 16549
Change-Id: I16bf0884d4a7bc1d3df5de868833fb1887ba0baa
Reviewed-on: https://code.wireshark.org/review/37131
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-05 06:25:51 +00:00