metze/wireshark/wip.git
7 years agoAdded Heuristic dissectors for the following UMTS FP channels:
S. Shapira [Tue, 7 Mar 2017 21:23:52 +0000 (23:23 +0200)]
Added Heuristic dissectors for the following UMTS FP channels:
DCH (Downlink and Uplink), FACH, RACH and PCH
Note that the existing heuristic dissection function does not correctly dissect any of the above and, frankly, I'm not sure which cases it covers.

Change-Id: I832bfdccc9ae760a42a4c6537052ee2fee9262b4
Reviewed-on: https://code.wireshark.org/review/20439
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoZigBee NWK: Add zero length beacon checks to avoid assert.
Robert Cragie [Tue, 14 Mar 2017 16:56:47 +0000 (16:56 +0000)]
ZigBee NWK: Add zero length beacon checks to avoid assert.

Add a zero length check on beacon to avoid assert when beacon payload is
non existent.

Change-Id: I016a97bda1590b8edc68db4f47e5c814e4eb8e0a
Reviewed-on: https://code.wireshark.org/review/20550
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoftypes: move set_value_sinteger64 into the union
Martin Kaiser [Tue, 14 Mar 2017 22:00:36 +0000 (23:00 +0100)]
ftypes: move set_value_sinteger64 into the union

Delete set_value_sinteger64 from struct _ftype_t, make it
part of the set_value union.

Change-Id: I76668f0a6455c5d75c703cd4f440757601246bdb
Reviewed-on: https://code.wireshark.org/review/20551
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoCIP: Log more errors when expected data is missing
D. Ulis [Tue, 14 Mar 2017 16:57:12 +0000 (12:57 -0400)]
CIP: Log more errors when expected data is missing

1. CIP: Instead of exiting early in dissect_cip_generic_service_req/rsp when there is no data, keep processing so that a malformed packet warning will be displayed when there should be data.
2. CIP Safety: Remove copy-paste. Use load_cip_request_data
3. CIP Safety: Use more constants.

Change-Id: Ic364201f1e587b43cf2bda407fb77b50032974ae
Reviewed-on: https://code.wireshark.org/review/20549
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoLua: Check for no table in ProtoField unit string
Stig Bjørlykke [Tue, 14 Mar 2017 09:30:20 +0000 (10:30 +0100)]
Lua: Check for no table in ProtoField unit string

When using base.UNIT_STRING in a ProtoField the table must be given.

Change-Id: Ie4beb93b5597a97a99939ef2c60a1ee7ece328f2
Reviewed-on: https://code.wireshark.org/review/20542
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
7 years ago[GSM-A-BSSMAP] Update MSG content according to 3GPP TS 48.008 V13.3.0
AndersBroman [Tue, 14 Mar 2017 16:43:20 +0000 (17:43 +0100)]
[GSM-A-BSSMAP] Update MSG content according to 3GPP TS 48.008 V13.3.0
(2016-09)
All IEs are not dissected.

Change-Id: If215b85ba1f786d9b4cb518c7525aec58d000f8e
Reviewed-on: https://code.wireshark.org/review/20548
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoieee80211-radio: fix this condition has identical branches [-Werror=duplicated-branch...
Alexis La Goutte [Thu, 9 Mar 2017 18:10:39 +0000 (19:10 +0100)]
ieee80211-radio: fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7

Change-Id: I7f5f25b0afd30612d9e20e52585c7cad70bc1f59
Reviewed-on: https://code.wireshark.org/review/20468
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agov150fw: fix this condition has identical branches [-Werror=duplicated-branches] found...
Alexis La Goutte [Thu, 9 Mar 2017 18:24:09 +0000 (19:24 +0100)]
v150fw: fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7

Change-Id: I04e781b12a2b89999bf628ceaa66b8527dd591aa
Reviewed-on: https://code.wireshark.org/review/20471
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agoDTLS: Cookie formatting fix for HVR
Robert Cragie [Tue, 14 Mar 2017 11:27:04 +0000 (11:27 +0000)]
DTLS: Cookie formatting fix for HVR

Cookie format for HelloVerifyRequest inconsistent with that in
ClientHello. Changed to be consistent.

Change-Id: I79809ebc4bd4a1c5b43b44a21f58ad5b5d5a1bcf
Reviewed-on: https://code.wireshark.org/review/20544
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agoLua: Improve base checking for signed integer
Stig Bjørlykke [Tue, 14 Mar 2017 09:33:29 +0000 (10:33 +0100)]
Lua: Improve base checking for signed integer

Check base value for signed integer before unsigned to avoid a case
where the valid bases for a unsigned integer is presented in a error
message when a signed type is used.

Change-Id: Idfb87597779652e32adceacad220d748afda5e85
Reviewed-on: https://code.wireshark.org/review/20541
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agoLua: Layout cleanup in init.lua
Stig Bjørlykke [Tue, 14 Mar 2017 09:17:09 +0000 (10:17 +0100)]
Lua: Layout cleanup in init.lua

Remove double start-of-comments and some leading spaces.

Change-Id: I1c5ba49990076cc2d32da2d0a3bb0f54ec31e823
Reviewed-on: https://code.wireshark.org/review/20540
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years ago[GSM-A-BSSMAP] Correct and enhance dissection of HANDOVER COMPLETE
AndersBroman [Tue, 14 Mar 2017 12:57:46 +0000 (13:57 +0100)]
[GSM-A-BSSMAP] Correct and enhance dissection of HANDOVER COMPLETE

Change-Id: Ie65fc6c9f0cd2291d7e1421fbbedff097c7e09df
Reviewed-on: https://code.wireshark.org/review/20545
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoLua: Add some ProtoField tests.
Stig Bjørlykke [Tue, 20 Dec 2016 08:44:16 +0000 (09:44 +0100)]
Lua: Add some ProtoField tests.

Test usage of base.UNIT_STRING.

Change-Id: I9c97b58b3cc6db65713e83609900880e157237f2
Reviewed-on: https://code.wireshark.org/review/19357
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
7 years agoPROFINET: Fix the Asset Management Record Dissection
Birol Capa [Mon, 13 Mar 2017 10:53:30 +0000 (13:53 +0300)]
PROFINET: Fix the Asset Management Record Dissection

Dissecting AMR doesn't work properly when AM_Location.Structure don't equal to 2.

Bug: 13480
Change-Id: Ie116e10f6e88e240b2f1ae4e1eab27b24350e55a
Reviewed-on: https://code.wireshark.org/review/20529
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Birol Capa <birol.capa@siemens.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoftypes: move set_value_uinteger64 into the union
Martin Kaiser [Mon, 13 Mar 2017 17:46:48 +0000 (18:46 +0100)]
ftypes: move set_value_uinteger64 into the union

Delete set_value_uinteger64 from struct _ftype_t, make it
part of the set_value union.

Change-Id: I12407b7336282daa60fe6e0e742d65e205dc84fd
Reviewed-on: https://code.wireshark.org/review/20539
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agobootp: Add Captive-Portal option (160)
Alexis La Goutte [Mon, 13 Mar 2017 14:12:50 +0000 (15:12 +0100)]
bootp: Add Captive-Portal option (160)

Thanks to David Bird for pcap

Bug: 13483
Change-Id: Id53eadd5faa7599c3864840aa80a8770099baac3
Reviewed-on: https://code.wireshark.org/review/20531
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoBluetooth: "dublicates" -> "duplicates"
Jakub Pawlowski [Mon, 13 Mar 2017 20:20:23 +0000 (13:20 -0700)]
Bluetooth: "dublicates" -> "duplicates"

Change-Id: Ie52c6ef60c911d1e119c5b69de6f64a88b3433f3
Reviewed-on: https://code.wireshark.org/review/20534
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoFix buffer overrun in try_bytesprefix_to_str
Peter Wu [Mon, 13 Mar 2017 16:02:23 +0000 (17:02 +0100)]
Fix buffer overrun in try_bytesprefix_to_str

bytes_string list contains a list of prefixes to match, not the other
way round (matching prefixes in the list).

Bug: 13479
Change-Id: Ie625dc5db30bd55158d688a0101f35d0bf6906af
Fixes: v2.3.0rc0-2644-g540b555729 ("Introduce "bytes_string" type, similar to "value_string"")
Reviewed-on: https://code.wireshark.org/review/20532
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoLua: Base must be base.DEC or base.UNIT_STRING for signed integer
Stig Bjørlykke [Mon, 13 Mar 2017 18:10:51 +0000 (19:10 +0100)]
Lua: Base must be base.DEC or base.UNIT_STRING for signed integer

Reject ProtoField signed integer types with base other than base.DEC
and base.UNIT_STRING.  Update documentation for this.

Bug: 13484
Change-Id: I55a636c89704e96a598f1f185faabd8ad13d96f1
Reviewed-on: https://code.wireshark.org/review/20533
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
7 years agotap-iostat (cli): fix this statement may fall through [-Werror=implicit-fallthrough...
Alexis La Goutte [Sat, 11 Mar 2017 15:33:58 +0000 (16:33 +0100)]
tap-iostat (cli): fix this statement may fall through [-Werror=implicit-fallthrough] found by gcc7

Change-Id: Idd8f4e2175d6575beecaccf2ee018457a25fd225
Reviewed-on: https://code.wireshark.org/review/20493
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoftypes: move set_value_sinteger into the union
Martin Kaiser [Sun, 12 Mar 2017 18:49:42 +0000 (19:49 +0100)]
ftypes: move set_value_sinteger into the union

Delete set_value_sinteger from struct _ftype_t, make it part of the
set_value union.

Change-Id: I084c4c9beba9978b538d359ebaac21391ebd7f82
Reviewed-on: https://code.wireshark.org/review/20523
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoQt: Use em dash when hide the "Show" checkbox
Stig Bjørlykke [Mon, 13 Mar 2017 07:24:35 +0000 (08:24 +0100)]
Qt: Use em dash when hide the "Show" checkbox

Match the style used in "Capture Interfaces" table when elements
are N/A by using the em dash.  This item should also be disabled
using QPalette::Disabled to get a even better match.

Change-Id: I127ce309318df2c36515996df8584d1e4ce690c0
Reviewed-on: https://code.wireshark.org/review/20527
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
7 years agoftypes: move set_value_uinteger into the union
Martin Kaiser [Sun, 12 Mar 2017 18:15:19 +0000 (19:15 +0100)]
ftypes: move set_value_uinteger into the union

Delete set_value_uinteger from struct _ftype_t, make it part of the
set_value union.

Change-Id: I26de15be8ea0ede76236a8f8a4958bfd97ad9d52
Reviewed-on: https://code.wireshark.org/review/20521
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoerf: fix this condition has identical branches [-Werror=duplicated-branches] found...
Alexis La Goutte [Sat, 11 Mar 2017 14:19:16 +0000 (15:19 +0100)]
erf: fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7

Change-Id: I1634b0a7b0fa35ea59ef2fc7fbe0b81f77aad978
Reviewed-on: https://code.wireshark.org/review/20508
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agodis: fix this condition has identical branches [-Werror=duplicated-branches] found...
Alexis La Goutte [Thu, 9 Mar 2017 17:53:27 +0000 (18:53 +0100)]
dis: fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7

Change-Id: I8d28637d5262fd0e06d80607adb6f88b3d909a9e
Reviewed-on: https://code.wireshark.org/review/20465
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agocigi: fix this condition has identical branches [-Werror=duplicated-branches] found...
Alexis La Goutte [Sun, 5 Mar 2017 19:54:18 +0000 (20:54 +0100)]
cigi: fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7

Change-Id: I1f755c876150f204cce95932698c3f4e96fd465d
Reviewed-on: https://code.wireshark.org/review/20426
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agoieee80211-prism: fix this condition has identical branches [-Werror=duplicated-branch...
Alexis La Goutte [Thu, 9 Mar 2017 18:06:27 +0000 (19:06 +0100)]
ieee80211-prism: fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7

Change-Id: Ic3c4a4347ab501c1ee22a25dd3dd41609d28418f
Reviewed-on: https://code.wireshark.org/review/20467
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agorpcap URLs *require* the :<port> argument for remote capture - update manpage.
Joerg Mayer [Sun, 12 Mar 2017 22:10:41 +0000 (23:10 +0100)]
rpcap URLs *require* the :<port> argument for remote capture - update manpage.

Change-Id: Iabae39347bc0058d106a9b00d81629899bc93249
Reviewed-on: https://code.wireshark.org/review/20526
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
7 years agoCatch read errors and zero-length records, as opposed to short reads/EOF.
Guy Harris [Sun, 12 Mar 2017 18:47:44 +0000 (11:47 -0700)]
Catch read errors and zero-length records, as opposed to short reads/EOF.

Also, if we return WTAP_OPEN_ERROR from an open routine after we've set
our close routine, that routine is called, which frees up our private
data structures; don't free them ourselves before returning
WTAP_OPEN_ERROR.

Change-Id: I03eebe1a1677e2161fdacec8de14668093cf03a3
Reviewed-on: https://code.wireshark.org/review/20522
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoftypes (trivial): fix two comments
Martin Kaiser [Sun, 12 Mar 2017 18:21:24 +0000 (19:21 +0100)]
ftypes (trivial): fix two comments

The comments give the name of the struct _ftype_t component that is
initialized. They are wrong in two places. This confuses my script that
deletes the initializers for the components which were moved into the
union.

Change-Id: I876fb29305a94b241df07c97064f31378752b559
Reviewed-on: https://code.wireshark.org/review/20520
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years agoPROFINET: Extend System Redundancy Support
Birol Capa [Mon, 6 Mar 2017 11:39:53 +0000 (14:39 +0300)]
PROFINET: Extend System Redundancy Support

A special ARType for System redundancy IOCARSR (0x0020) used to indicate
SR during the IODConnectReq for Advanced Startup ARs (StartupMode:=1).
With this change, the ARUUID is subdivided into several parts.
APDUStatus dissection is affected by Primary/Backup switchover.

Bug: 13456
Change-Id: I0504ad2f4d15c491b0142c6d24bb8b849a929ba2
Reviewed-on: https://code.wireshark.org/review/20422
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
7 years agoQt: hide the "Show" checkbox for default devices
Peter Wu [Fri, 10 Mar 2017 03:25:43 +0000 (04:25 +0100)]
Qt: hide the "Show" checkbox for default devices

When marking a previously hidden device as default (e.g. via wireshark
-ocapture.device:eth0), an unchecked checkbox is visible. This is just
confusing, just hide the checkbox completely.

Change-Id: I3f85cfcb659c351c72237dced52f0684733188c4
Reviewed-on: https://code.wireshark.org/review/20478
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agonetscaler: Sanity check record size
Michael Mann [Sun, 12 Mar 2017 15:58:54 +0000 (11:58 -0400)]
netscaler: Sanity check record size

Bug: 13478
Change-Id: I6be2972979ff7cabf27e70d236c581d539d6ddac
Reviewed-on: https://code.wireshark.org/review/20515
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agopacket-wbxml.c: Fix potential infinite loops
Michael Mann [Sun, 12 Mar 2017 15:26:54 +0000 (11:26 -0400)]
packet-wbxml.c: Fix potential infinite loops

Bug: 13477
Change-Id: Ib6c440bbcbb5011e8f23fb87418acd87bb38c272
Reviewed-on: https://code.wireshark.org/review/20513
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years ago[Automatic update for 2017-03-12]
Gerald Combs [Sun, 12 Mar 2017 15:11:50 +0000 (08:11 -0700)]
[Automatic update for 2017-03-12]

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

Change-Id: I5718e7c7df8061f81eb01973f504ebbb0cfe1e44
Reviewed-on: https://code.wireshark.org/review/20511
Reviewed-by: Gerald Combs <gerald@wireshark.org>
7 years agollrp: fix this condition has identical branches [-Werror=duplicated-branches] found...
Alexis La Goutte [Thu, 9 Mar 2017 18:14:39 +0000 (19:14 +0100)]
llrp: fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7

Change-Id: I2bc9b5b50b8698c27f2a56b869de318fa98bf7b1
Reviewed-on: https://code.wireshark.org/review/20469
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoieee80211: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Sun, 12 Mar 2017 09:58:08 +0000 (10:58 +0100)]
ieee80211: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I53bca9bc50d18a88cc6c5c5a7ae93bdd1b772903
Reviewed-on: https://code.wireshark.org/review/20504
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agotfshark: fix this ‘if’ clause does not guard... [-Wmisleading-indentation]
Alexis La Goutte [Sat, 11 Mar 2017 15:44:20 +0000 (16:44 +0100)]
tfshark: fix this ‘if’ clause does not guard... [-Wmisleading-indentation]

Change-Id: If66223021d074e6cb3c7bde2af7cca9c72acb8c6
Reviewed-on: https://code.wireshark.org/review/20507
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agosharkd: fix tap memleaks & support for links to frame, url & cleanup
Jakub Zawadzki [Sun, 12 Mar 2017 08:23:17 +0000 (09:23 +0100)]
sharkd: fix tap memleaks & support for links to frame, url & cleanup

Change-Id: I08af04c7882802035344d0051055be05967fb089
Reviewed-on: https://code.wireshark.org/review/20502
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoieee80211: fix declaration of 'ieee80211_tag_...' shadows a global declaration
Alexis La Goutte [Sun, 12 Mar 2017 09:54:57 +0000 (10:54 +0100)]
ieee80211: fix declaration of 'ieee80211_tag_...' shadows a global declaration

Make OSX buildbot happy

Change-Id: I1a376fba3d7f4b24741839697ed0f6c55c9ac77d
Reviewed-on: https://code.wireshark.org/review/20503
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoradius: fix this condition has identical branches [-Werror=duplicated-branches] found...
Alexis La Goutte [Thu, 9 Mar 2017 18:20:37 +0000 (19:20 +0100)]
radius: fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7

Change-Id: I654ead4d834af90e14568a54c7a914a3774c05bc
Reviewed-on: https://code.wireshark.org/review/20470
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agogmr_rach: fix this condition has identical branches [-Werror=duplicated-branches...
Alexis La Goutte [Thu, 9 Mar 2017 17:55:59 +0000 (18:55 +0100)]
gmr_rach: fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7

Change-Id: I3313ea62fd86b0a7a3ae6dfbc40bd6e0841316a2
Reviewed-on: https://code.wireshark.org/review/20466
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agodcerpc (netlogon): fix this condition has identical branches [-Werror=duplicated...
Alexis La Goutte [Thu, 9 Mar 2017 17:49:25 +0000 (18:49 +0100)]
dcerpc (netlogon): fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7

Change-Id: I96b8a8c5157dc89785421282f2c509c100fb0504
Reviewed-on: https://code.wireshark.org/review/20464
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agocatapult-dct2000: fix this condition has identical branches [-Werror=duplicated-branc...
Alexis La Goutte [Sun, 5 Mar 2017 19:52:16 +0000 (20:52 +0100)]
catapult-dct2000: fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7

Change-Id: If3afda940b40500e067467b341f192bbaef173bc
Reviewed-on: https://code.wireshark.org/review/20425
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agoansi_a: fix this condition has identical branches [-Werror=duplicated-branches] found...
Alexis La Goutte [Mon, 6 Mar 2017 20:05:06 +0000 (21:05 +0100)]
ansi_a: fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7

All users of the ELEM_OPT_TLV and ELEM_MAND_TV macros pass an empty string ("")
for the elem_name_addition parameter, so it can never be NULL. The Coverity
warning was about a superfluous check (elem_name_addition[0]=='\0'). All of
these checks are superfluous anyway since both branches yield an empty string.

Change-Id: I28c994fd5e10c04f99c8d77e9aee18afd4a26412
Reviewed-on: https://code.wireshark.org/review/20427
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agotshark and tfshark require -2 when using -R. Document this.
Joerg Mayer [Sun, 12 Mar 2017 11:20:23 +0000 (12:20 +0100)]
tshark and tfshark require -2 when using -R. Document this.

Change-Id: I3ef802ed1163512e20da10eaa8da3239107b6fae
Reviewed-on: https://code.wireshark.org/review/20509
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
7 years agoafn(.h) fix indent
Alexis La Goutte [Sun, 12 Mar 2017 10:04:49 +0000 (11:04 +0100)]
afn(.h) fix indent

use 4 spaces like afn.c

Change-Id: Iadc6d6e3b2919c7014eccc2890966eadd7d7bee7
Reviewed-on: https://code.wireshark.org/review/20506
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoafn(.c): fix indent (align field)
Alexis La Goutte [Sun, 12 Mar 2017 10:01:27 +0000 (11:01 +0100)]
afn(.c): fix indent (align field)

Change-Id: Ie2cc66b8ba26278490134974662acd554b8931f9
Reviewed-on: https://code.wireshark.org/review/20505
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoBGP: Update Transitive Four-Octet AS-Specific Extended Community Sub-Types and remove...
Simon Zhong [Sun, 12 Mar 2017 03:16:53 +0000 (22:16 -0500)]
BGP: Update Transitive Four-Octet AS-Specific Extended Community Sub-Types and remove duplicate marcos.

Change-Id: I87454ea95bc64a39e4e60ba374e9cafb574e744c
Reviewed-on: https://code.wireshark.org/review/20501
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years ago802.11: Use proto_tree_add_bitmask
Alexis La Goutte [Fri, 6 Jan 2017 07:16:24 +0000 (08:16 +0100)]
802.11: Use proto_tree_add_bitmask

Change-Id: If46ccea1c58448d2dacad07fb3171e423babe59f
Reviewed-on: https://code.wireshark.org/review/19562
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoQt: Give discard button focus (but not as default)
Stig Bjørlykke [Fri, 10 Mar 2017 12:03:02 +0000 (13:03 +0100)]
Qt: Give discard button focus (but not as default)

Set focus to the discard button in the "Unsaved packet" and
"Unsaved comments" dialogs to enable spacebar for discard and
enter for save.

Bug: 13363
Change-Id: I576b02c4e3f0964aef56a0f1c06ed57c6ba683bf
Reviewed-on: https://code.wireshark.org/review/20485
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
7 years agobgp: Avoid divide by zero
Stig Bjørlykke [Sat, 11 Mar 2017 22:16:11 +0000 (23:16 +0100)]
bgp: Avoid divide by zero

Bug: 13476
Change-Id: I399df46c9d5f6d0d464ecc9cf8d44eddf709f7dc
Reviewed-on: https://code.wireshark.org/review/20499
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agonetlink: support legacy dump request messages
Michal Kubecek [Fri, 10 Mar 2017 07:59:02 +0000 (08:59 +0100)]
netlink: support legacy dump request messages

Some legacy tools, including iproute2 < 3.9, issue shorter RTM_GETLINK
and RTM_GETADDR dump queries which only contain struct rtgenmsg rather
than struct ifinfomsg. As noted in kernel comment in rtnl_dump_ifinfo(),
these legacy requests will be (even with attributes) always shorter than
struct ifinfomsg so that they are easy to detect.

Similar problem can be observed with tools using nl_rtgen_request()
function from libnl3; this also affects other RTM_GET* types.

If such legacy message is detected by length shorter than expected data
structure, parse it as this legacy version with (1-byte) struct
rtgenmsg so that it's shown as intended rather than as malformed.

Change-Id: I53b6bff9e44cd2359d7cd313b6f0724f63f0e74d
Reviewed-on: https://code.wireshark.org/review/20461
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michal Kubeček <mkubecek@suse.cz>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agosharkd: support for export objects, following stream.
Jakub Zawadzki [Sat, 11 Mar 2017 11:27:14 +0000 (12:27 +0100)]
sharkd: support for export objects, following stream.

Change-Id: I364cb200e537ae07cbe831d8be1f217c5a15ee09
Reviewed-on: https://code.wireshark.org/review/20492
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
7 years agoUpdated Address Family Numbers with latest (Last Updated 2016-08-26) IANA table.
Simon Zhong [Fri, 10 Mar 2017 19:11:23 +0000 (14:11 -0500)]
Updated Address Family Numbers with latest (Last Updated 2016-08-26) IANA table.

Change-Id: I4286a249ca9603732f06e2715c1804a201c105e9
Reviewed-on: https://code.wireshark.org/review/20489
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoT30: fix parsing broken since ge063924
Martin Vit [Mon, 6 Mar 2017 16:14:18 +0000 (17:14 +0100)]
T30: fix parsing broken since ge063924

Bug: 1918
Change-Id: I276e5ad74caaf509d220f97e111d2aedc7caef17
Reviewed-on: https://code.wireshark.org/review/20423
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agounistim (plugin): fix this statement may fall through [-Werror=implicit-fallthrough...
Alexis La Goutte [Sat, 11 Mar 2017 15:38:46 +0000 (16:38 +0100)]
unistim (plugin): fix this statement may fall through [-Werror=implicit-fallthrough] found by gcc7

Change-Id: Id928c9f4506b3f88016d77e3e79a4ecf78d52e93
Reviewed-on: https://code.wireshark.org/review/20494
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agooids: fix this statement may fall through [-Werror=implicit-fallthrough] found by...
Alexis La Goutte [Sat, 11 Mar 2017 15:40:33 +0000 (16:40 +0100)]
oids: fix this statement may fall through [-Werror=implicit-fallthrough] found by gcc7

Change-Id: I8f84414be693ea8ebcfef003480e9ee05de94ea0
Reviewed-on: https://code.wireshark.org/review/20495
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agostats_tree: fix this statement may fall through [-Werror=implicit-fallthrough] found...
Alexis La Goutte [Sat, 11 Mar 2017 15:41:00 +0000 (16:41 +0100)]
stats_tree: fix this statement may fall through [-Werror=implicit-fallthrough] found by gcc7

Change-Id: Idd5ab938b95d515cdf8b2a8568456f44b3dd85ac
Reviewed-on: https://code.wireshark.org/review/20496
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoBGP: Fix the issue that SAFI 72 (BGP-LS-VPN) was not decoded.
Simon Zhong [Fri, 10 Mar 2017 18:49:29 +0000 (13:49 -0500)]
BGP: Fix the issue that SAFI 72 (BGP-LS-VPN) was not decoded.

Change-Id: I2aef41458c89975dddea4d8bb6355bb7aabd1cad
Reviewed-on: https://code.wireshark.org/review/20488
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years ago[LDAP] Add a couple of OID translations.
AndersBroman [Fri, 10 Mar 2017 11:49:54 +0000 (12:49 +0100)]
[LDAP] Add a couple of OID translations.

Change-Id: I3d3435a9ac5d2a177b0ced6085eabe4feb67ba7b
Reviewed-on: https://code.wireshark.org/review/20484
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoAdd decoding of EDCA IE
Joerg Mayer [Fri, 10 Mar 2017 13:54:21 +0000 (14:54 +0100)]
Add decoding of EDCA IE

Bug: 13472
Change-Id: Iff8b3e532680ada668581263476b6557518acc50
Reviewed-on: https://code.wireshark.org/review/20486
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
7 years agoSMB3 SVHDX_OPEN_DEVICE_CONTEXT_V2 implementation
Volodymyr Khomenko [Thu, 9 Mar 2017 20:52:48 +0000 (22:52 +0200)]
SMB3 SVHDX_OPEN_DEVICE_CONTEXT_V2 implementation

1. Extended SMB3 dissector of OPEN_DEVICE_CONTEXT to hanlde V2 structure
See https://msdn.microsoft.com/en-us/library/mt240852.aspx

2. Rejected restriction for request-only processing
(now this context MUST be handled in response packets too, both V1 and v2).
See https://msdn.microsoft.com/en-us/library/dn366831.aspx
and https://msdn.microsoft.com/en-us/library/dn409028.aspx#Appendix_A_10

Change-Id: I7f200932d07eb61c6465d5792a550332ac769be5
Reviewed-on: https://code.wireshark.org/review/20473
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoDon't cast to a too-large size.
Guy Harris [Fri, 10 Mar 2017 04:20:20 +0000 (20:20 -0800)]
Don't cast to a too-large size.

The maximum record length is 255*128 + 127 = 32767; that fits in a
guint32, which is large enough to support the biggest packet we'd ever
support without stretching several size values to 64 bits.

It's not a size of an object in memory, so it doesn't have to be a
size_t, and a size_t could be too large to fit in the record sizes we're
using.

Just cast to guint32.

Change-Id: Ie664fda3ce9945893fd992bbb9a81a5d632a3fcb
Reviewed-on: https://code.wireshark.org/review/20479
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoReplace aes.c and des.c by Libgcrypt
erikdejong [Mon, 6 Mar 2017 21:01:39 +0000 (22:01 +0100)]
Replace aes.c and des.c by Libgcrypt

Follow-up of https://code.wireshark.org/review/20095

Rewritten functions:
- crypt_des_ecb

crypt_des_ecb verified against previous crypt_des_ecb implementation with
4294967295 random keys and input buffers from /dev/random as I cannot find a
suitable pcap which uses DES

Change-Id: I21ec2572451e0ded4299ffadd8dd687817bc6318
Reviewed-on: https://code.wireshark.org/review/20429
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agoio_graph_item: fix false positive array subscript is above array bounds [-Werror...
Alexis La Goutte [Wed, 8 Mar 2017 22:05:14 +0000 (23:05 +0100)]
io_graph_item: fix false positive array subscript is above array bounds [-Werror=array-bounds]

Change-Id: I14fc19f131782a9c85104ca2189b9452079d0013
Reviewed-on: https://code.wireshark.org/review/20454
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agonstrace: fix size of vmnames
Anil Kumar [Wed, 8 Mar 2017 06:45:22 +0000 (12:15 +0530)]
nstrace: fix size of vmnames

When vmnames are included in the header of a netscaler packet trace,
number of bytes equal to the size of vmnames is omitted from the packet,
by the dissector.

Bug: 13459
Change-Id: I0f907e9c2e08c1cbebd47f7e50d8284a6aaade59
Reviewed-on: https://code.wireshark.org/review/20446
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoTLS: append Log name for CT Log IDs
Peter Wu [Sun, 5 Mar 2017 00:56:17 +0000 (01:56 +0100)]
TLS: append Log name for CT Log IDs

Show something like "Signed Certificate Timestamp (Google 'Pilot' Log)"
if the Log ID is recognized, or "... (Unknown Log)" otherwise.

Bug: 13372
Change-Id: I1cd373f110d5beb63ee89fb85831ab72cafe03d0
Reviewed-on: https://code.wireshark.org/review/20387
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agoftypes: move set_value_protocol into the union
Martin Kaiser [Thu, 9 Mar 2017 22:05:18 +0000 (23:05 +0100)]
ftypes: move set_value_protocol into the union

Delete set_value_protocol from struct _ftype_t, make it part of the
set_value union.

Change-Id: Iae55388b8a2c965944028499619282c3232c31f3
Reviewed-on: https://code.wireshark.org/review/20475
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoftypes: move set_value_string into the union
Martin Kaiser [Thu, 9 Mar 2017 21:56:07 +0000 (22:56 +0100)]
ftypes: move set_value_string into the union

Delete set_value_string from struct _ftype_t, make it part of the
set_value union.

Change-Id: Ia3a57245330ed0d158c8c3e4552ec5d80752fe0f
Reviewed-on: https://code.wireshark.org/review/20474
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoRTP streams dialog: Fix find reverse button
Erik de Jong [Thu, 9 Mar 2017 13:33:29 +0000 (14:33 +0100)]
RTP streams dialog: Fix find reverse button

Fix find reverse button

Bug: 13462
Change-Id: I6e19fa38cd333285c9ca3cf01e4c06ff8de56b2a
Reviewed-on: https://code.wireshark.org/review/20462
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agoftypes: move set_value_time into the union
Martin Kaiser [Tue, 7 Mar 2017 21:43:04 +0000 (22:43 +0100)]
ftypes: move set_value_time into the union

Delete set_value_time from struct _ftype_t, make it part of the
set_value union.

Change-Id: Ieee3b083d52afdd608e31e8ca75b50016fec8a69
Reviewed-on: https://code.wireshark.org/review/20442
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agoIEEE80211: Support of MU Exclusive Beamforming Report decoding under VHT Compressed...
Radhashyam Behera [Tue, 21 Feb 2017 13:36:48 +0000 (19:06 +0530)]
IEEE80211: Support of MU Exclusive Beamforming Report decoding under VHT Compressed Beamforming.

Bug: 13343
Change-Id: Ia69b2c074adb1c269c93db40ad5004a261560c88
Reviewed-on: https://code.wireshark.org/review/20224
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoAdd another instance of capture_opts_log when more information is known.
Joerg Mayer [Thu, 9 Mar 2017 18:48:48 +0000 (19:48 +0100)]
Add another instance of capture_opts_log when more information is known.

Make a url in a comment more readable.

Change-Id: I9a34e442434cc50c6d631622d680c12049c7dbf8
Reviewed-on: https://code.wireshark.org/review/20472
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
7 years agosnort-config: fix comparison between pointer and zero character constant [-Werror...
Alexis La Goutte [Wed, 8 Mar 2017 05:00:51 +0000 (06:00 +0100)]
snort-config: fix comparison between pointer and zero character constant [-Werror=pointer-compare]

Change-Id: I6afeac8606fda59c833933628f53d2eb73e2909c
Reviewed-on: https://code.wireshark.org/review/20445
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
7 years agoQt: Fix heap-use-after-free when deleting IO graph
Stig Bjørlykke [Thu, 9 Mar 2017 08:46:08 +0000 (09:46 +0100)]
Qt: Fix heap-use-after-free when deleting IO graph

Deleting a IO graph item while editing a field will use the IOGraph
object so ensure we delete in correct order to avoid heap-use-after-free.

Bug: 13234
Change-Id: I6d0de21684f842fbd67c9b38fc6b75b81aec5518
Reviewed-on: https://code.wireshark.org/review/20456
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
7 years agoimap: Give correct lineend to get_token_len()
Stig Bjørlykke [Wed, 8 Mar 2017 20:01:12 +0000 (21:01 +0100)]
imap: Give correct lineend to get_token_len()

The return value from get_token_len() is the token length, but the
returned next_token can have a offset more than token length because
it also skip trailing blanks.  Ensure we always give correct lineend.

Bug: 13466
Change-Id: I88a11b9bce02999fcf87c0d7542e56fa90aae5a0
Reviewed-on: https://code.wireshark.org/review/20451
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
7 years agoproto: Check for empty protocol->fields
Stig Bjørlykke [Thu, 9 Mar 2017 07:34:54 +0000 (08:34 +0100)]
proto: Check for empty protocol->fields

In proto_get_first_protocol_field() we must check for an empty
protocol->fields because Lua scripts may have protocols without
fields and g_ptr_array_index() does not perform bounds checking
on the given index.

Bug: 13223
Change-Id: Ib2f6286d0799541243450348dcf345a965b2825c
Reviewed-on: https://code.wireshark.org/review/20455
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoIntroduce "bytes_string" type, similar to "value_string"
Peter Wu [Sat, 4 Mar 2017 00:40:51 +0000 (01:40 +0100)]
Introduce "bytes_string" type, similar to "value_string"

In order to map arbitrary byte buffers to strings, introduce a new
"bytes_string" type. Since "bytes_to_str" is already used for other
purposes, name the generic function "bytesval_to_str" instead similar to
the name( "val_to_str").

Accept "size_t" as length parameter since this is what is returned by
the "sizeof" operator. Do not add a "try_bytesval_to_str_idx" variant
since this pattern is not needed for now. Add a variant to match the
prefix since this is currently expected by the ISAKMP dissector.

Change-Id: I6d790325e85d9fb1384330f28a8c36e2057fdf30
Reviewed-on: https://code.wireshark.org/review/20386
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agoubertooth: fix this statement may fall through [-Werror=implicit-fallthrough=] found...
Alexis La Goutte [Sun, 5 Mar 2017 16:54:22 +0000 (17:54 +0100)]
ubertooth: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: Iec4253ad488f51169ce4cc295b5f084ba4aa4122
Reviewed-on: https://code.wireshark.org/review/20412
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
7 years agoftypes: move set_value_guid into the union
Martin Kaiser [Tue, 7 Mar 2017 21:35:45 +0000 (22:35 +0100)]
ftypes: move set_value_guid into the union

Delete set_value_guid from struct _ftype_t, make it part of the
set_value union.

Change-Id: I3a04ff6b1ab179063ef77a3c475809df0bde5c68
Reviewed-on: https://code.wireshark.org/review/20441
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years agoftypes: move set_value_bytes into the union
Martin Kaiser [Tue, 7 Mar 2017 21:16:02 +0000 (22:16 +0100)]
ftypes: move set_value_bytes into the union

Delete set_value_bytes from struct _ftype_t, make it part of the
set_value union.

Change-Id: I3ee6a9f68b269ee083794947816e13ea6c1b9d29
Reviewed-on: https://code.wireshark.org/review/20440
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years agohttp: Check for valid tcpinfo pointer
Stig Bjørlykke [Tue, 7 Mar 2017 21:06:13 +0000 (22:06 +0100)]
http: Check for valid tcpinfo pointer

In dissect_http_tcp() the data pointer may be NULL so ensure
we check for this before dereferencing it.

Bug: 13457
Change-Id: I84f4a0e3b416a2829998f20fe59da8770a34e564
Reviewed-on: https://code.wireshark.org/review/20438
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
7 years agonsh: remove duplicate ethertype entry
Gabriel Ganne [Wed, 8 Mar 2017 07:40:30 +0000 (08:40 +0100)]
nsh: remove duplicate ethertype entry

Change-Id: I3b177eb86a4058a437f9fb0617b5ae5b3a513af2
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Reviewed-on: https://code.wireshark.org/review/20447
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years ago[SIP] Start dissecting generic parameters.
AndersBroman [Wed, 8 Mar 2017 08:16:16 +0000 (09:16 +0100)]
[SIP] Start dissecting generic parameters.

Change-Id: I545f8646e6e4cba74c48b58e0fb6ea6ea5338625
Reviewed-on: https://code.wireshark.org/review/20448
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years ago[SIP] Start dissecting generic parameters.
AndersBroman [Tue, 7 Mar 2017 15:57:12 +0000 (16:57 +0100)]
[SIP] Start dissecting generic parameters.

Change-Id: I5d5c2f8cfc78c4557a9fcd61a47b39e7c8b50cad
Reviewed-on: https://code.wireshark.org/review/20437
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoDon't close the pcap_t in get_data_link_types().
Guy Harris [Tue, 7 Mar 2017 22:08:53 +0000 (14:08 -0800)]
Don't close the pcap_t in get_data_link_types().

1) Its caller closes it, and closing a closed pcap_t can cause Bad
Things to happen.

2) We're trying to get an error string from it after we're closing it,
which won't work well, either.

While we're at it, don't use pcap_statustostr() if we don't have it (we
have it iff we have pcap_create()).

Change-Id: Ieded1e3ae78aea4e0970cf582e780c2846fe9dd5
Reviewed-on: https://code.wireshark.org/review/20443
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoftypes: create a set_value union
Martin Kaiser [Sat, 4 Mar 2017 15:15:54 +0000 (16:15 +0100)]
ftypes: create a set_value union

struct _ftype_t contains a number of pointers to set_value_...()
functions. For each pre-defined ftype_t, only one of these pointers
is != NULL.

As the comment already says, we should move these functions into a
union. ftenum_t ftype will be used for selecting the correct function
pointer from the union.

Create a set_value union and move the FvalueSetByteArrayFunc pointer
into the union. Update fvalue_set_byte_array() accordingly. Check
that the fvalue_t parameter is of the correct type.

Change-Id: I6568d8f47108311289c0cd425f28ea8b38046141
Reviewed-on: https://code.wireshark.org/review/20433
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years agonsh: add protocol dissection over ethernet
Gabriel Ganne [Fri, 8 Jul 2016 12:11:21 +0000 (14:11 +0200)]
nsh: add protocol dissection over ethernet

Change-Id: I4cbfb5d4371fa4401f591d5e52a603ae1256c23c
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Reviewed-on: https://code.wireshark.org/review/20435
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years ago[SIP] Handle P-Access-Network-Info Headers parameter without '='.
AndersBroman [Tue, 7 Mar 2017 13:30:06 +0000 (14:30 +0100)]
[SIP] Handle P-Access-Network-Info Headers parameter without '='.

Change-Id: I6cb5bc6c3cd612b4770d578edaf1c9a877659d8e
Reviewed-on: https://code.wireshark.org/review/20436
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agortpproxy: fix this statement may fall through [-Werror=implicit-fallthrough=] found...
Alexis La Goutte [Sun, 5 Mar 2017 16:31:59 +0000 (17:31 +0100)]
rtpproxy: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: Ide19cb51d5ce0a9d0a0634ad492c9e81cbc2c810
Reviewed-on: https://code.wireshark.org/review/20411
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
7 years agoandroiddump: Fix a type
Stig Bjørlykke [Tue, 7 Mar 2017 06:35:33 +0000 (07:35 +0100)]
androiddump: Fix a type

Change-Id: I839e7e7300af9b90e91548fa29157143ae00adee
Reviewed-on: https://code.wireshark.org/review/20434
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
7 years agolua: improve FileHandler:[seek_]read behavior and documentation
Peter Wu [Wed, 21 Dec 2016 01:31:35 +0000 (02:31 +0100)]
lua: improve FileHandler:[seek_]read behavior and documentation

WSLUA documents FileHandler:read as returning a boolean or integer.
Ignore strings, do not treat strings as number even if it is possible.

Remove undocumented feature of FileHandler:seek_read that used returned
strings as the frame data. Use FrameInfo:read_data instead. This avoids
interpreting numbers as data which caused surprising behavior when
combining with FileHandler:read.

Documentation has been improved to document the return value, this is
consistent with the documentation in the WSLUA tests.

Change-Id: I31f74ec33ff0e43c90d83c1904af43801886cfa1
Reviewed-on: https://code.wireshark.org/review/19366
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoandroiddump: Add ignore log-buffer and custom-options for logcat-text
Michal Labedzki [Sat, 28 Jan 2017 18:16:15 +0000 (19:16 +0100)]
androiddump: Add ignore log-buffer and custom-options for logcat-text

Logcat Text interfaces have now two new options:
1. Ignore log-buffer - this means you start capturing immediately
   and there will no logs from buffer
2. Custom-options - pass command line parameters to logcat, like tags
For example:
adb logcat -v threadtime -b main #now custom parameters starts# -T 20 -s Ads Wireshark

Please note that some custom options are banned to avoid unexpected
behaviour (like "not working")

Change-Id: I015d1aeae35cfed712de59138288d82d3a491c38
Reviewed-on: https://code.wireshark.org/review/20358
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoRadioTap TimeStamp field added.
Boazi [Thu, 23 Feb 2017 16:52:52 +0000 (18:52 +0200)]
RadioTap TimeStamp field added.

Timestamp was added according to radiotap spec.
Original changes provided by Johannes Berg from Intel

Change-Id: I72cb315626787d85b2bfb676c8ea7c73130f5a69
Reviewed-on: https://code.wireshark.org/review/20282
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
7 years agoopa: fix this statement may fall through [-Werror=implicit-fallthrough=] found by...
Alexis La Goutte [Sun, 5 Mar 2017 16:22:37 +0000 (17:22 +0100)]
opa: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I1edb5a3f7c9ac94c2a922058ca54d4b3e9218b0e
Reviewed-on: https://code.wireshark.org/review/20408
Reviewed-by: Adam Goldman <adam.goldman@intel.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
7 years agoSwitch conversations to use wmem_tree_t instead of (sorted) GSList.
Michael Mann [Tue, 7 Feb 2017 22:05:17 +0000 (17:05 -0500)]
Switch conversations to use wmem_tree_t instead of (sorted) GSList.

Change-Id: Ifaf25ca5a7974f1d398ceebbb4c6733d4d3e001a
Reviewed-on: https://code.wireshark.org/review/20006
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agogsm_rr_csn_flag -> proto_tree_add_bits_item when not using return value (CID-281350).
Michael Mann [Sun, 5 Mar 2017 18:10:16 +0000 (13:10 -0500)]
gsm_rr_csn_flag -> proto_tree_add_bits_item when not using return value (CID-281350).

When flags aren't used in flow control decisions, the function is
effectively proto_tree_add_bits_item, so make it so.

Change-Id: Ic82e734ddd24d41fe7c36e435cc941ed872c3b03
Reviewed-on: https://code.wireshark.org/review/14773
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoFix issue with dissecting multiple DT1 packets in the frame
Rustam Safargalin [Wed, 2 Nov 2016 08:36:09 +0000 (11:36 +0300)]
Fix issue with dissecting multiple DT1 packets in the frame

When parameter 'Reassemble SCCP messages' enabled in case there
are more than one complete DT1 in the frame they had not been
dissected.

Bug: 11130
Bug: 3360
Change-Id: Iba9093105fcd95dc398607c950129ed1db866c85
Reviewed-on: https://code.wireshark.org/review/18615
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agobluetooth: fix this statement may fall through [-Werror=implicit-fallthrough=] found...
Alexis La Goutte [Sun, 5 Mar 2017 15:20:15 +0000 (16:20 +0100)]
bluetooth: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I4d8e6f32b08991f49ee22b320f02c1f65e22b6a0
Reviewed-on: https://code.wireshark.org/review/20400
Reviewed-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>