metze/wireshark/wip.git
2 years agoMinor wireshark-qt.cpp cleanups.
Gerald Combs [Wed, 24 Jan 2018 23:52:49 +0000 (15:52 -0800)]
Minor wireshark-qt.cpp cleanups.

Remove duplicate and unneeded code. Remove placeholder markers left over
from the initial port from GTK+.

Change-Id: I4b372057c40cce53d0a00a54e490dec2097a7423
Reviewed-on: https://code.wireshark.org/review/25462
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agobootp: DHCP User Class Data iPXE exception
Jaap Keuter [Wed, 24 Jan 2018 14:32:25 +0000 (15:32 +0100)]
bootp: DHCP User Class Data iPXE exception

iPXE seems to violate RFC 3004 by ommitting the UC_Len_i field in the
User Class Data field. Since this seems to be a 'well known' issue,
which is not going to be corrected, detect and circumvent the error
detection for this specific use.

Bug: 14312
Change-Id: I2a15c336d7f67ee5fd83f955de7126eac146bfb1
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/25450
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoQt+WiX: Skip translations.
Gerald Combs [Wed, 24 Jan 2018 22:10:39 +0000 (14:10 -0800)]
Qt+WiX: Skip translations.

We handle translations in QtTranslation.wxs so we need to skip them when
generating QtDependentComponents.wxs.

Change-Id: I05586c7f8fbbaf72fc30564a157ba1175154d1d3
Reviewed-on: https://code.wireshark.org/review/25459
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agoOpenFlow(v5&v6) : Fix RX_PWR/TX_BIAS
Laszlo Papp [Wed, 24 Jan 2018 16:57:10 +0000 (16:57 +0000)]
OpenFlow(v5&v6) : Fix RX_PWR/TX_BIAS

Change-Id: Iae6fe2473d80cb14d5a9676b7efce41dc59a30e2
Reviewed-on: https://code.wireshark.org/review/25454
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoCMake: Create directories one at a time.
Gerald Combs [Wed, 24 Jan 2018 21:01:17 +0000 (13:01 -0800)]
CMake: Create directories one at a time.

Older versions of CMake don't support passing multiple arguments to `-E
make_directory`.

Change-Id: I62f76753a0ec1a96849de3a1131869f08303dbfc
Reviewed-on: https://code.wireshark.org/review/25458
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agoQt+WiX: Check windeployqt --list output.
Gerald Combs [Wed, 24 Jan 2018 19:49:12 +0000 (11:49 -0800)]
Qt+WiX: Check windeployqt --list output.

Windeployqt 5.9.4 can print translation files that don't exist
(QTBUG-65974).

Fix up whitespace.

Change-Id: If0a4ad6e24023707fa7e9cb1132af8a8dc425627
Reviewed-on: https://code.wireshark.org/review/25457
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agoOpenflow: Use offset 2 for tx_min/max as they are uint16_t
Laszlo Papp [Wed, 24 Jan 2018 16:53:10 +0000 (16:53 +0000)]
Openflow: Use offset 2 for tx_min/max as they are uint16_t

Change-Id: I2f47e0ede2a31cfdadc69ab125a739b3deaa297e
Reviewed-on: https://code.wireshark.org/review/25453
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2 years agoFix the display of Length and Pad2 in the openflow dissector
Laszlo Papp [Wed, 24 Jan 2018 16:03:00 +0000 (16:03 +0000)]
Fix the display of Length and Pad2 in the openflow dissector

Change-Id: I12194d1449812c43c062c50d319d44d6d7437c51
Reviewed-on: https://code.wireshark.org/review/25451
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>
2 years agobyte_view_text (qt): Fix Dead Store (Dead assignement/Dead increment) Warning found...
Alexis La Goutte [Wed, 24 Jan 2018 16:25:29 +0000 (16:25 +0000)]
byte_view_text (qt): Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: Ibfaac5e1d8cc30d6bb8917d0c0e10a79e059a53e
Reviewed-on: https://code.wireshark.org/review/25452
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agoWindows: Modify position of compress checkbox in Export Packets dialog
Graham Bloice [Wed, 24 Jan 2018 12:29:01 +0000 (12:29 +0000)]
Windows: Modify position of compress checkbox in Export Packets dialog

The "Compress with gzip" checkbox was over on the right and cut-off.
Move it to a (somewhat) better place.

Change-Id: I241e6216ba69c5fa4e4709e311d45dfecdad2c2d
Reviewed-on: https://code.wireshark.org/review/25448
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2 years agoCVS pserver: fix infinite loop
Pascal Quantin [Wed, 24 Jan 2018 10:57:55 +0000 (11:57 +0100)]
CVS pserver: fix infinite loop

Bug: 14364
Change-Id: I49377c5b06a7b3f2e919c8f8ae2c4d95b9b2c7eb
Reviewed-on: https://code.wireshark.org/review/25446
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2 years ago[PFCP] Fixed Outer Header Creation IE
Matej Tkac [Wed, 24 Jan 2018 11:14:37 +0000 (12:14 +0100)]
[PFCP] Fixed Outer Header Creation IE

   3GPP TS 29.244 V14.2.0 (2017-12)

Change-Id: If99b0701541a32e393d3fd19bbd013fd4abcbcc8
Reviewed-on: https://code.wireshark.org/review/25447
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoAdd duplicate value_string in check filter
Michael Mann [Wed, 29 Mar 2017 01:49:47 +0000 (21:49 -0400)]
Add duplicate value_string in check filter

Change-Id: Ie00d057f5bc36d65b6bba790169543a65b068e47
Signed-off-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-on: https://code.wireshark.org/review/20744
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agowiretap/k12: fix memory leak.
Jakub Zawadzki [Wed, 24 Jan 2018 02:20:50 +0000 (03:20 +0100)]
wiretap/k12: fix memory leak.

Free state.bb in error path.
Found by clang.

Change-Id: Ic9f2e1383a5219de465a6f22f7b382ac8b1f9cbf
Reviewed-on: https://code.wireshark.org/review/25443
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoui: don't g_assert() in get_args_as_string(), but return empty string for no argument...
Jakub Zawadzki [Tue, 23 Jan 2018 06:52:23 +0000 (07:52 +0100)]
ui: don't g_assert() in get_args_as_string(), but return empty string for no arguments case.

Rework e861a112103ed4d1f2fa153932bcf86f120e3907 by returning empty string.
g_assert() seems to be not understand by clang scan.

Change-Id: Iade2d81aa22eecf563a465cb86e694e3e0f853df
Reviewed-on: https://code.wireshark.org/review/25441
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoCMake: Compile and link flag updates.
Gerald Combs [Tue, 16 Jan 2018 21:56:58 +0000 (13:56 -0800)]
CMake: Compile and link flag updates.

Add /guard:cf and /Qspectre to the Visual C++ 2015 compile and link flags.

Don't bother trying to pass -Wl,--as-needed or -pie to Visual C++.

Remove some unneeded quotes.

Change-Id: I4d89d61ce9dd579e7cfbcd49df6116810bfb0178
Reviewed-on: https://code.wireshark.org/review/25356
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agowslua: fix nstime memory leak after passing unknown encoding to TvbRange_nstime()
Jakub Zawadzki [Wed, 24 Jan 2018 02:06:06 +0000 (03:06 +0100)]
wslua: fix nstime memory leak after passing unknown encoding to TvbRange_nstime()

Move checking of encoding before allocating nstime.
Found by clang.

Change-Id: I3c1de5fae6fcf52393cc38302359f21f17808087
Reviewed-on: https://code.wireshark.org/review/25442
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoSDP: Added support for "a=rtcp" and "a=rtcp-mux".
Robert Jongbloed [Tue, 23 Jan 2018 10:38:44 +0000 (10:38 +0000)]
SDP: Added support for "a=rtcp" and "a=rtcp-mux".

Modern SIP endpoints often use non adjacent, or the same, port for the RTCP
protocol as the RTP protocol. This is indicated via attributes in the SDP,
which should be used to set up the correct dissector for the correct port
on this SIP session.

Change-Id: I37bf30b71541b6f924fbda5ac1cb29f3ba171515
Reviewed-on: https://code.wireshark.org/review/25430
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoCMake: Copy multiple data files at a time.
Gerald Combs [Tue, 23 Jan 2018 20:05:10 +0000 (12:05 -0800)]
CMake: Copy multiple data files at a time.

Copy the DTD, DIAMETER, RADIUS, and profile files all at once instead of
individually.

Change-Id: I7c75c4a784956b998a82fd627dd17843820096ff
Reviewed-on: https://code.wireshark.org/review/25439
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agocvspserver: Add basic cvs pserver protocol dissector
Jaap Keuter [Tue, 23 Jan 2018 08:31:22 +0000 (09:31 +0100)]
cvspserver: Add basic cvs pserver protocol dissector

Change-Id: I049c8b9b9a0a1da2243217532186ba5a19cf5671
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/25424
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agoQt: Add back the "ready to go" startup message.
Gerald Combs [Wed, 24 Jan 2018 01:17:11 +0000 (17:17 -0800)]
Qt: Add back the "ready to go" startup message.

The stdin capture test and at least one external application depends
on the "Wireshark is up and ready to go" startup message, so we need to
print it even when DEBUG_STARTUP_TIME isn't defined. Print the startup
time in seconds.

Change-Id: Ic1683b751f9cce30b8ca8a6122eddff44fcda015
Reviewed-on: https://code.wireshark.org/review/25440
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agosharkd: try to fix clang uninitialized value stored to field 'protocol'.
Jakub Zawadzki [Fri, 19 Jan 2018 18:06:10 +0000 (19:06 +0100)]
sharkd: try to fix clang uninitialized value stored to field 'protocol'.

Instead of using g_memdup(), make it more C-like.

Change-Id: Ifde75801a261f9e269391fabf323f34a4e3508ac
Reviewed-on: https://code.wireshark.org/review/25395
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2 years agoDocbook: Generate one PDF paper size.
Gerald Combs [Tue, 23 Jan 2018 19:02:16 +0000 (11:02 -0800)]
Docbook: Generate one PDF paper size.

Generate a single PA4-sized PDF. PA4 is the approximate intersection of
A4 and Letter[1]. This gives us one less file to build and distribute.

If you're printing out hard copies of the guides this wastes a few pages
compared to an A4-sized PDF, but if you're printing out hard copies of
the guides you've already made a strong commitment to waste paper.

Page counts:

    Guide    Size      Pages

    WSDG     A4        203
    WSDG     Letter    217
    WSDG     PA4       217

    WSUG     A4        192
    WSUG     Letter    204
    WSUG     PA4       205

[1] https://en.wikipedia.org/wiki/Paper_size#PA4_or_L4

Change-Id: If43d4b19947c77a51b3943a2b329dbab45025d79
Reviewed-on: https://code.wireshark.org/review/25438
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agoQUIC: fix build with older Libgcrypt
Richard Sharpe [Tue, 23 Jan 2018 18:21:10 +0000 (19:21 +0100)]
QUIC: fix build with older Libgcrypt

RHEL7 ships with Libgcrypt 1.5.3 which does not support AEAD, add guards
to fix -Wunused-function errors.

Change-Id: I230a66eff0dca9a882bf87f2f740ee0d36cd1dc6
Reviewed-on: https://code.wireshark.org/review/25434
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2 years ago[MEGACO] Priority value gets displayed as Termitation Id.
AndersBroman [Tue, 23 Jan 2018 14:23:11 +0000 (15:23 +0100)]
[MEGACO] Priority value gets displayed as Termitation Id.

Change-Id: If176231d1c71692b1d6a2627934d211e4f2476a7
Reviewed-on: https://code.wireshark.org/review/25433
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agoUSBMS: fix endianness of GET MAX LUN and RESET
Pascal Quantin [Tue, 23 Jan 2018 09:02:02 +0000 (10:02 +0100)]
USBMS: fix endianness of GET MAX LUN and RESET

While we are at it, let's add the protocol item to allow filtering on
protocol.

Bug: 14360
Change-Id: I4973a6e657dccd71af4f798584cc118b75bedd20
Reviewed-on: https://code.wireshark.org/review/25425
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoLTE RRC: register dissectors for UERadioAccessCapabilityInformation(-NB) and UERadioP...
Pascal Quantin [Tue, 23 Jan 2018 10:37:25 +0000 (11:37 +0100)]
LTE RRC: register dissectors for UERadioAccessCapabilityInformation(-NB) and UERadioPagingInformation(-NB)

Change-Id: Idb3c3fe2cab4ce7aff2bfe108a6bd4fb07fe44b3
Reviewed-on: https://code.wireshark.org/review/25426
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agogtk: fix memory leak in profile dialog.
Jakub Zawadzki [Mon, 22 Jan 2018 20:16:01 +0000 (21:16 +0100)]
gtk: fix memory leak in profile dialog.

fill_list() don't break the loop when it founds first profile matching
name, and it can memleak if somehow it found more than one.
Don't break the loop to avoid regressions. Just g_free() previously found.
Found by clang.

Change-Id: I082b3f1d16f07580a6d7c814d2a8ee5463a44b0f
Reviewed-on: https://code.wireshark.org/review/25422
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2 years agogtk: Fix memory error/double free.
Jakub Zawadzki [Mon, 22 Jan 2018 17:28:16 +0000 (18:28 +0100)]
gtk: Fix memory error/double free.

pathname is freed by caller of firewall_save_as_ok_cb(). Make pathname const.
Found by clang scan.

Change-Id: I3a0ab85494a9194edb825bae33eca979c7f8faf3
Reviewed-on: https://code.wireshark.org/review/25417
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2 years agotraffic table: Fix memory leak
Jakub Zawadzki [Mon, 22 Jan 2018 18:02:27 +0000 (19:02 +0100)]
traffic table: Fix memory leak

Free tpl_line in error path.
Founded by clang scan.

Change-Id: Iaaaaed155d859171ee880d520c11594b2d4d0b59
Reviewed-on: https://code.wireshark.org/review/25420
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2 years agogtk: Fix memory leak.
Jakub Zawadzki [Mon, 22 Jan 2018 17:24:33 +0000 (18:24 +0100)]
gtk: Fix memory leak.

free buffer in error path.
Found by clang scan.

Change-Id: I7c271b74e3e5ac9d4f2a550f3c83988a4594133d
Reviewed-on: https://code.wireshark.org/review/25416
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2 years agogtk: fix multiple memory leaks in prefs_capture
Jakub Zawadzki [Mon, 22 Jan 2018 17:45:47 +0000 (18:45 +0100)]
gtk: fix multiple memory leaks in prefs_capture

All leaks follow the same pattern if not gtk_tree_model_get_iter_first(),
than memory allocated was not used/ freed.
Put memory allocation under gtk_tree_model_get_iter_first() block.
Found by clang scan.

Change-Id: I8f9671ae5fb043343ab5dcdc39a57f1d28fec15b
Reviewed-on: https://code.wireshark.org/review/25418
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2 years agopacket-ieee80211: fix dead store/ dead increment and assignment.
Jakub Zawadzki [Mon, 22 Jan 2018 17:49:42 +0000 (18:49 +0100)]
packet-ieee80211: fix dead store/ dead increment and assignment.

offset was not used after increment/assignment, just return it to relax clang.
Found by clang scan.

Change-Id: I21dece4e31075ca2da8d3ba942336fb4858636b6
Reviewed-on: https://code.wireshark.org/review/25419
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2 years agorelease-notes: Add note about support of 802.11ax
Alexis La Goutte [Mon, 22 Jan 2018 10:48:01 +0000 (10:48 +0000)]
release-notes: Add note about support of 802.11ax

Change-Id: I361dceb79bed6c2a201db115dba1fad3cad2f659
Reviewed-on: https://code.wireshark.org/review/25414
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoZigBee: Add a preference to choose ZigBee Smart Energy version used for dissecting
Martin Boye Petersen [Sun, 21 Jan 2018 20:17:08 +0000 (21:17 +0100)]
ZigBee: Add a preference to choose ZigBee Smart Energy version used for dissecting

Some ZigBee commands within the Smart Energy Profile does not have the same payload
across different specifications. With this preference it is possible to choose what
version of the specification to use when dissecting payloads.
The default version is set to the latest one, which is Smart Energy 1.4, even though
it is still under development.

Change-Id: Iaec5528f2a418aeec4e39cfa087a58e531570d42
Reviewed-on: https://code.wireshark.org/review/25409
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Kenneth Soerensen <knnthsrnsn@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoERF: Fix broken erf_open ethernet checking
Anthony Coddington [Mon, 22 Jan 2018 04:38:44 +0000 (17:38 +1300)]
ERF: Fix broken erf_open ethernet checking

Was copying 8 byte extension header instead of 2 byte ethernet padding subheader.
Introduced recently by I8ede5c733867ccc98ab2d470181d1e4a29ae5b49.

Change-Id: I95a8604ed6204dff33f1794601342e090f6b7eb3
Reviewed-on: https://code.wireshark.org/review/25410
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2 years agoieee80211: 802.11ax support.
Richard Sharpe [Thu, 18 Jan 2018 17:40:24 +0000 (09:40 -0800)]
ieee80211: 802.11ax support.

This is based on Draft 2 of the standard. Draft 2 did not get approved, but
is close to what the final version will be and support is needed now by the
teams working on this.

Change-Id: I837df05a288b815e1e455883f4f165721104d51f
Reviewed-on: https://code.wireshark.org/review/24861
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agotap-httpstat: cast memory instead of reallocate it in glib hash table.
Dario Lombardo [Tue, 16 Jan 2018 16:45:02 +0000 (17:45 +0100)]
tap-httpstat: cast memory instead of reallocate it in glib hash table.

Change-Id: I74db1247f15bdd12fb3ef7fa258d0018605caa30
Reviewed-on: https://code.wireshark.org/review/25346
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agoQUIC: Add define value for Long Packet Type (Initial, Handshake...)
Alexis La Goutte [Fri, 19 Jan 2018 22:01:13 +0000 (23:01 +0100)]
QUIC: Add define value for Long Packet Type (Initial, Handshake...)

Bug: 13881
Change-Id: Ia733a9e84e6a7dea58a62bcc1c9d79f51e5b46ff
Reviewed-on: https://code.wireshark.org/review/25401
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoQUIC: Remove draft-05 and draft-06
Alexis La Goutte [Fri, 19 Jan 2018 21:40:13 +0000 (22:40 +0100)]
QUIC: Remove draft-05 and draft-06

All tools use draft-07 or draft-08

Bug: 13881
Change-Id: I539e34324f16149fe8c0d05d938bae1298b9eb15
Reviewed-on: https://code.wireshark.org/review/25399
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoQUIC: Update IETF draft URL (draft-08)
Alexis La Goutte [Fri, 19 Jan 2018 21:46:44 +0000 (22:46 +0100)]
QUIC: Update IETF draft URL (draft-08)

and add also IETF QUIC TLS (-08) draft

Bug: 13881
Change-Id: I5662faeb5d1738c896ba66b6857e70baafd3afee
Reviewed-on: https://code.wireshark.org/review/25400
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoQt: Translate files in subdirectories.
Gerald Combs [Thu, 18 Jan 2018 23:02:12 +0000 (23:02 +0000)]
Qt: Translate files in subdirectories.

Make sure we pass ui/qt/*/*.{cpp,h} to lupdate. Make update-tx a
bash script and make sure it passes ShellCheck. Add a -n flag, which
disables pushing back to Transifex.

Change-Id: Ia7d6564bbdbf69285f1f9b88cde09e37da4f916c
Reviewed-on: https://code.wireshark.org/review/25382
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoQt: Proto tree fixes
Gerald Combs [Fri, 19 Jan 2018 19:02:07 +0000 (11:02 -0800)]
Qt: Proto tree fixes

Make sure ProtoTree::toString stops at the right place.

Don't emit fieldSelected when we're processing a context menu event. It
doesn't appear to be needed and it triggers unwanted automatic scrolling
when prefs.gui_auto_scroll_on_expand is enabled.

Change-Id: I351a6974d07aea6fdd3eb0b5c1975a1b8d8eb7da
Reviewed-on: https://code.wireshark.org/review/25396
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoQt: Implement ProtoTreeModel::flags.
Gerald Combs [Thu, 18 Jan 2018 18:45:43 +0000 (10:45 -0800)]
Qt: Implement ProtoTreeModel::flags.

QTreeView checks to see if Qt::ItemNeverHasChildren is set in various
places, particularly when updating its set of expanded items. Implement
ProtoTreeModel::flags and set Qt::ItemNeverHasChildren when needed so
that QTreeView won't mark a leaf node expanded. Otherwise
ProtoTree::isExpanded will return true when it shouldn't and break the
iterator in ProtoTree::toString.

Bug: 14355
Change-Id: Id89be9911aa14dbbb52725f7203ac26a747c42fc
Reviewed-on: https://code.wireshark.org/review/25376
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoQt: Create byte views at the proper zoom level.
Gerald Combs [Thu, 18 Jan 2018 16:31:58 +0000 (08:31 -0800)]
Qt: Create byte views at the proper zoom level.

Add a zoomed argument to WiresharkApplication::monospaceFont so that we
can easily fetch the font at its current zoom level. Set the zoomed font
when we create new ByteViewTexts.

Change-Id: I1293f206e37bb798247b1ac4b314fdfe88d4c55c
Reviewed-on: https://code.wireshark.org/review/25371
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoCMake: File copy updates.
Gerald Combs [Sat, 20 Jan 2018 00:02:20 +0000 (16:02 -0800)]
CMake: File copy updates.

Switch from `xcopy`-ing single files to `cmake -E copy_if_different`-ing
multiple files on Windows. Add a comment about using copy_if_different
for our data files.

Switch from `cmake -E copy` to `cmake -E copy_if_different` in a couple
of other places.

Change-Id: I6bf72f02a66c46a4440280305479f41ffb4e987a
Reviewed-on: https://code.wireshark.org/review/25402
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agoautotools: Rework the plugin Makefiles
Jaap Keuter [Fri, 19 Jan 2018 20:20:38 +0000 (21:20 +0100)]
autotools: Rework the plugin Makefiles

The plugin.c generation in an autotools build comes in from an included
Makefile.am file. The various types of plugins need different parameters
for the generation script. Put the plugin.c production rule is a seperate
include file so each plugin type build can include its own variant.

Also amend the README.plugins file with regards to the new directory
structure and the fact that there are multiple types of plugins, not just
dissector plugins.

Change-Id: I3a815d0d767baa555356cf428861b18697401355
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/25398
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agoQt: Initialize a struct (found by Coverity)
Gerald Combs [Sat, 20 Jan 2018 21:26:13 +0000 (13:26 -0800)]
Qt: Initialize a struct (found by Coverity)

CID: 1427679
Change-Id: I2ed276f0da413b4853b7dc9ccde3530e655ad760
Reviewed-on: https://code.wireshark.org/review/25403
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: Michael Mann <mmann78@netscape.net>
2 years ago[Automatic update for 2018-01-21]
Gerald Combs [Sun, 21 Jan 2018 08:18:39 +0000 (08:18 +0000)]
[Automatic update for 2018-01-21]

Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I60c7bef36988fd487d9088880b1d27818723f0b7
Reviewed-on: https://code.wireshark.org/review/25404
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agowiretap: use SPDX identifiers (partial work).
Dario Lombardo [Fri, 19 Jan 2018 11:33:53 +0000 (12:33 +0100)]
wiretap: use SPDX identifiers (partial work).

Change-Id: I28436e003ce7fe31d53e6663f3cc7aca00845e4b
Reviewed-on: https://code.wireshark.org/review/25392
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agowiretap: more SPDX license convertions.
Dario Lombardo [Fri, 19 Jan 2018 14:34:23 +0000 (15:34 +0100)]
wiretap: more SPDX license convertions.

Change-Id: I12695d0713b1d7fe58f09b2037303fab523085e9
Reviewed-on: https://code.wireshark.org/review/25394
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agoradiotap: Updates to the radiotap dissector to avoid confusion.
Richard Sharpe [Fri, 19 Jan 2018 14:57:56 +0000 (06:57 -0800)]
radiotap: Updates to the radiotap dissector to avoid confusion.

If a field is indicated as not known, then display that field as reserved
which will prevent people from searching for fields that are not known and
makes more sense.

Also, rename some of the hf fields to be more in line with standard practice.

Change-Id: I5cbbd682acbea3713b7b19325fe1a36cc0e36aa1
Reviewed-on: https://code.wireshark.org/review/25397
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2 years agoQt: Force integer font metrics in the byte view.
Gerald Combs [Thu, 18 Jan 2018 22:07:57 +0000 (14:07 -0800)]
Qt: Force integer font metrics in the byte view.

Force the layout engine to use integer arithmetic so that we don't run
into wierd rounding artifacts.

Include the leading when applying formats.

Restrict the hover line width to either 0.5 or 1 logical pixels.

Change-Id: Icc992e085e96e328ed4ed247271f75ddd69637bc
Reviewed-on: https://code.wireshark.org/review/25381
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agoieee1905: Bring AP Metric TLVs into conformance with the SPEC
Richard Sharpe [Fri, 19 Jan 2018 15:25:27 +0000 (07:25 -0800)]
ieee1905: Bring AP Metric TLVs into conformance with the SPEC

There was a missing field in the initial version of the spec. Add the
flags bits that define the subsequenct fields.

Change-Id: Ie237075f4f7f30adc4b280358fe5c985c63f5281
Reviewed-on: https://code.wireshark.org/review/25375
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2 years agoQt: add sanity check in InterfaceTreeCacheModel (found by clang).
Dario Lombardo [Thu, 18 Jan 2018 16:24:25 +0000 (17:24 +0100)]
Qt: add sanity check in InterfaceTreeCacheModel (found by clang).

Change-Id: I8f73254d8ac4b560937431b592a81ad726ce43a9
Reviewed-on: https://code.wireshark.org/review/25370
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: Michael Mann <mmann78@netscape.net>
2 years agoQt: remove leak from PathChooserDelegate (found by clang).
Dario Lombardo [Thu, 18 Jan 2018 17:29:24 +0000 (18:29 +0100)]
Qt: remove leak from PathChooserDelegate (found by clang).

Change-Id: I71d73c8464450f8cbc655f8f99f54bd34eddd344
Reviewed-on: https://code.wireshark.org/review/25374
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2 years agoepl: Correctly display the error for available bytes
Roland Knall [Fri, 19 Jan 2018 12:47:01 +0000 (13:47 +0100)]
epl: Correctly display the error for available bytes

Don't break the remaining length by setting and invalid one

Change-Id: Ia32798db73937ada6c99a6927cc87402603a9e75
Reviewed-on: https://code.wireshark.org/review/25391
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agofile: free memory on exit (found by clang).
Dario Lombardo [Fri, 19 Jan 2018 08:32:27 +0000 (09:32 +0100)]
file: free memory on exit (found by clang).

Change-Id: I8d57ae2f6aa114f64d7cd11ca63ce6ae88fd4b68
Reviewed-on: https://code.wireshark.org/review/25385
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agoRVSP: fix typo found by conflict hf
Alexis La Goutte [Fri, 19 Jan 2018 12:04:02 +0000 (12:04 +0000)]
RVSP: fix typo found by conflict hf

'rsvp.template_filter.ipv4_tunnel_sender_address' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'rsvp.template_filter.sub_group_originator_id' exists multiple times with NOT compatible types: FT_UINT16 and FT_BYTES

Change-Id: I922ef6742c7f340519adc6014ec37e29cb0e34c7
Reviewed-on: https://code.wireshark.org/review/25390
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agoplugin_if: don't allocate memory and cast it instead.
Dario Lombardo [Tue, 16 Jan 2018 15:38:50 +0000 (16:38 +0100)]
plugin_if: don't allocate memory and cast it instead.

Glib hash table can use integers as pointer by casting them
using GINT_TO_POINTER. This prevents alloc/free of memory.

Leak found by clang.

Change-Id: Ieae4d1ec787e41aef0657d27bdaefe30d12e2b80
Reviewed-on: https://code.wireshark.org/review/25341
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agoextcap: add g_free (found by clang).
Dario Lombardo [Fri, 19 Jan 2018 09:38:05 +0000 (10:38 +0100)]
extcap: add g_free (found by clang).

Change-Id: Ibb3f8e576f36447daeff7abe00153e0aa31e4022
Reviewed-on: https://code.wireshark.org/review/25389
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agotap-sctp: change if to switch for a default case (found by clang).
Dario Lombardo [Fri, 19 Jan 2018 09:24:11 +0000 (10:24 +0100)]
tap-sctp: change if to switch for a default case (found by clang).

Change-Id: I5158c1db63258e194cdad987529019069e537ab3
Reviewed-on: https://code.wireshark.org/review/25387
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agotap-wspstat: cast memory instead of allocate.
Dario Lombardo [Fri, 19 Jan 2018 09:38:50 +0000 (10:38 +0100)]
tap-wspstat: cast memory instead of allocate.

Change-Id: Ia878a871702718093bd483fe83ecb9ba7328b7db
Reviewed-on: https://code.wireshark.org/review/25386
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agowimax (plugins): fix no previous prototype for function 'proto_reg_handoff_wimax...
Alexis La Goutte [Fri, 19 Jan 2018 09:13:01 +0000 (09:13 +0000)]
wimax (plugins): fix no previous prototype for function 'proto_reg_handoff_wimax' [-Wmissing-prototypes]

Change-Id: Icc79994ace4e32def3f03cf62b49f3c7dd3011df
Reviewed-on: https://code.wireshark.org/review/25384
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agoBe accurate in release notes
Jaap Keuter [Fri, 19 Jan 2018 09:33:17 +0000 (10:33 +0100)]
Be accurate in release notes

Codecs in general come in many flavours, G.729 non in the least.
Be accurate about what codec implementation is actually provided.

Change-Id: I372062906bef973c8e19b63e5296574780d8a89e
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/25388
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agoDon't do pcap heuristics on a pipe.
Guy Harris [Fri, 19 Jan 2018 07:06:24 +0000 (23:06 -0800)]
Don't do pcap heuristics on a pipe.

Instead, just:

  assume a file with the regular pcap magic number is a regular pcap
  file, not an unhelpfully-modified-without-changing-the-magic-number
  format such as one of the (fortunately, short-lived) memory-mapped
  capture formats or the Nokia format;

  reject a file with the memory-mapped-capture-finally-changed-the-
  magic-number magic number, as they then changed the *new* format
  without changing its magic number;

  and don't even leave a provision for multiple formats using the
  "nanosecond pcap" magic number - not even when reading from a file -
  so we can punish bad behavior (which is what changing the format
  without changing the magic number is).

This should get rid of the last place where, when reading a pcap file
from a pipe, the first packet isn't displayed as soon as it arrives.

Bug: 14345
Change-Id: I2fcb3354dc84cdd2d8ec749a0db883e56971c4b4
Reviewed-on: https://code.wireshark.org/review/25383
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2 years agoS1AP: upgrade dissector to v15.0.0
Pascal Quantin [Thu, 18 Jan 2018 21:37:39 +0000 (22:37 +0100)]
S1AP: upgrade dissector to v15.0.0

Change-Id: I2c2a0f8093678769427ff4303ad41a5c97bdd05c
Reviewed-on: https://code.wireshark.org/review/25379
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoRemove an unnecessary test.
Guy Harris [Thu, 18 Jan 2018 22:12:42 +0000 (14:12 -0800)]
Remove an unnecessary test.

out.next is initialized to point to the beginning of the buffer when a
FILE_T is created, so it won't be null.

Change-Id: Ib29f713ab3c524c9c7d83e8d9f3bef89fde1d5b5
Reviewed-on: https://code.wireshark.org/review/25380
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2 years agoUse separate pointers for the input expert info and the copy we make.
Guy Harris [Thu, 18 Jan 2018 19:29:36 +0000 (11:29 -0800)]
Use separate pointers for the input expert info and the copy we make.

That eliminates the need for qualifier-removing casts.

Change-Id: I90728858ec43ddabf663f30258df6e9c41aa191a
Reviewed-on: https://code.wireshark.org/review/25378
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2 years agoDon't overwrite the struct wtap_pkthdr; copy and change it instead.
Guy Harris [Thu, 18 Jan 2018 19:19:36 +0000 (11:19 -0800)]
Don't overwrite the struct wtap_pkthdr; copy and change it instead.

Do as we do in other cases - copy the current struct wtap_pkthdr to a
temporary one (which might copy the temporary one to itself), modify it,
and set the pointer to the struct wtap_pkthdr to point to the temporary
one.

Note all the places wherw we do this with a comment.

Change-Id: Ia11df6b997a5369d96436d3bd825ab0138742504
Reviewed-on: https://code.wireshark.org/review/25377
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2 years agoQt: Fixup a cast.
Gerald Combs [Thu, 18 Jan 2018 16:46:41 +0000 (08:46 -0800)]
Qt: Fixup a cast.

Change-Id: I25dbf6c91bd3ca1f16a01c937a3830010adcd197
Reviewed-on: https://code.wireshark.org/review/25373
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agoQt: return if cf_read_record() fails in PacketDialog (found by clang).
Dario Lombardo [Tue, 16 Jan 2018 13:40:06 +0000 (14:40 +0100)]
Qt: return if cf_read_record() fails in PacketDialog (found by clang).

Change-Id: I5187b378db9bae092052ce50b337f266e08e4332
Reviewed-on: https://code.wireshark.org/review/25340
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agoglusterfs: Add support for getvolumeinfo procedure
Prashanth Pai [Tue, 16 Jan 2018 09:12:42 +0000 (14:42 +0530)]
glusterfs: Add support for getvolumeinfo procedure

Bug: 14347
Change-Id: Ib8fcaa5f0af06d1f1141dbb51696d88fde7d71ba
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: https://code.wireshark.org/review/25335
Tested-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2 years ago[PFCP] Corrected Header Fields in Report Type IE
Matej Tkac [Thu, 18 Jan 2018 10:55:53 +0000 (11:55 +0100)]
[PFCP] Corrected Header Fields in Report Type IE

Change-Id: If50a4bf79edd69d14015b4262d5195d581082cc4
Reviewed-on: https://code.wireshark.org/review/25367
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years ago3GPP NAS: rework PCO loop to better report extra data at the end of the payload
Pascal Quantin [Thu, 18 Jan 2018 10:54:24 +0000 (11:54 +0100)]
3GPP NAS: rework PCO loop to better report extra data at the end of the payload

This will help identifying that the packet contains unexpected data at the end
rather than triggering a malformed error when trying to fetch outside of
the tvb.

Change-Id: Ieb71204f3c364e809447157e7a71c3eb92620d85
Reviewed-on: https://code.wireshark.org/review/25366
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2 years agocmake: add ps.c to the checkAPI list with the proper path.
Dario Lombardo [Mon, 15 Jan 2018 20:54:17 +0000 (21:54 +0100)]
cmake: add ps.c to the checkAPI list with the proper path.

This removes an error when running cmake target checkAPI_epan.

No such file: "ps.c" at wireshark/tools/checkAPIs.pl line 2144.

This error is related to out-of-tree builds. In-tree builds are not
affected since the generated files live next to the versioned ones.

Change-Id: I3a6b05eaf4b7bb703222c47233576d0cb77e66d1
Reviewed-on: https://code.wireshark.org/review/25330
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2 years agoLPP: upgrade dissector to v14.4.0
Pascal Quantin [Thu, 18 Jan 2018 09:34:36 +0000 (10:34 +0100)]
LPP: upgrade dissector to v14.4.0

Change-Id: I87406dd9311bd6e379a38c66ec61c1c2d8d9412f
Reviewed-on: https://code.wireshark.org/review/25365
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2 years agoMake apply_profile_changes() return a non-const pointer.
Guy Harris [Thu, 18 Jan 2018 07:33:03 +0000 (23:33 -0800)]
Make apply_profile_changes() return a non-const pointer.

It returns a pointer to a g_mallocated string, which the caller has to
free, so its return value shouldn't be a const pointer.

Change-Id: I76f288379a5c1eff580c391bdc9019ab7fe8f336
Reviewed-on: https://code.wireshark.org/review/25364
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2 years agoX2AP: upgrade dissector to v15.0.0
Pascal Quantin [Wed, 17 Jan 2018 22:34:00 +0000 (23:34 +0100)]
X2AP: upgrade dissector to v15.0.0

Change-Id: Ib2e01a19f5b4f37fcee7bdf3b2ed231c5606162a
Reviewed-on: https://code.wireshark.org/review/25357
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoDon't cast away constness.
Guy Harris [Thu, 18 Jan 2018 07:11:07 +0000 (23:11 -0800)]
Don't cast away constness.

Change-Id: I76656dbb950589c8936a01574c747fc8f3a7f864
Reviewed-on: https://code.wireshark.org/review/25363
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2 years agoConstify some pointers.
Guy Harris [Thu, 18 Jan 2018 06:08:46 +0000 (22:08 -0800)]
Constify some pointers.

Change-Id: I4f443f777c92fa62fbe2448e891ba93d02fde3ad
Reviewed-on: https://code.wireshark.org/review/25362
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2 years agosharkd: set uninitialized values (found by clang).
Dario Lombardo [Wed, 17 Jan 2018 15:49:21 +0000 (16:49 +0100)]
sharkd: set uninitialized values (found by clang).

Change-Id: Ie68c23be4e40b815c995008a43e3c5443a9de5f6
Reviewed-on: https://code.wireshark.org/review/25353
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2 years agosharkd: check for NULL before dereference (found by clang).
Dario Lombardo [Tue, 16 Jan 2018 11:43:34 +0000 (12:43 +0100)]
sharkd: check for NULL before dereference (found by clang).

Change-Id: If49504b3360e325555a624b11a43ac30884748c9
Reviewed-on: https://code.wireshark.org/review/25337
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2 years agodcerpc: remove use-after-free (found by clang).
Dario Lombardo [Wed, 17 Jan 2018 14:00:03 +0000 (15:00 +0100)]
dcerpc: remove use-after-free (found by clang).

Change-Id: I6db7e47fc5e67afcad78763cb739a3f13a47b923
Reviewed-on: https://code.wireshark.org/review/25352
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2 years agofile: stop printing packets if 0 columns are asked (found by clang).
Dario Lombardo [Wed, 17 Jan 2018 13:54:36 +0000 (14:54 +0100)]
file: stop printing packets if 0 columns are asked (found by clang).

This prevents a 0 bytes memory allocation (line 2383/4) and its subsequent
dereference (line 2399).

Change-Id: Ie88293699a55b9b48afe23d7371798e709bc1eaa
Reviewed-on: https://code.wireshark.org/review/25351
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2 years agoDon't cast away constness if it's not necessary.
Guy Harris [Thu, 18 Jan 2018 06:00:30 +0000 (22:00 -0800)]
Don't cast away constness if it's not necessary.

Change-Id: Ic5ecf4628f03c63b68fadd9ffed49cfd5497d99c
Reviewed-on: https://code.wireshark.org/review/25361
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2 years agoDon't cast away constness if it's not necessary.
Guy Harris [Thu, 18 Jan 2018 05:51:12 +0000 (21:51 -0800)]
Don't cast away constness if it's not necessary.

Change-Id: Ie87983f5cbe38266e4f522613b21d25d67ef328f
Reviewed-on: https://code.wireshark.org/review/25360
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2 years agoMake a pointer const that has no need not to be const.
Guy Harris [Thu, 18 Jan 2018 05:47:49 +0000 (21:47 -0800)]
Make a pointer const that has no need not to be const.

Change-Id: I32c86988823fcea96239b199bf21b98ee3ec8a5e
Reviewed-on: https://code.wireshark.org/review/25359
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2 years agoDon't insist on reading a full buffer from the input file.
Guy Harris [Thu, 18 Jan 2018 04:02:56 +0000 (20:02 -0800)]
Don't insist on reading a full buffer from the input file.

Don't loop trying to read a full buffer from the input file.

If you're reading from a file, on UN*X or Windows, you should get the
entire read count unless you're fewer than buffer-size bytes from the
end of the file, in which case you should get what remains in the file.

If you're reading from a pipe, however, that could cause you to block
longer than necessary waiting for a full buffer rather than just for the
next chunk of data from the pipe - which might not be a bufferful, if
the program writing to the file is itself writing less-than-bufferful
chunks, as may be the case in, for example, a pipeline coming from a
live capture and with the intent that TShark display the packets as they
arrive.

While we're at it, if we're trying to do a seek and the seek takes place
within the buffer of uncompressed data, just adjust the position within
that buffer for forward seeks as well as backward seeks; this
substantially reduces the number of ws_lseek64() calls when making a
sequential pass through the file in Wireshark (e.g., running a tap or
filtering the display) and, as we purge the buffer after the
ws_lseek64(), substantically reduces the number of ws_read() calls in
that situation as well.

Have a data structure for a file data buffer, and use it for both the
"input" (compressed data) and "output" (uncompressed data) buffers.
Rename raw_read() to buf_read(), as it reads into a buffer.

Change-Id: I7982b3499a7613a993913a6db887054730764160
Ping-Bug: 14345
Reviewed-on: https://code.wireshark.org/review/25358
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2 years agoQt: Fix bits highlighting in the byte view.
Gerald Combs [Wed, 17 Jan 2018 18:32:11 +0000 (10:32 -0800)]
Qt: Fix bits highlighting in the byte view.

When the byte view is set to "Show bytes as bits" make sure we highlight
all eight bits instead of just two.

Change-Id: I1ece65032fa32f7274f4e7383e538b92e8fa4f65
Reviewed-on: https://code.wireshark.org/review/25354
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agoQt: I/O graph fixes.
Gerald Combs [Wed, 17 Jan 2018 21:50:56 +0000 (13:50 -0800)]
Qt: I/O graph fixes.

Use Qt::DecorationRole when setting and getting a color and
Qt::CheckStateRole when setting and getting the check state of UatModel
items.

Add a default role for UatModel::data.

Convert between value strings and their respective values where needed.

Bug: 14317
Change-Id: Idd3eb773dc9944f982f6dbd7d49f73f4a60dd5a2
Reviewed-on: https://code.wireshark.org/review/25355
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
2 years agocoap: Change Uri-Path from hidden to generated
Stig Bjørlykke [Wed, 17 Jan 2018 12:38:41 +0000 (13:38 +0100)]
coap: Change Uri-Path from hidden to generated

This field is generated so mark it so.  It may also be usable so
make it visible.

Change-Id: I10d951f234f1fba240059bc791b40d25dede07a9
Reviewed-on: https://code.wireshark.org/review/25350
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2 years agoQt: ByteViewText hover fixes & updates.
Gerald Combs [Wed, 17 Jan 2018 00:41:36 +0000 (16:41 -0800)]
Qt: ByteViewText hover fixes & updates.

Add back field highlighting during hover.

Instead of marking hovered bytes using an underline+overline, draw a
border rect.

Change-Id: I574dd074cfa021ac0dec3cdea6c5f9b0b4da6d0e
Reviewed-on: https://code.wireshark.org/review/25348
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2 years agostat_tap: don't use-after-free (found by clang).
Dario Lombardo [Tue, 16 Jan 2018 13:11:58 +0000 (14:11 +0100)]
stat_tap: don't use-after-free (found by clang).

Change-Id: Ie7304ad70c8cf3ac62abdf07aaa94d12c409f1b0
Reviewed-on: https://code.wireshark.org/review/25339
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agoWiretap: Add a missing comma.
Gerald Combs [Tue, 16 Jan 2018 20:06:33 +0000 (12:06 -0800)]
Wiretap: Add a missing comma.

Found via CID 1427615.

Change-Id: I519b3905d33b0b2aa3ce164810b9e6358f6df1bd
Reviewed-on: https://code.wireshark.org/review/25347
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2 years agoUpdate paths after dissector plugin move.
Jaap Keuter [Tue, 16 Jan 2018 15:59:28 +0000 (16:59 +0100)]
Update paths after dissector plugin move.

With the change in paths of the dissector plugins in the repository some
other paths require adjustment. These are the obvious changes remaining.

Change-Id: Id49ac6aaf1a29d9eb37f4c32226a4597d5e32edd
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/25343
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agocapchild: free memory on error.
Dario Lombardo [Tue, 16 Jan 2018 16:05:54 +0000 (17:05 +0100)]
capchild: free memory on error.

Change-Id: If2cd8d344dced80b16789744a0b504c505ba0824
Reviewed-on: https://code.wireshark.org/review/25344
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agoQt: add more sanity checks in utils (found by clang).
Dario Lombardo [Tue, 16 Jan 2018 16:28:56 +0000 (17:28 +0100)]
Qt: add more sanity checks in utils (found by clang).

Ensure the pointer exist before dereference them.

Change-Id: I7c2881c9c74b88517d01d9306507c14ff2a7b257
Reviewed-on: https://code.wireshark.org/review/25345
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agoQt: Fix proto tree links and related frames.
Gerald Combs [Tue, 16 Jan 2018 01:13:45 +0000 (17:13 -0800)]
Qt: Fix proto tree links and related frames.

Add FieldInformation::isLink and use it to style link items.

Add back a related frame information.

Get rid of rowsInserted() and just visit each tree node starting from
the root.

Change-Id: I0e7ef6b2e11d25465705adffbb77d6f6cfb2a435
Reviewed-on: https://code.wireshark.org/review/25342
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2 years agoEtherCAT: Add Mailbox as a string in EtherCAT Frame Types.
Michalis Kapsalakis [Tue, 16 Jan 2018 12:06:38 +0000 (13:06 +0100)]
EtherCAT: Add Mailbox as a string in EtherCAT Frame Types.

This commit adds the missing mailbox type to the EthercatFrameTypes
array.

Change-Id: I0710b723cdfa6cff28b6655729dafb68678518cb
Reviewed-on: https://code.wireshark.org/review/25338
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: Dario Lombardo <lomato@gmail.com>