Commit Graph

71384 Commits

Author SHA1 Message Date
Guy Harris 0d9a7455a6 Fix function declaration of ws_buffer_length().
This makes it match 1) the way the function is defined, if it is defined
and 2) the type returned if it's a macro, not a function.

Change-Id: I708a44d2d20f44e58d6ae0228a11e622e7648022
Reviewed-on: https://code.wireshark.org/review/27320
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-04 02:26:31 +00:00
Stig Bjørlykke 895cfbfd01 Qt: Add check for running toolbar reader thread
Check if the reader thread is running before calling requestInterruption()
in an attempt to avoid a crash when stop capture.

Change-Id: I07cdc19eb42413ce421f05186314fc34c33041e6
Ping-Bug: 14631
Reviewed-on: https://code.wireshark.org/review/27316
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-03 19:45:40 +00:00
Gerald Combs 751e9463ce 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>
2018-05-03 19:45:36 +00:00
Stig Bjørlykke 83b8c9c988 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>
2018-05-03 17:29:09 +00:00
Dario Lombardo 869180ce7d 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>
2018-05-03 14:56:19 +00:00
Dario Lombardo 3dce4ea3d3 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>
2018-05-03 14:24:34 +00:00
Dario Lombardo d431863e70 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>
2018-05-03 14:23:32 +00:00
Stig Bjørlykke c4ffae6aad 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>
2018-05-03 13:40:12 +00:00
Pascal Quantin 47bf21a6c8 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>
2018-05-03 13:39:40 +00:00
AndersBroman faf5f86e7e 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>
2018-05-03 10:19:20 +00:00
Martin Mathieson ab949e6deb 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>
2018-05-03 09:22:03 +00:00
Joakim Karlsson 7c8f7052c8 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>
2018-05-03 08:48:24 +00:00
Pascal Quantin 5905fcd4dc 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>
2018-05-03 04:13:48 +00:00
Pascal Quantin 092564a336 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>
2018-05-03 04:12:14 +00:00
chinarulezzz ec0f8e6c36 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>
2018-05-03 04:09:42 +00:00
Gerald Combs 22fc5fb865 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>
2018-05-03 04:08:40 +00:00
Gerald Combs d1a2b6973f 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>
2018-05-03 04:07:25 +00:00
Gerald Combs ef4080bc3a 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>
2018-05-03 04:05:16 +00:00
Gerald Combs 46b0099588 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>
2018-05-02 23:39:15 +00:00
Peter Wu e7cd78d4b3 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>
2018-05-02 23:02:46 +00:00
Pascal Quantin 30c0d7ba49 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>
2018-05-02 21:25:26 +00:00
Pascal Quantin 1eda133c36 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>
2018-05-02 21:04:43 +00:00
Pascal Quantin c514ad11d6 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>
2018-05-02 20:55:41 +00:00
Gerald Combs f4378d70dd 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>
2018-05-02 20:15:43 +00:00
Pascal Quantin a863ee0c86 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>
2018-05-02 20:02:47 +00:00
Pascal Quantin ac1c1c3e58 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>
2018-05-02 19:33:30 +00:00
Pascal Quantin acdda66ce8 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>
2018-05-02 19:33:10 +00:00
Pascal Quantin 875e34c88f 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>
2018-05-02 19:31:35 +00:00
Pascal Quantin 42d43ada2e 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>
2018-05-02 18:22:36 +00:00
Pascal Quantin 966c595782 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>
2018-05-02 17:53:40 +00:00
Pascal Quantin 131eb5593b 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>
2018-05-02 17:52:03 +00:00
Stig Bjørlykke cf4d7ad946 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>
2018-05-02 11:41:18 +00:00
Jaap Keuter 3eb9ec7baf 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>
2018-05-02 11:03:14 +00:00
Niall Dugera 1a1550ba0a 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>
2018-05-02 11:02:48 +00:00
AndersBroman 65c1283d77 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>
2018-05-02 10:44:44 +00:00
Pascal Quantin ff2c8ef00f 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>
2018-05-02 10:41:39 +00:00
Pascal Quantin 5cc6cd3ae6 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>
2018-05-02 10:41:14 +00:00
Peter Wu f7296644c5 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>
2018-05-02 04:09:57 +00:00
Gerald Combs 58da452d22 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>
2018-05-02 04:09:26 +00:00
Gerald Combs cd94b1cb8e 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>
2018-05-02 04:06:30 +00:00
Alexis La Goutte 15f1b0b5e4 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>
2018-05-02 04:05:37 +00:00
Guy Harris 737270dc8c 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>
2018-05-02 04:01:04 +00:00
Gerald Combs 44537199a2 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>
2018-05-02 00:35:20 +00:00
Gerald Combs 74fd569018 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>
2018-05-01 18:46:13 +00:00
Dylan Ulis 48ab9adbd5 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>
2018-05-01 10:29:03 +00:00
Peter Wu 2ed9115a4b 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>
2018-05-01 10:27:53 +00:00
Kenneth Soerensen 82824fd394 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>
2018-05-01 10:25:15 +00:00
Peter Wu 4d2844ccec 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>
2018-05-01 10:24:47 +00:00
Peter Wu 552ef8b1f4 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>
2018-05-01 10:24:07 +00:00
Darius Davis 6e4caf3d90 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>
2018-05-01 10:23:00 +00:00