metze/wireshark/wip.git
6 years agoTest: Fix default capture interface discovery.
Gerald Combs [Thu, 3 May 2018 19:06:52 +0000 (12:06 -0700)]
Test: Fix default capture interface discovery.

Change-Id: Id033a0e4e1e81ae9e84774b2d76f95049a2e2b3a
Reviewed-on: https://code.wireshark.org/review/27315
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoQt: Fix toolbar signal on start capture
Stig Bjørlykke [Thu, 3 May 2018 12:49:24 +0000 (14:49 +0200)]
Qt: Fix toolbar signal on start capture

Always call toolbar->startCapture() when starting a capture even if
not having a list of interfaces. startCapture() will check for this.

Change-Id: Ifb654f403c72e1d687ae1f6471fc955aa4f6f23c
Ping-Bug: 14631
Reviewed-on: https://code.wireshark.org/review/27306
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agogitlab-ci: add gcc-8 and use it for nopcap build.
Dario Lombardo [Thu, 3 May 2018 10:46:06 +0000 (12:46 +0200)]
gitlab-ci: add gcc-8 and use it for nopcap build.

Change-Id: If7c17202f45ea0832596d5a87154b9ea333a5296
Reviewed-on: https://code.wireshark.org/review/27303
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agotools: add missing optional packages in debian/rpm setup.
Dario Lombardo [Thu, 3 May 2018 12:54:17 +0000 (14:54 +0200)]
tools: add missing optional packages in debian/rpm setup.

Change-Id: Ie84f8d6e9ebdff0b760bc71ec227358ce23f427d
Reviewed-on: https://code.wireshark.org/review/27307
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agotools: add ninja to debian/rpm additional packages.
Dario Lombardo [Thu, 3 May 2018 10:51:45 +0000 (12:51 +0200)]
tools: add ninja to debian/rpm additional packages.

Change-Id: I56c1af8a5a4bdd4f9c2276a6e246a1b76a003049
Reviewed-on: https://code.wireshark.org/review/27302
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agoQt: Set margins in createEditor layout
Stig Bjørlykke [Thu, 3 May 2018 12:44:49 +0000 (14:44 +0200)]
Qt: Set margins in createEditor layout

Try to align the QComboBox with the other elements.

Change-Id: I63acdc2eb463e8806edffe27d67423dc37d161e5
Reviewed-on: https://code.wireshark.org/review/27305
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoSDP: do not assume that media_desc pointer is always set
Pascal Quantin [Thu, 3 May 2018 12:20:26 +0000 (14:20 +0200)]
SDP: do not assume that media_desc pointer is always set

Bug: 14648
Change-Id: I9d585a1b49e15529b19414be52c8bf198475fd62
Reviewed-on: https://code.wireshark.org/review/27304
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>
6 years agomake-version.pl: Make the SVN output more similar to the git one.
AndersBroman [Thu, 3 May 2018 09:01:10 +0000 (11:01 +0200)]
make-version.pl: Make the SVN output more similar to the git one.

Change-Id: I37930178e52ea0b319b62d3ab1f56f6b0d5aadea
Reviewed-on: https://code.wireshark.org/review/27301
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Joakim Karlsson <oakimk@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agomac-nr: 15.1.0 changes to RAR PDU
Martin Mathieson [Wed, 2 May 2018 20:41:26 +0000 (21:41 +0100)]
mac-nr: 15.1.0 changes to RAR PDU

Change-Id: I0442831b13ecf276d4235230a6a9aa0788e91d3f
Reviewed-on: https://code.wireshark.org/review/27282
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
6 years agopfcp: correction of length
Joakim Karlsson [Thu, 3 May 2018 07:56:08 +0000 (09:56 +0200)]
pfcp: correction of length

flags are uint8 but the whole list was set as uint16

Change-Id: Ie52d621d35b68897919d5451c93b6c82e1d45649
Reviewed-on: https://code.wireshark.org/review/27300
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoextcap_parser.c: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:39:01 +0000 (18:39 +0200)]
extcap_parser.c: fix compilation with gcc 8

extcap_parser.c:291:23: error: cast between incompatible function types from ‘void (*)(extcap_arg *)’ {aka ‘void (*)(struct _extcap_arg *)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]

Change-Id: I7a03bdffa655ffb3a0160f205ddcb9943a52564c
Reviewed-on: https://code.wireshark.org/review/27266
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoprefs.c: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:34:00 +0000 (18:34 +0200)]
prefs.c: fix compilation with gcc 8

error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]

Change-Id: Id9f791c78e45d2373c3c1ce57059ef1e973a2fb1
hange-Id: I25597a730efcd580a1dd327d4fc38ab940a8b4d8
Reviewed-on: https://code.wireshark.org/review/27263
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agofix missing parentheses in 'if' statement
chinarulezzz [Sun, 22 Apr 2018 18:13:46 +0000 (21:13 +0300)]
fix missing parentheses in 'if' statement

Change-Id: I47f8566c4410d6aac1111b35fff3b044c14bc70b
Reviewed-on: https://code.wireshark.org/review/27079
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoWiX: Options dialog updates.
Gerald Combs [Tue, 27 Mar 2018 15:34:49 +0000 (08:34 -0700)]
WiX: Options dialog updates.

Remove GTK+. Add links to Npcap, WinPcap, and USBPcap. Move the capture
options to the top of the options dialog. Replace group boxes with
simple titles.

Add an EditorConfig entry for our WiX files.

Change-Id: Ibd581fa09f333fa84228f0a6f723ab62df85ee8e
Reviewed-on: https://code.wireshark.org/review/27292
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoEditorconfig: Add a filename match for Makefiles.
Gerald Combs [Wed, 2 May 2018 20:24:04 +0000 (13:24 -0700)]
Editorconfig: Add a filename match for Makefiles.

The "Autotools, Make" section in .editorconfig didn't have an associated
filepath glob pattern, which meant that it matched the preceding
pattern, which was "*". This would appear to explain why VS Code
mysteriously forced 8-character tabs for some files.

Remove ui/qt/Makefile_custom.common while we're here.

Change-Id: I5a84cc53c992bb2a95036cb98dc97cc7eb6b1299
Reviewed-on: https://code.wireshark.org/review/27281
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoWSDG: Stop recommending Cygwin.
Gerald Combs [Wed, 2 May 2018 00:33:27 +0000 (17:33 -0700)]
WSDG: Stop recommending Cygwin.

Note in the quick setup and tools documentation that we no longer
require or recommend Cygwin.

Change-Id: Ie0eb92c5817ae1d786136035adf8fa3988c8b98d
Reviewed-on: https://code.wireshark.org/review/27244
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoRemove a leftover Makefile.
Gerald Combs [Fri, 20 Apr 2018 16:06:49 +0000 (11:06 -0500)]
Remove a leftover Makefile.

Change-Id: I210a4fd8f77687c5d7050feedb1128df728b2f3b
Reviewed-on: https://code.wireshark.org/review/27057
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoCMake: check for /Qspectre before using it
Peter Wu [Mon, 30 Apr 2018 14:14:26 +0000 (16:14 +0200)]
CMake: check for /Qspectre before using it

The linked blog entry for /Qspectre suggests intention to include
/Qspectre support for VS 2015 Update 3, but this has not happened yet
(at least, not with VS Community 2015 14.0.23107.178).

Change-Id: I001c8fa512457f1edc753b460634f13d2ff0ed7a
Fixes: v2.5.1rc0-611-g0ebcd27377 ("Trust CMake's Visual C++ version detection.")
Reviewed-on: https://code.wireshark.org/review/27225
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoerf.c: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:44:43 +0000 (18:44 +0200)]
erf.c: fix compilation with gcc 8

erf.c:2562:9: error: this statement may fall through [-Werror=implicit-fallthrough=]

Change-Id: Ib516a689e078a9e1eea96d692ffbbaab398f2bcb
Reviewed-on: https://code.wireshark.org/review/27271
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoMATE: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:40:33 +0000 (18:40 +0200)]
MATE: fix compilation with gcc 8

mate_runtime.c:816:35: error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]
mate_parser.l:401:40: error: cast between incompatible function types from ‘void (*)(mate_config_frame *)’ {aka ‘void (*)(struct _mate_config_frame *)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]

Change-Id: I90fbed9c52f6fe43958a0ff11b21f0fe4c23c41a
Reviewed-on: https://code.wireshark.org/review/27267
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoQt: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:41:43 +0000 (18:41 +0200)]
Qt: fix compilation with gcc 8

conversation_hash_tables_dialog.cpp:52:67: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]

Change-Id: I07c815a7233af41c840087a35eaf9172c06161f3
Reviewed-on: https://code.wireshark.org/review/27268
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoWindows: Upgrade WinSparkle to 0.5.7.
Gerald Combs [Wed, 2 May 2018 16:48:24 +0000 (09:48 -0700)]
Windows: Upgrade WinSparkle to 0.5.7.

Bug: 14642
Change-Id: Iac5e417f05eb7a5f0acb36c3588352ceefb8bf6e
Reviewed-on: https://code.wireshark.org/review/27276
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agocosine.c: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:43:49 +0000 (18:43 +0200)]
cosine.c: fix compilation with gcc 8

cosine.c:232:46: error: logical ‘or’ of equal expressions [-Werror=logical-op]

Change-Id: Iaefc4ff232b54994c8737a95c5990c0806e7c56e
Reviewed-on: https://code.wireshark.org/review/27270
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoextcap.c: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:35:29 +0000 (18:35 +0200)]
extcap.c: fix compilation with gcc 8

extcap.c:228:37: error: cast between incompatible function types from ‘void (*)(iface_toolbar_value *)’ {aka ‘void (*)(struct _iface_toolbar_value *)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]
extcap.c:246:39: error: cast between incompatible function types from ‘void (*)(iface_toolbar_control *)’ {aka ‘void (*)(struct _iface_toolbar_control *)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]
extcap.c:521:32: error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]
extcap.c:1440:35: error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]

Change-Id: I2422e9b59c288907882c9ffd57cbae12011f7832
Reviewed-on: https://code.wireshark.org/review/27264
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoextcap-base.c: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:37:28 +0000 (18:37 +0200)]
extcap-base.c: fix compilation with gcc 8

extcap-base.c:293:43: error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]
extcap-base.c:302:45: error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]
extcap-base.c:321:42: error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]

Change-Id: Ifd9151d04412c5e29636dc14c57a327cc12d33f3
Reviewed-on: https://code.wireshark.org/review/27265
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoQUIC: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:31:21 +0000 (18:31 +0200)]
QUIC: fix compilation with gcc 8

error: cast between incompatible function types from ‘void (*)(quic_info_data_t *)’ {aka ‘void (*)(struct quic_info_data *)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]

Change-Id: I2827dd741145c0c9eb77205979497f4a39ecbb21
Reviewed-on: https://code.wireshark.org/review/27261
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoTWAMP: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:32:40 +0000 (18:32 +0200)]
TWAMP: fix compilation with gcc 8

error: cast between incompatible function types from ‘gint (*)(const void *)’ {aka ‘int (*)(const void *)’} to ‘gint (*)(const void *, const void *)’ {aka ‘int (*)(const void *, const void *)’} [-Werror=cast-function-type]

Change-Id: Ifbd57414ecea16b76321c2b7d3db1a5d0a11a888
Reviewed-on: https://code.wireshark.org/review/27262
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoGTP: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:29:56 +0000 (18:29 +0200)]
GTP: fix compilation with gcc 8

error: cast between incompatible function types from ‘void (*)(const void *, void *, void *)’ to ‘gboolean (*)(const void *, void *, void *)’ {aka ‘int (*)(const void *, void *, void *)’} [-Werror=cast-function-type]

Change-Id: If93eb9a4f38b622ae5dfaf9ed1e2c3d257141105
Reviewed-on: https://code.wireshark.org/review/27260
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agonetscreen.c: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:48:41 +0000 (18:48 +0200)]
netscreen.c: fix compilation with gcc 8

netscreen.c:135:49: error: logical ‘or’ of equal expressions [-Werror=logical-op]

Change-Id: I19627178f674920030007433d7b9d0c9e3481816
Reviewed-on: https://code.wireshark.org/review/27272
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agobtle: Show correct LLData Timeout value
Stig Bjørlykke [Wed, 2 May 2018 11:38:25 +0000 (13:38 +0200)]
btle: Show correct LLData Timeout value

The spec states that connSupervisionTimeout = Timeout * 10 ms

Change-Id: I89494c74d80b63c85f001540ea79850736457b21
Reviewed-on: https://code.wireshark.org/review/27255
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agoNSIS: add descriptions for new plugins types
Jaap Keuter [Wed, 2 May 2018 08:14:57 +0000 (10:14 +0200)]
NSIS: add descriptions for new plugins types

The installer is not presenting applicable text in the description
box when highlighting the new file type and codec plugin options.

Change-Id: I25fbc7800a594796ac8f4f15b39431a89b404d0e
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/27248
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoModify Ericsson.xml to include additional AVPs
Niall Dugera [Tue, 17 Apr 2018 17:15:24 +0000 (18:15 +0100)]
Modify Ericsson.xml to include additional AVPs

Change-Id: If82ab14417c8b2eb4caa2afcae6e777cbcbd047b
Reviewed-on: https://code.wireshark.org/review/26991
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agorpm-package: Use version.h to generate version string in RPM
AndersBroman [Fri, 27 Apr 2018 14:22:53 +0000 (16:22 +0200)]
rpm-package: Use version.h to generate version string in RPM
Packaging.

Change-Id: I463be4523f789406ff0cb3a1a325d6937db63b3d
Reviewed-on: https://code.wireshark.org/review/27179
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoVITA 49: add an explicit option to activate Ettus UHD header workaround
Pascal Quantin [Wed, 2 May 2018 08:57:07 +0000 (10:57 +0200)]
VITA 49: add an explicit option to activate Ettus UHD header workaround

Bug: 14641
Change-Id: Ie3259a831c3736f8879b1e87f3dff31d6d036b40
Reviewed-on: https://code.wireshark.org/review/27249
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoIEEE 1905.1a: use col_add_str to add non const strings
Pascal Quantin [Wed, 2 May 2018 09:08:19 +0000 (11:08 +0200)]
IEEE 1905.1a: use col_add_str to add non const strings

Bug: 14647
Change-Id: I112d47e459e71648dccf331d56b8c70f44d01134
Reviewed-on: https://code.wireshark.org/review/27250
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>
6 years agoprefs: fix importing some old protocol preferences
Peter Wu [Mon, 30 Apr 2018 16:47:10 +0000 (18:47 +0200)]
prefs: fix importing some old protocol preferences

Some preference modules did not exist, so importing would not work.
While vuze-dht used to have a configurable protocol name, it no longer
supports that, so remove it from the list.

Add some sanity checks to prevent bug 14316 from going undetected again,
and to ensure that dead code is removed when prefs are removed.

Change-Id: I5df809af66a6c19f9eb9a6b75d5e60c96008cde4
Fixes: v2.3.0rc0-971-g268841f3e0 ("Combine Decode As and port preferences for tcp.port dissector table.")
Reviewed-on: https://code.wireshark.org/review/27227
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoTest: Remove the Bash test scripts.
Gerald Combs [Tue, 1 May 2018 22:49:11 +0000 (15:49 -0700)]
Test: Remove the Bash test scripts.

They've been replaced by the Python scripts.

Change-Id: I8add9c9ea0a6bdd68b2fa3841977863c0ea9a761
Reviewed-on: https://code.wireshark.org/review/27243
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoForce textify.ps1 to read files as UTF-8.
Gerald Combs [Tue, 1 May 2018 20:55:12 +0000 (13:55 -0700)]
Force textify.ps1 to read files as UTF-8.

Prior to the switch from AsciiDoc to Asciidoctor we converted
release_notes.html to NEWS using elinks or lynx, which in turn generated
ASCII output. It was sufficient to read NEWS in PowerShell using
Get-Content, which defaults to ASCII.

We now use tools/html2text.py, which generates UTF-8. Switch Get-Content's
encoding to match. Note that Notepad detects file encodings heuristically,
and that we might want to use a BOM.

Bug: 14636
Change-Id: Ibd92ef7ad642631a938bb4d75a2d83f479099032
Reviewed-on: https://code.wireshark.org/review/27240
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>
6 years agomgcp: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Mon, 30 Apr 2018 12:34:55 +0000 (14:34 +0200)]
mgcp: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I966ce64a908e5f8bf04ce02bc8551367eba4a260
Reviewed-on: https://code.wireshark.org/review/27219
Reviewed-by: Hadar Shoham <hadar.shoham@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoFix the utility-launcher to look at the name it's run as.
Guy Harris [Wed, 2 May 2018 04:00:26 +0000 (21:00 -0700)]
Fix the utility-launcher to look at the name it's run as.

If it's run as "tshark", it should run TShark, not Wireshark.

Bug: 14643
Change-Id: I0d4e6fa64e42b7a2e2d4b89b53db62748b4f288d
Reviewed-on: https://code.wireshark.org/review/27245
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoTest: Add wslua.
Gerald Combs [Mon, 30 Apr 2018 22:17:39 +0000 (15:17 -0700)]
Test: Add wslua.

Change-Id: I904796d13550c04df1958715d6528548385c3109
Reviewed-on: https://code.wireshark.org/review/27241
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoTest: Fix capinfos output and command paths.
Gerald Combs [Tue, 1 May 2018 16:09:27 +0000 (09:09 -0700)]
Test: Fix capinfos output and command paths.

Convert capinfos output to UTF-8 in getCaptureInfo.

Normalize our command paths, otherwise "./run/RelWithDebInfo/..." might
be interpreted as the command "." with flags "/run", "/RelWithDebInfo",
etc. on Windows.

Change-Id: Ib7336a016db3ee0805739fc44913cb9c6895aaad
Reviewed-on: https://code.wireshark.org/review/27239
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoobex: Fix request response arrows
Dylan Ulis [Sun, 29 Apr 2018 15:49:39 +0000 (11:49 -0400)]
obex: Fix request response arrows

They were flipped. See https://wiki.wireshark.org/SampleCaptures,
Bluetooth_HCI_and_OBEX_Transaction_over_USB.ntar.gz, packets 153136/153140
for an example.

Change-Id: Iaac853fad16e97ff88ba38a7b4c5cbbdd13052b3
Reviewed-on: https://code.wireshark.org/review/27206
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>
6 years agoprefs: fix crash when setting certain obsolete port preferences
Peter Wu [Mon, 30 Apr 2018 16:26:21 +0000 (18:26 +0200)]
prefs: fix crash when setting certain obsolete port preferences

Loading an old Wireshark profile with certain deprecated preferences
could result in a crash due to type confusion. If the new preference was
a range type, then four bytes of the pointer (address) to the range was
overwritten with the numeric value of the deprecated preference.

Minimal reproducer:

    tshark -opgm.udp.encap_ucast_port:0 -r ../test/captures/empty.pcap

Bug: 14316
Change-Id: Ia8dc24f81f6b2e6494448dadffe810606765cb9e
Fixes: v2.3.0rc0-971-g268841f3e0 ("Combine Decode As and port preferences for tcp.port dissector table.")
Reviewed-on: https://code.wireshark.org/review/27226
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoZigBee: Add remaining attributes from Smart Energy Device Management cluster
Kenneth Soerensen [Sat, 28 Apr 2018 13:19:07 +0000 (15:19 +0200)]
ZigBee: Add remaining attributes from Smart Energy Device Management cluster

Bug: 13360
Change-Id: Ifc7251aad62b7cb0010956d1a36a4ccbe9e3ee7c
Reviewed-on: https://code.wireshark.org/review/27187
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoQt: do not further modify filename from Save dialog
Peter Wu [Sat, 28 Apr 2018 13:53:18 +0000 (15:53 +0200)]
Qt: do not further modify filename from Save dialog

Let the Save dialog fixup the extension on accepting the dialog.
Otherwise it is possible that files are silently overwritten without
prompting. Additionally, if a user decides to save a pcapng file as
"foo.pcap", do not try to rename it to "foo.pcap.pcapng".

This change is limited to macOS and Linux because Windows uses a
different file dialog. Tested with both macOS and Linux.

Bug: 14600
Change-Id: Ie0bc1f579766a04f0aad96dcd5daba3fffef9764
Reviewed-on: https://code.wireshark.org/review/27188
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoQt: improve extension selection in Save As dialog
Peter Wu [Sat, 28 Apr 2018 11:15:36 +0000 (13:15 +0200)]
Qt: improve extension selection in Save As dialog

The default Qt behavior for extension adjustment is quite bad. When the
file type filter is changed, the extension always becomes "gz" because
"pcap.gz" happens to be the first extension in the list. It also did not
check that the last suffix is actually a valid extension (e.g.
"capture.2018.01" became "capture.2018.gz").

Improvements:
- Respect the "compression" checkbox when adjusting the filename.
- Replace the extension only if it is a known one, append otherwise.
- Use a better default extension (from "wtap_default_file_extension").

Affects only macOS and Linux since Windows has its own native dialog.
See also https://bugreports.qt.io/browse/QTBUG-67993

Bug: 14600
Change-Id: I8cd0788f2abac0c6d7e29490b1ebb381f5a926d0
Reviewed-on: https://code.wireshark.org/review/27186
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoBOOTP BSDP: Allow "pad" and "end" suboptions.
Darius Davis [Wed, 4 Apr 2018 01:38:10 +0000 (11:38 +1000)]
BOOTP BSDP: Allow "pad" and "end" suboptions.

Apple bsdpd uses the same routine to parse BSDP suboptions as it uses to parse
the DHCP options, which means that the "pad" (0) and "end" (255) options (as
described in RFC 2132) are also accepted as BSDP suboptions.  Just like when
used as DHCP options, they do not follow the usual TLV template: They do not
have a length field and do not have any value, so they always consume exactly
one byte.

This change enhances the BSDP suboption dissector to accept the "pad" (0) and
"end" (255) suboptions, without any stored length or value.

Apple firmware/software does not issue BSDP "pad" or "end" suboptions, but will
tolerate them in received packets.  At least one 3rd-party BSDP implementation
(the Dell KACE K2000 appliance) includes a BSDP "end" suboption in packets it
sends.  Prior to this fix, function dissect_vendor_bsdp_suboption was expecting
a length for these suboptions, leading to dissection failing with error
"Suboption 255: no room left in option for suboption length".

For further discussion -- in which the exact same issue is found to affect
VMware virtual machine firmware -- refer to the VMware Communities forum thread
at https://communities.vmware.com/message/2459144#2459144 .

Interestingly, when Apple's bsdpd finds an "end" BSDP suboption, it simply
records that an "end" was encountered, and continues parsing until the whole of
the vendor options blob is consumed.  The BSDP suboption dissector required no
modification to match that behavior.

Testing Done: Built Wireshark on Linux amd64.  Loaded a BSDP ACK[LIST] from a
   Dell KACE K2000 appliance; Previously it would issue an error about there
   being insufficient room for the length of the "end" suboption, and now it
   parses correctly.  Modified the packet to include a string of "0" and "255"
   suboptions, and observed that they were parsed as expected: One byte each,
   no subtree, no length, and parsing continues afterwards.  200,000 iterations
   with tools/fuzz-test.sh using the original BSDP packet, 4,000 of which were
   under Valgrind.

Change-Id: I1786414b2ef0b8726d989a566d0e8a3525d516b8
Reviewed-on: https://code.wireshark.org/review/27210
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>
6 years agogsm_r_uus1: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Mon, 30 Apr 2018 12:32:22 +0000 (14:32 +0200)]
gsm_r_uus1: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I87b65113a8794b6ab0583c5d0dd4123fa0bd7ba7
Reviewed-on: https://code.wireshark.org/review/27218
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agobfcp: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Mon, 30 Apr 2018 12:12:05 +0000 (14:12 +0200)]
bfcp: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I46cd2392022b5fb64e997c74650f6a2002f519c6
Reviewed-on: https://code.wireshark.org/review/27216
Reviewed-by: Ivan Nardi <nardi.ivan@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoTPM20: fully initialize tpm_entry structure
Pascal Quantin [Tue, 1 May 2018 08:45:51 +0000 (10:45 +0200)]
TPM20: fully initialize tpm_entry structure

Bug: 14640
Change-Id: I2d7128e4da9d1568d7ef4ef7351abc1660554698
Reviewed-on: https://code.wireshark.org/review/27236
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
6 years agoTPM20: add file to .editorconfig
Pascal Quantin [Tue, 1 May 2018 08:44:58 +0000 (10:44 +0200)]
TPM20: add file to .editorconfig

Change-Id: Ic2860ebfb354b9f6fa764881beee1b1881ad4e00
Reviewed-on: https://code.wireshark.org/review/27235
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
6 years agoFix comment end after SPDX identifier
Stig Bjørlykke [Mon, 30 Apr 2018 07:47:58 +0000 (09:47 +0200)]
Fix comment end after SPDX identifier

Move */ to a separate line below the SPDX identifier.

Change-Id: Id1032215449cfccae0933147b45e04b65e0b727f
Reviewed-on: https://code.wireshark.org/review/27211
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoUse common indenting space in heading
Stig Bjørlykke [Mon, 30 Apr 2018 19:55:30 +0000 (21:55 +0200)]
Use common indenting space in heading

Change-Id: I47022f9c7d568ca6d9705ba63c669a980822818a
Reviewed-on: https://code.wireshark.org/review/27229
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoTest: More fixes and updates.
Gerald Combs [Tue, 1 May 2018 00:12:20 +0000 (17:12 -0700)]
Test: More fixes and updates.

Move UAT file creation to config.py.

Run the text2pcap and some of the clopts tests under our default
environment.

Use "in" instead of "has_key".

Change-Id: Ie5c70fb33c29676672bed7bf8205cff0bba77f8a
Reviewed-on: https://code.wireshark.org/review/27234
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoTest: Add unittests.
Gerald Combs [Mon, 30 Apr 2018 21:42:29 +0000 (14:42 -0700)]
Test: Add unittests.

Note that these require the "test-programs" target.

Change-Id: I1bea381eaa48504fcd76f88e1c6f2edece0a78a2
Reviewed-on: https://code.wireshark.org/review/27231
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoTest: More fixups.
Gerald Combs [Mon, 30 Apr 2018 22:18:36 +0000 (15:18 -0700)]
Test: More fixups.

Change-Id: I5869d995754ce9e8a128feaef6911b3c05c79e85
Reviewed-on: https://code.wireshark.org/review/27233
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoTest: Add a missing global.
Gerald Combs [Mon, 30 Apr 2018 21:57:07 +0000 (14:57 -0700)]
Test: Add a missing global.

Change-Id: I5410b427b452678b24d7ee079ec48cc8300de3a0
Reviewed-on: https://code.wireshark.org/review/27232
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoTest: Add text2pcap.
Gerald Combs [Sat, 28 Apr 2018 21:36:18 +0000 (14:36 -0700)]
Test: Add text2pcap.

Change-Id: Ib7cebcb911e2a59812fe03655a112acd3521e5a3
Reviewed-on: https://code.wireshark.org/review/27230
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoTest: Add name resolution.
Gerald Combs [Fri, 27 Apr 2018 23:03:24 +0000 (16:03 -0700)]
Test: Add name resolution.

Change-Id: I7b289de5c807b61e1825b30c7f98bfc50caa9625
Reviewed-on: https://code.wireshark.org/review/27228
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoLDSS: Fix a read overrun in dissect_ldss_transfer.
Darius Davis [Sun, 29 Apr 2018 05:48:53 +0000 (15:48 +1000)]
LDSS: Fix a read overrun in dissect_ldss_transfer.

dissect_ldss_transfer had a trivial read overrun: "line" was not
NUL-terminated, and strtol/g_ascii_strtoull will keep reading and discarding
any leading whitespace, so a malformed LDSS packet (with only whitespace
characters following the tag on a "Size:"/"Start:"/"Compression:" line) could
trigger a read overrun.

Let's replace the tvb_memdup with tvb_get_string_enc, which does some checking
of the input characters (which, it seems, must always be ASCII), and produces a
neat NUL-terminated string.

Testing Done: On Linux x64, ran "valgrind tshark -r fuzz-2018-04-23-14422.pcap"
   without the fix (to reproduce the failure), and then with the fix, and
   observed that no errors were reported anymore after the fix. 60,000 iters of
   fuzz-test with ldss_filtered.pcap as input, plus 1,000 iters under valgrind.
   Launched wireshark and opened ldss_filtered.pcap, and examined the dissection
   of the "ldss and tcp" packets; All looks good.

Bug: 14615
Change-Id: I3fccc4ffbe315a3cff6ea03cc7db37f884b0582c
Reviewed-on: https://code.wireshark.org/review/27204
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agoWSDG: Remove ENABLE_CHM_GUIDES
Dylan Ulis [Sun, 29 Apr 2018 22:46:31 +0000 (18:46 -0400)]
WSDG: Remove ENABLE_CHM_GUIDES

ENABLE_CHM_GUIDES is no longer in CMakeOptions.txt

Change-Id: I217ac89f12c95e66591465e3230c19968dcc0bde
Reviewed-on: https://code.wireshark.org/review/27209
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agopdcp-nr: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Mon, 30 Apr 2018 12:35:20 +0000 (14:35 +0200)]
pdcp-nr: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I4f6ab2ff54c1b5d6c4892b6e76d47b5107c0a197
Reviewed-on: https://code.wireshark.org/review/27220
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
6 years agoNAS EPS: fix dissection of UE security capability IE
Pascal Quantin [Mon, 30 Apr 2018 11:53:06 +0000 (13:53 +0200)]
NAS EPS: fix dissection of UE security capability IE

Change-Id: Ie1a749eb2abb522aadec06a01baa10ba2211443b
Reviewed-on: https://code.wireshark.org/review/27214
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
6 years agoplugins: Remove autotools specific code for build path
João Valverde [Sun, 29 Apr 2018 10:25:35 +0000 (11:25 +0100)]
plugins: Remove autotools specific code for build path

Change-Id: I12a987cd84a7e04189a08771ce334e1d6152eab1
Reviewed-on: https://code.wireshark.org/review/27205
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
6 years agoLua: Remove autotools specific code for build path
João Valverde [Sun, 29 Apr 2018 10:17:44 +0000 (11:17 +0100)]
Lua: Remove autotools specific code for build path

Change-Id: I541bd728c159e95c2d5daa8ce0bfea3961ff1db9
Reviewed-on: https://code.wireshark.org/review/27203
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
6 years agoQt: Make the selected packet in the packet list more clear.
Paul Zander [Wed, 25 Apr 2018 06:29:37 +0000 (08:29 +0200)]
Qt: Make the selected packet in the packet list more clear.

When using coloring rules the selected packet is sometime hard to recognize. The stylesheet of the packet list is extended for this.

Bug: 14621
Change-Id: Ied465e0e211b3c11e69cb71f89988eb45622dd72
Reviewed-on: https://code.wireshark.org/review/27141
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
6 years agocheckAPIs.pl: fix false positive with C++ method names
Peter Wu [Sat, 28 Apr 2018 14:06:57 +0000 (16:06 +0200)]
checkAPIs.pl: fix false positive with C++ method names

Fix false positives due to method names that are considered deprecated:

    int CaptureFileDialog::open(...
    first_elapsed = QString().sprintf(
    int open(QString &file_name, unsigned int &type);

Change-Id: Ib3c255a9f17b2cb44cd441e5277a97db63afaa72
Reviewed-on: https://code.wireshark.org/review/27189
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agoLua: ensure that DATA_DIR and USER_DIR have trailing slashes
Peter Wu [Thu, 26 Apr 2018 15:36:58 +0000 (17:36 +0200)]
Lua: ensure that DATA_DIR and USER_DIR have trailing slashes

These directories have had trailing slashes for years and users seem to
rely on it, so restore this assumption for backwards compatibility. The
underlying API function (Dir.persconffile_path()) is not changed because
trailing slashes were not documented for that function.

For consistency, ensure that all Lua Dir functions return paths without
trailing slashes.

Bug: 14619
Change-Id: Ia299864999578884b1ad1cd48f1bd883bce6879d
Fixes: v2.5.0rc0-579-gfb052a637f ("Use g_build_filename() instead, fix indentation")
Reviewed-on: https://code.wireshark.org/review/27166
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agolwm2mtlv: Add interpretations checks
Stig Bjørlykke [Mon, 30 Apr 2018 08:00:26 +0000 (10:00 +0200)]
lwm2mtlv: Add interpretations checks

Only show value as String if valid as UTF-8 string.
Only show value as Boolean if 0 or 1.

Change-Id: I56168faafff9eaeeb21ec6d57b850013bbb94c33
Reviewed-on: https://code.wireshark.org/review/27212
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agoSource files should not be executable files.
Jaap Keuter [Sun, 29 Apr 2018 18:58:25 +0000 (20:58 +0200)]
Source files should not be executable files.

Change-Id: I2808e0378e4a06ed749c72033a618fd1e598ee31
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/27207
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoDCT2000: Only look up old protocol name mappings if preference enabled
Martin Mathieson [Sat, 28 Apr 2018 21:23:05 +0000 (22:23 +0100)]
DCT2000: Only look up old protocol name mappings if preference enabled

Change-Id: I871f7669c9303452f3407b65f83f68dee1ffc3bf
Reviewed-on: https://code.wireshark.org/review/27197
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
6 years agoieee80211: Improve support of the HotSpot 2.0 specification.
Richard Sharpe [Sat, 28 Apr 2018 18:28:15 +0000 (11:28 -0700)]
ieee80211: Improve support of the HotSpot 2.0 specification.

A number of mistakes have been found now that captures are available.

Change-Id: I883d71439f407ab9d90be878c9f52a5a300b9c8c
Reviewed-on: https://code.wireshark.org/review/27192
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
6 years ago[Automatic update for 2018-04-29]
Gerald Combs [Sun, 29 Apr 2018 08:17:09 +0000 (08:17 +0000)]
[Automatic update for 2018-04-29]

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

Change-Id: I9a2b34c7c2b9749d779f43bbe4fda15150ca2dfc
Reviewed-on: https://code.wireshark.org/review/27199
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoPick the *first* usable file type as the default, not the *last* one.
Guy Harris [Sat, 28 Apr 2018 19:10:00 +0000 (12:10 -0700)]
Pick the *first* usable file type as the default, not the *last* one.

In wtap_get_savable_file_types_subtypes(), in the search for a default
file type to use, stop as soon as we've found a usable file type, don't
keep searching.

Bug: 14601
Change-Id: Iff4ffe14f5ad07271c49a761e0856059353c1634
Reviewed-on: https://code.wireshark.org/review/27193
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoFix minor leak in filter_expression_new.
Darius Davis [Thu, 26 Apr 2018 07:08:27 +0000 (17:08 +1000)]
Fix minor leak in filter_expression_new.

filter_expression_new was g_strdup()ing each of the strings in the "expression"
structure, but UAT is just going to immediately deep copy the structure (via
display_filter_copy_cb), so the copies made here are immediately leaking.

We could either free() these copies immediately after uat_add_record returns,
or skip the g_strdup altogether (which necessitates casting away the "const").
I chose the latter.

Testing Done: Linux x64 build.  With a display filter configured in
   ~/.wireshark/preferences, Valgrind no longer reports three leaks from here.

Change-Id: I7913f260875ced597b9027c8ae92a4d6d44f6414
Reviewed-on: https://code.wireshark.org/review/27157
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agolwm2mtlv: Handle String data type as UTF-8
Stig Bjørlykke [Fri, 27 Apr 2018 13:29:32 +0000 (15:29 +0200)]
lwm2mtlv: Handle String data type as UTF-8

Display element value as bytes if value is not a valid UTF-8 string.
Add a new utility function isprint_utf8_string().

Change-Id: I211d5ed423b53a9fd15eb260bbc6298b0b8f46a0
Reviewed-on: https://code.wireshark.org/review/27178
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoGSM-R protocol dissector
Michail Koreshkov [Fri, 13 Apr 2018 15:12:33 +0000 (18:12 +0300)]
GSM-R protocol dissector

Dissector for GSM-R protocol. Specification ETSI TS 102 610.
Trace example in https://wiki.wireshark.org/SampleCaptures [[attachment:gsm-r.uus1.pcap]]

Change-Id: I7496bfa141d75b3460f7c3bdbb791e24d4810231
Reviewed-on: https://code.wireshark.org/review/26929
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoTest: Quote our Python executable.
Gerald Combs [Fri, 27 Apr 2018 22:47:09 +0000 (15:47 -0700)]
Test: Quote our Python executable.

Change-Id: Ica80406d6420b9f97792a19b192f8a7d764e673b
Reviewed-on: https://code.wireshark.org/review/27185
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoTest: Add mergecap.
Gerald Combs [Fri, 27 Apr 2018 19:56:08 +0000 (12:56 -0700)]
Test: Add mergecap.

Change-Id: Ib21f4866cff27e22a4dc13300c3c38fa962a860f
Reviewed-on: https://code.wireshark.org/review/27184
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoTest: Add fileformats and I/O.
Gerald Combs [Fri, 27 Apr 2018 17:35:17 +0000 (10:35 -0700)]
Test: Add fileformats and I/O.

Add the fileformats and I/O suites. Move some more common code to
subprocesstest.py and add a diffOutput method.

Change-Id: I2ec34e46539022bdce78520645fdca6dfc1a8c1a
Reviewed-on: https://code.wireshark.org/review/27183
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agotest: Miscellaneous fixups.
Gerald Combs [Fri, 27 Apr 2018 16:35:37 +0000 (09:35 -0700)]
test: Miscellaneous fixups.

In util_slow_dhcp.py, open stdout as O_BINARY on Windows.

Have ctest pass --verbose to test.py.

Call config.canCapture at test time so that we don't inadvertently skip
some tests.

Stringify our dumpcap config check.

Fix our Gcrypt variable.

Change-Id: I884ec23ddfc7c28b79d4a860c6c43c308598e6db
Reviewed-on: https://code.wireshark.org/review/27182
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoBluetooth HCI: Add missing LE event mask fields
Allan Møller Madsen [Fri, 27 Apr 2018 10:59:29 +0000 (12:59 +0200)]
Bluetooth HCI: Add missing LE event mask fields

Add missing BT5 bit fields to HCI LE Set Event Mask
command. Correct displayed field name.

Change-Id: Iacaba69226663e884b60ac5a75470de77317ea92
Signed-off-by: Allan Møller Madsen <almomadk@gmail.com>
Reviewed-on: https://code.wireshark.org/review/27177
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoMGCP: add support to local/remote voice metrics option
Hadar [Sun, 22 Apr 2018 15:09:20 +0000 (18:09 +0300)]
MGCP: add support to local/remote voice metrics option
protocol specification: in the file header
NCS 1.5: PKT-SP-NCS1.5-I04-120412, April 12, 2012 Cable Television

Change-Id: I95a1d769cb08c0e8160ca6fcdb99dd98e0f085cc
Reviewed-on: https://code.wireshark.org/review/27077
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agocapture_ifinfo: Don't try to write to an invalid address.
Gerald Combs [Thu, 26 Apr 2018 23:55:21 +0000 (16:55 -0700)]
capture_ifinfo: Don't try to write to an invalid address.

Make sure err_str is valid before trying to assign a value.

Change-Id: I4e6524b93101ef28158996797e8462168e44dc2a
Reviewed-on: https://code.wireshark.org/review/27173
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoStart porting our test scripts to Python. Add ctest support.
Gerald Combs [Tue, 3 Apr 2018 00:12:23 +0000 (17:12 -0700)]
Start porting our test scripts to Python. Add ctest support.

Create Python versions of our various test shell scripts. Add CMake
tests for each suite. Tests can now be run directly via test.py, via the
"test" target, or via ctest, e.g.

  ctest --verbose --jobs 3

Add a testing chapter to the Developer's Guide.

Add a way to disable ctest in dpkg-buildpackage.

Suites completed:
- capture
- clopts
- decryption
- dissection

Remaining suites:
- fileformats
- io
- mergecap
- nameres
- text2pcap
- unittests
- wslua

Change-Id: I8936e05edefc76a86b6a7a5da302e7461bbdda0f
Reviewed-on: https://code.wireshark.org/review/27134
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoQt: fix crash on dragging in packet dialog
Peter Wu [Thu, 26 Apr 2018 11:13:54 +0000 (13:13 +0200)]
Qt: fix crash on dragging in packet dialog

"packet_dialog.cpp" does not use setCaptureFile, resulting in a NULL
dereference while trying to obtain the dissection context. Apply a fix
similar to v2.5.1rc0-121-g9198448f9d (pass a fixed dissection context to
ProtoTree). Additionally, fix a memleak and correct documentation.

Why not add "proto_tree_->setCaptureFile(cap_file_.capFile())" in
PacketDialog? Well, it also uses "proto_tree_->setRootNode(edt_.tree)"
which means that "cf_->edt" would be different from "edt_". If that is
the case, then "proto_construct_match_selected_string" will not return a
filter for FT_NONE fields (see the call chain in proto.c).

Bug: 14620
Change-Id: I6eeaf32b650a2095e15f64bbe64b54cdd545c7a9
Fixes: v2.5.0rc0-1608-g4d6454e180 ("Qt: Drag n Drop Filter expression from Packet Tree")
Reviewed-on: https://code.wireshark.org/review/27160
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agoFix crash (double-free) on refreshing interfaces list
Peter Wu [Thu, 26 Apr 2018 11:38:07 +0000 (13:38 +0200)]
Fix crash (double-free) on refreshing interfaces list

When normal interfaces are unavailable (chmod -x dumpcap), and after
toggling "Disable external capture interfaces" twice and then refreshing
the interfaces list (F5), a double-free occurs in ui/iface_lists.c:147
for "global_capture_opts.ifaces_err_info".

Change-Id: I98697653ab1c123186892408112c34afdd1766f5
Fixes: v1.99.0-rc1-1005-g35b4487538 ("Handle empty interface lists when the list changes.")
Reviewed-on: https://code.wireshark.org/review/27161
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agoEnsure test directories are included with git archive
Peter Wu [Thu, 26 Apr 2018 09:01:56 +0000 (11:01 +0200)]
Ensure test directories are included with git archive

"make dist" will currently fail with "git archive" archives because
dftestfiles and dftestlib is missing. To encourage distributors to run
tests, ensure that these files (1.64MiB uncompressed, 688KiB
gzip-compressed) are bundled.

Change-Id: I1fc2bd6df45db40e64e7691235f716bbf3562f87
Reviewed-on: https://code.wireshark.org/review/27158
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoAVSP: Correct timestamp representation
Nikhil AP [Wed, 25 Apr 2018 08:17:43 +0000 (04:17 -0400)]
AVSP: Correct timestamp representation

This change reflects that the 64-bit timestamp in AVSP is in TAI
timescale and not UTC.

Change-Id: I13807ab446492c2b4f37a57989e1e0122afcc6aa
Reviewed-on: https://code.wireshark.org/review/27144
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: Roland Knall <rknall@gmail.com>
6 years agocoap: Store ctype values in transaction tracking
Stig Bjørlykke [Thu, 26 Apr 2018 11:48:01 +0000 (13:48 +0200)]
coap: Store ctype values in transaction tracking

Transfer ctype values from GET request to response to be able
to decode the payload correctly.

Change-Id: Ida7598aefbd3f245dd487d50562539395f130ac4
Reviewed-on: https://code.wireshark.org/review/27163
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
6 years agolwm2mtlv: Identifier and Length fields are big endian
Stig Bjørlykke [Thu, 26 Apr 2018 11:44:51 +0000 (13:44 +0200)]
lwm2mtlv: Identifier and Length fields are big endian

The header Identifier and Length fields are using big endian encoding.

Change-Id: I1b557168ae467cc5eb63ada3991279cf080fa687
Reviewed-on: https://code.wireshark.org/review/27162
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agoBOOTP: Add latest IETF Processor Arch assignments.
Darius Davis [Wed, 25 Apr 2018 06:39:25 +0000 (16:39 +1000)]
BOOTP: Add latest IETF Processor Arch assignments.

The IETF has assigned many more Processor Architecture IDs since RFC 4578, so
let's add those to the BOOTP dissector.

There's also now a published erratum for RFC 4578's Client Architecture type
table, so we should update the dissector table to match.  Since it leads to a
relatively widespread (and difficult to troubleshoot) problem, let's add an
"expert info" warning when we see a packet specifying EFI BC as its Client
Architecture, since it is almost certainly intended to be EFI x64.

And, while we're here, RFC 4578 describes the Client Architecture type field as
an array of 16-bit values, so let's implement that too.

Testing Done: Examined packet captures from EFI DHCP with architecture ID 7
   (now displays as "EFI x64") and 9 (now displays as "EFI BC", with a warning
   to explain that "EFI x64" was probably intended).  Manually edited packets
   to contain multiple entries in the Client Arch option, and they all showed
   correctly (including the warning for type 9).  Manually edited a packet to
   contain an odd number of bytes for the Client Arch option, and saw the
   expected warning.  Ran 30000 iterations of fuzz-test.sh with a corpus of 5
   DHCP/PXE packets as input, and an additional 1000 iterations with the "-g"
   (valgrind) option.

Change-Id: I2ef153316141eb051785fc86f420ad2f721f2a76
Reviewed-on: https://code.wireshark.org/review/27155
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agotpm20: Add TPM2.0 dissector
Tadeusz Struk [Tue, 24 Apr 2018 15:12:57 +0000 (08:12 -0700)]
tpm20: Add TPM2.0 dissector

This adds support for the TPM 2.0 "protocol" as defined
by the Trusted Computing Group (TCG) specification.
The specification can be found here:
https://trustedcomputinggroup.org/tpm-library-specification/

The specification defines the format of the all TPM requests
and responses that this dissector supports.

A sample capture file that can be used for testing this
can be found in the https://wiki.wireshark.org/SampleCaptures
It is called policy-authorizeNV.pcap.

Change-Id: I557cb779f3adc5313e6d3498bbfeb56fdd308fbf
Reviewed-on: https://code.wireshark.org/review/26866
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoDocument "len" and "count" in wireshark-filter(4) and WSUG
Peter Wu [Wed, 25 Apr 2018 10:09:15 +0000 (12:09 +0200)]
Document "len" and "count" in wireshark-filter(4) and WSUG

Add missing section on display filter functions to WSUG and make it
consistent with the wireshark-filter(4) manual. "count" was added in
Wireshark 1.12 (bug 9480). "len" was added in Wireshark 1.6.x.

"size" (added in 1.8.x) is not documented since it works like "len",
except that it is not limited to strings and byte arrays. I think that
"len" should be extended to other types while removing "size".

Change-Id: I2c8e2b4a11f007de7852a797bed971af86840b47
Reviewed-on: https://code.wireshark.org/review/27146
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoZigBee: Place SE cluster attributes correctly in ZCL client and server
Kenneth Soerensen [Tue, 24 Apr 2018 18:18:37 +0000 (20:18 +0200)]
ZigBee: Place SE cluster attributes correctly in ZCL client and server

Change-Id: If495c51dd70af291905ef717ac3c6be5c1ab329d
Reviewed-on: https://code.wireshark.org/review/27122
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoFix indentation.
Guy Harris [Wed, 25 Apr 2018 18:05:13 +0000 (11:05 -0700)]
Fix indentation.

Change-Id: Ia38d4a9d04d99ab49baab7174c21e4040af0c800
Reviewed-on: https://code.wireshark.org/review/27153
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoDon't install autotools or GTK+, but do install CMake.
Guy Harris [Wed, 25 Apr 2018 17:57:07 +0000 (10:57 -0700)]
Don't install autotools or GTK+, but do install CMake.

We no longer use autotools/libtool, so we don't need to install
automake, autoconf, or libtool; we only support CMake, so we *do* need
to install it.

We no longer support GTK+, so we don't need to install it.

Change-Id: I41df9f67c8aba486220e77f7c8c67efa7784a7f2
Reviewed-on: https://code.wireshark.org/review/27152
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoRemove now obsolete information.
Guy Harris [Wed, 25 Apr 2018 16:58:36 +0000 (09:58 -0700)]
Remove now obsolete information.

We don't use autotools, so there are no configuration scripts that need
to be generated by autogen.sh.

Change-Id: I8b2a5bc3cb91a4c2bc59069a29b8ca774b6f239f
Reviewed-on: https://code.wireshark.org/review/27150
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoPut references to autotools in the past tense.
Guy Harris [Wed, 25 Apr 2018 16:54:00 +0000 (09:54 -0700)]
Put references to autotools in the past tense.

In CMake files, we don't do some checks that our autotools scripts did;
speak of those in the past tense, as the autotools scripts are gone.
(Leave the comments there, to note that we *might* have to reinstate
those tests, although they're for old versions of macOS and GCC.)

In CMake files, we use some #defines because that's what autotools did;
speak of those in the past tense as well.

Change-Id: I594fe8225cf94b5087093febc11f6b0a7e42e7cd
Reviewed-on: https://code.wireshark.org/review/27149
Reviewed-by: Guy Harris <guy@alum.mit.edu>