metze/wireshark/wip.git
5 years agoDiameter: Add 3GPP AVP 1706 and bit decoding
Anders Broman [Thu, 18 Apr 2019 08:27:49 +0000 (10:27 +0200)]
Diameter: Add 3GPP AVP 1706 and bit decoding

in 1426 Access-Restriction-Data

Change-Id: I358ddffa1b395adeaa96494f572471619d8b40a6
Reviewed-on: https://code.wireshark.org/review/32884
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoNFS: Fix header field type in dissect_rpc_array calls
Jorge Mora [Wed, 17 Apr 2019 19:10:53 +0000 (13:10 -0600)]
NFS: Fix header field type in dissect_rpc_array calls

The field type must be FT_NONE in dissect_rpc_array to avoid
warning: Trailing stray characters.

Change-Id: I259e1fe5491b3ab95234c3521aa2c2b575650856
Reviewed-on: https://code.wireshark.org/review/32880
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agowsutil: Warn on empty arguments
Tomasz Moń [Sun, 14 Apr 2019 09:39:27 +0000 (11:39 +0200)]
wsutil: Warn on empty arguments

Callers should not include empty strings in arguments list. Log warning
message instead of silently dropping remaining arguments.

Change-Id: Ia68c7b90cec860e032f81a4008aa005b07ebcfd5
Ping-Bug: 15586
Reviewed-on: https://code.wireshark.org/review/32849
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoOnly do the read loop in the TRY block.
Guy Harris [Wed, 17 Apr 2019 22:28:24 +0000 (15:28 -0700)]
Only do the read loop in the TRY block.

That's slightly less arbitrary.

Change-Id: Ie505a5d128f00ae3a1d9280ab076e483a85e2be3
Reviewed-on: https://code.wireshark.org/review/32881
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoIEEE1609dot2: Update to the latest ASN1 files.
Anders Broman [Wed, 17 Apr 2019 14:04:15 +0000 (16:04 +0200)]
IEEE1609dot2: Update to the latest ASN1 files.

Bug: 15703
Bug: 15704
Change-Id: I0574abc5c72835d9e7ca835790c10e55d9e86593
Reviewed-on: https://code.wireshark.org/review/32879
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDiameter 3GPP: Dissect S6t feature list
Anders Broman [Wed, 17 Apr 2019 11:57:32 +0000 (13:57 +0200)]
Diameter 3GPP: Dissect S6t feature list

Change-Id: I0eeb0a40cba67c4e73b16d48b85ad028286407c5
Reviewed-on: https://code.wireshark.org/review/32878
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoNAS-5GS: Fix Item length in QoS rules.
Anders Broman [Wed, 17 Apr 2019 11:23:36 +0000 (13:23 +0200)]
NAS-5GS: Fix Item length in QoS rules.

Change-Id: Iddd1888a4757b4bbac3cccbb84b8068f54090fc4
Reviewed-on: https://code.wireshark.org/review/32877
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDiameter: Prettify subdissection of bitfields.
Anders Broman [Wed, 17 Apr 2019 08:58:35 +0000 (10:58 +0200)]
Diameter: Prettify subdissection of bitfields.

Change-Id: I818e00fc3e8e2ff3da50f2075f6e7f9ec085ca2d
Reviewed-on: https://code.wireshark.org/review/32876
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDiameter: Update AVPs from TS 29.336 v15.6.0
Anders Broman [Wed, 17 Apr 2019 06:48:46 +0000 (08:48 +0200)]
Diameter: Update AVPs from TS 29.336 v15.6.0

Bug: 15700
Change-Id: Icea7af58eeb1c5586092065d94e9ce37546306e5
Reviewed-on: https://code.wireshark.org/review/32875
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoextcap: Improve example multicheck values
Tomasz Moń [Sat, 13 Apr 2019 23:42:33 +0000 (01:42 +0200)]
extcap: Improve example multicheck values

Multicheck values can be checkable or uncheckable depending on the
"enabled" option. Moreover, multicheck values can be stacked into a
tree by providing a "parent" option.

Modify the example extcap to illustrate these possibilities.

Bug: 13355
Change-Id: I0c50ff873c07eca5cc4ae8036b87cbb440d318b3
Reviewed-on: https://code.wireshark.org/review/32842
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoCIP: Don't parse error responses as Success
Dylan Ulis [Tue, 16 Apr 2019 22:10:40 +0000 (18:10 -0400)]
CIP: Don't parse error responses as Success

Remove most cases where we were processing CI_GRC_SERVICE_ERROR as a
success condition.
Leave CI_GRC_SERVICE_ERROR in some cases where this may make sense, eg:
Modbus embedded messages may still want to be parsed as the embedded
format.

Bug: 15669
Change-Id: I44cae1ea8d3bacd6291a3118750f8a9e825de044
Reviewed-on: https://code.wireshark.org/review/32874
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoCIP Security: Fix some off by 1
Dylan Ulis [Tue, 16 Apr 2019 22:02:16 +0000 (18:02 -0400)]
CIP Security: Fix some off by 1

Some offsets were not incremented after being read, but the next field
assumed it was incremented.

Change-Id: Ifb523bc37f454cfc76d077d34c3efa2663fb6b9e
Reviewed-on: https://code.wireshark.org/review/32873
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoDCOM - Add dissector for IProvideClassInfo
alexsirr [Thu, 14 Feb 2019 19:37:41 +0000 (11:37 -0800)]
DCOM - Add dissector for IProvideClassInfo

Bug: 15508
Change-Id: Ief643578407f202ebf501d67e4a55e70317db0ca
Reviewed-on: https://code.wireshark.org/review/32034
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agotest: fix sampleif.py on weird systems using Python 3.6 and older
Peter Wu [Mon, 15 Apr 2019 22:02:37 +0000 (23:02 +0100)]
test: fix sampleif.py on weird systems using Python 3.6 and older

Setting PYTHONIOENCODING=utf-8 would also work, but only if it is done
for every test that could possibly invoke the extcap. Let's patch the
script instead to force UTF-8 for its output encoding. Thanks to Greg
for the suggestion at https://stackoverflow.com/a/4374457/427545

Change-Id: I2e39e65e49465392c5b077c8b13ed931073661fb
Reviewed-on: https://code.wireshark.org/review/32868
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoReadability improvements to WSUG - Introduction
Moshe Kaplan [Mon, 15 Apr 2019 20:42:14 +0000 (16:42 -0400)]
Readability improvements to WSUG - Introduction

Change-Id: I39270092772daa0c119c2fb2ece2fcb1cbad2d8c
Reviewed-on: https://code.wireshark.org/review/32867
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoextcap: Fix Python 3 bytes handling in example
Tomasz Moń [Mon, 15 Apr 2019 16:27:10 +0000 (18:27 +0200)]
extcap: Fix Python 3 bytes handling in example

In Python 3 strings cannot be joined with bytes.
This change has no effect for Python 2.

Ping-Bug: 15694
Change-Id: I2eb62698ce323f8156ed98b7fe88e4e43e59c784
Reviewed-on: https://code.wireshark.org/review/32843
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agotest: run test_tshark_extcap_interfaces with capture support only.
Dario Lombardo [Sun, 14 Apr 2019 18:42:33 +0000 (20:42 +0200)]
test: run test_tshark_extcap_interfaces with capture support only.

Fix tests without pcap.

Change-Id: Ib3057d072bd8ced3d1c04b862f6fd7cc07400aa8
Reviewed-on: https://code.wireshark.org/review/32837
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoZigBee: Remove unused hf
Kenneth Soerensen [Mon, 15 Apr 2019 18:32:03 +0000 (20:32 +0200)]
ZigBee: Remove unused hf

Change-Id: I744d0cfee7ca6a0256e8f651986a64556edac0eb
Reviewed-on: https://code.wireshark.org/review/32864
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoZigBee: Dissect Snapshot Payload Type names
Kenneth Soerensen [Mon, 15 Apr 2019 18:31:06 +0000 (20:31 +0200)]
ZigBee: Dissect Snapshot Payload Type names

Change-Id: I5897542d011d6ba9461b94387795206e358fbf88
Reviewed-on: https://code.wireshark.org/review/32863
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoDon't pass "-g deprecated-gtk" to checkAPIs.pl.
Gerald Combs [Mon, 15 Apr 2019 18:40:48 +0000 (11:40 -0700)]
Don't pass "-g deprecated-gtk" to checkAPIs.pl.

The deprecated-gtk and deprecated-gtk-todo API groups were removed last
year in g7853d0e354.

Change-Id: I9b299d54da043bbda91d639ec7c94a58f459149f
Reviewed-on: https://code.wireshark.org/review/32865
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoISAKMP: Added support for Notify DEVICE_IDENTITY Payload
Michail Koreshkov [Thu, 11 Apr 2019 12:26:47 +0000 (15:26 +0300)]
ISAKMP: Added support for Notify DEVICE_IDENTITY Payload

As specified in 3GPP TS 24.302  (Section 8.2.9.2)

Change-Id: I702ece6f9885f52b45f808cfadb047d14359feef
Reviewed-on: https://code.wireshark.org/review/32821
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoZigBee: Dissect Notification Scheme names
Kenneth Soerensen [Mon, 15 Apr 2019 11:37:08 +0000 (13:37 +0200)]
ZigBee: Dissect Notification Scheme names

Change-Id: I6b8a43ebb66eace9f87fe1865403e03c1fe510ed
Reviewed-on: https://code.wireshark.org/review/32859
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoCRMF: Handle 64 bit serialNumber
Anders Broman [Mon, 15 Apr 2019 12:43:08 +0000 (14:43 +0200)]
CRMF: Handle 64 bit serialNumber

Add MIN..MAX in the ASN1 code to have it generate code to handle 64
bits.

Bug: 15154
Change-Id: I87b786a84bdab60641c520322ea8096c5f7a7f81
Reviewed-on: https://code.wireshark.org/review/32860
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoLDP: Dissect interface parameter of PWID FEC
Uli Heilmeier [Sun, 14 Apr 2019 20:29:46 +0000 (22:29 +0200)]
LDP: Dissect interface parameter of PWID FEC

Bug: 15654
Change-Id: Idad1f531ec61efcde98872b092529cb8c3b28c9b
Reviewed-on: https://code.wireshark.org/review/32855
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoHava a routine to read the currently-selected frome.
Guy Harris [Mon, 15 Apr 2019 05:14:15 +0000 (22:14 -0700)]
Hava a routine to read the currently-selected frome.

Have cf_read_current_record() take a capture_file as an argument and
read, into its wtap_rec and Buffer for the currently-selected frame,
information for the currently-selected frame.

Rename cf_read_record_r() to cf_read_record().

That gives us 1) a routine that reads the currently-selected frame into
the wtap_rec and Buffer for the currently-selected frame and 2) a
routine that reads an arbitrary frame into the wtap_rec and Buffer
supplied to it.  If you *want* the currently-selected record, use the
former, otherwise use the latter.

Change-Id: If6bd5915dd5bc18334d7b89859822a19234153a4
Reviewed-on: https://code.wireshark.org/review/32858
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoQt: Do not pass empty values for extcap boolflags
Tomasz Moń [Sun, 14 Apr 2019 11:14:27 +0000 (13:14 +0200)]
Qt: Do not pass empty values for extcap boolflags

For extcap boolean flags inserted into arguments hash table, the key should
be the "call" option and value should be NULL.
extcap_add_arg_and_remove_cb() takes care of NULL values by simply
omitting them from generated argument list.

ws_pipe_spawn_async() appends arguments until either:
  * argument string is NULL
  * argument string points directly to NULL terminator (empty string)

This bug resulted in extcap arguments being "cut off" after the first
"boolflag" present in the commandline arugments. Because arugments hash
table is unordered the actual commandline passed to extcap depended on
the order in which options were changed in extcap configuration dialog.

Bug: 15586
Change-Id: I00f136d3b627064cbfb539b3429aa5e4aef319e1
Reviewed-on: https://code.wireshark.org/review/32848
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoZigBee: Fix some -Wdocumentation issues
Kenneth Soerensen [Sun, 14 Apr 2019 18:28:28 +0000 (20:28 +0200)]
ZigBee: Fix some -Wdocumentation issues

Change-Id: Iecf0d68086076cdb239050d9e064411fda59f662
Reviewed-on: https://code.wireshark.org/review/32853
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoZigBee: Decode remaining commands in Metering Cluster
Kenneth Soerensen [Sat, 13 Apr 2019 15:56:35 +0000 (17:56 +0200)]
ZigBee: Decode remaining commands in Metering Cluster

Bug: 13360
Change-Id: I47fcbb97303e111f9ab52be709127198f0825704
Reviewed-on: https://code.wireshark.org/review/32850
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Boye Petersen <martinboyepetersen@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agomake-usb.py: use HTTPS URL
Peter Wu [Sun, 14 Apr 2019 21:36:54 +0000 (22:36 +0100)]
make-usb.py: use HTTPS URL

The linux-usb.org website seems maintained by Stephen J. Gowdy as linked
from the bottom of the website, use the https version.

Change-Id: Id50694735d1078df5845ae8d1ec32523d2216c68
Reviewed-on: https://code.wireshark.org/review/32856
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoGive a PacketDialog a Buffer and read directly into it and into its wtap_rec.
Guy Harris [Thu, 11 Apr 2019 22:08:23 +0000 (15:08 -0700)]
Give a PacketDialog a Buffer and read directly into it and into its wtap_rec.

We may or may not be working on the currently-selected packet, so
there's no reason to use read into the capture_file's wtap_rec and
Buffer for the currently-selected packet.  We already have a wtap_rec of
our own, and we currently have a pointer to a raw packet data array that
we can replace with a Buffer of our own; just read into them.

Use wtap_rec_init() on the wtap_rec, rather than using its implicit
constructor - there's no guarantee that the initial values of the
structure members, as defined by C (and C++), are what we want.

Use wtap_rec_cleanup() in the destructor; it might do more than the
implied destructor (which does nothing).  wtap_rec and Buffer are C
structures, so they don't get C++ constructors and destructors - we have
to use the C ones, which are explicit functions.  I think there are
memory leaks that this fixes (packet comments and Buffer for the options
data, leaked when a PacketDialog window is closed).

Change-Id: Ica1d937fd00e4d2f5e4e2275bcd8edddb7a7921b
Reviewed-on: https://code.wireshark.org/review/32832
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agowsutil: Read stderr and stdout data asynchronously
Tomasz Moń [Thu, 11 Apr 2019 14:45:21 +0000 (16:45 +0200)]
wsutil: Read stderr and stdout data asynchronously

This significantly reduces the initialization time when system is using
small pipe buffers. No time is lost on periodic process status checks as
WaitForMultipleObjects() returns when the stdout/stderr data was read
and/or when process finishes.

Bug: 14657
Change-Id: I61fabf986577db7102a3136df83d2d92c7156727
Reviewed-on: https://code.wireshark.org/review/32773
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Tomasz Moń <desowin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agomake-usb.py: use octal escape sequences
Peter Wu [Sun, 14 Apr 2019 21:24:58 +0000 (22:24 +0100)]
make-usb.py: use octal escape sequences

Fixes errors like:

    epan/dissectors/usb.c:15220:42: error: hex escape sequence out of range
        { 0x0cad9001, "PowerPad Pocket PC\xc2\xa0Device" },

Change-Id: I8c120892c0d52aceb3f6767401e7944353495825
Fixes: v3.1.0rc0-524-g6f57aa72a8 ("Make a couple of scripts Python 3 only.")
Reviewed-on: https://code.wireshark.org/review/32854
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years ago[Automatic update for 2019-04-14]
Gerald Combs [Sun, 14 Apr 2019 08:30:47 +0000 (08:30 +0000)]
[Automatic update for 2019-04-14]

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

Change-Id: I53afb884af29ea0ea9c4c78e063065d95afa9163
Reviewed-on: https://code.wireshark.org/review/32844
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoQt: Display checkboxes for extcap multicheck
Tomasz Moń [Wed, 10 Apr 2019 17:56:18 +0000 (19:56 +0200)]
Qt: Display checkboxes for extcap multicheck

Multicheck was introduced to make it easy to configure USBPcap to
capture only from selected devices instead of the whole Root Hub.
In GTK+ interface the multicheck enabled options featured a checkbox
next to the item entry. Displaying the checkboxes made it intuitive to
the user that the items can be checked/unchecked.

During the GTK+ to Qt transition, the checkbox idea got lost. The GTK+
interface up to its very last days did show the checkboxes.
While it is possible to select the individual devices in Qt UI and
actually have USBPcap to capture only on selected devices, it is really
unintuitive and the user simply has to know how the multicheck is
implemented to take advantage of it.

This change brings the multicheck checkboxes to Qt UI.

Ping-Bug: 13355
Change-Id: Ia677ff2222c46b9816b8dca4c47e93c72cee834f
Reviewed-on: https://code.wireshark.org/review/32813
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agomodbustcp: fix a shadowed variable warning
Graham Bloice [Sat, 13 Apr 2019 15:39:16 +0000 (16:39 +0100)]
modbustcp: fix a shadowed variable warning

The checkapi code dislikes variables named time so rename it.

Change-Id: I49727203baacb32869b78d047e86b478b8e5c25c
Reviewed-on: https://code.wireshark.org/review/32840
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoDHCPv6: adding some more options
Uli Heilmeier [Thu, 11 Apr 2019 08:53:15 +0000 (10:53 +0200)]
DHCPv6: adding some more options

Updating option list according to
https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml

and adding options:
* RFC8026 OPTION_S46_PRIORITY
* RFC8156 DHCPv6 Failover Protocol
* RFC8357 Generalized UDP Source Port for DHCP Relay

Change-Id: I4924e50689629af1f9b0e4f12c2fda38d0013d98
Reviewed-on: https://code.wireshark.org/review/32827
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoImprove phrasing in wsug-preface
Moshe Kaplan [Fri, 12 Apr 2019 18:23:44 +0000 (14:23 -0400)]
Improve phrasing in wsug-preface

Change-Id: I3460abadb36f77ec9d3eaac694a070b9a8eccdd0
Reviewed-on: https://code.wireshark.org/review/32838
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoMake a couple of scripts Python 3 only.
Gerald Combs [Fri, 12 Apr 2019 19:40:51 +0000 (12:40 -0700)]
Make a couple of scripts Python 3 only.

Remove Python 2 support from tools/make-manuf.py and tools/make-usb.py.

Don't double-escape UTF-8 sequences in make-usb.py so that we generate

    { 0x045e000e, "SideWinder\xc2\xae Freestyle Pro" },

instead of

    { 0x045e000e, "SideWinder\\xc2\\xae Freestyle Pro" },

Change-Id: I918f854ccba868a122fd7b138c1654b2c7615f94
Reviewed-on: https://code.wireshark.org/review/32839
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoextcap_parser: remove G_REGEX_RAW from line parsing.
Dario Lombardo [Fri, 5 Apr 2019 22:29:51 +0000 (00:29 +0200)]
extcap_parser: remove G_REGEX_RAW from line parsing.

Check for utf8 valid line instead. Add a testcase that shows
how the former code was buggy on special characters extcap sentences.

Bug: 15668
Change-Id: Ic045c4791388af98705916e6ea84be8fc9b3c5b8
Reviewed-on: https://code.wireshark.org/review/32754
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoBER: put the space to the left side of the bracket
Pascal Quantin [Fri, 12 Apr 2019 08:40:40 +0000 (10:40 +0200)]
BER: put the space to the left side of the bracket

Change-Id: I43dd6736e915b25687fcebe79219a365bf01db08
Reviewed-on: https://code.wireshark.org/review/32835
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
5 years agoBER: fix regression in dissection of named bit list
Peter Wu [Thu, 11 Apr 2019 01:33:57 +0000 (02:33 +0100)]
BER: fix regression in dissection of named bit list

The bitmask for every header field is 8 bits, do not pass 64-bit values
to proto_tree_add_bitmask_list since the bitmask would always match
against the (possibly wrong) lower 8 bits. Instead process 8 bits at a
time, as before gc2ac157ac0.

Since g37b91eedd6, a dissector exception is thrown when the number of
bytes covering the BIT STRING value is smaller than the number of named
bit fields. (Trailing zero bits in a BIT STRING with named bit fields do
not have to be encoded.) Fix this by assuming zeroes.

Restructure the code to reduce duplication and add some comments. Tested
with the capture from 15684 (attachment 17045), check the keyUsage
extension in the Certificate message (frame 5).

Bug: 15673
Change-Id: Ifa010b9df3e4b46941c00e4f830a03efc589ac21
Fixes: v3.1.0rc0-431-gc2ac157ac0 ("ASN.1: Use proto_tree_add_bitmask... () for named bits.")
Fixes: v3.1.0rc0-458-g37b91eedd6 ("BER: fix dissection of bitmask lists with an invalid length")
Reviewed-on: https://code.wireshark.org/review/32820
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoQUIC: update transport parameters for draft -19
Peter Wu [Fri, 12 Apr 2019 02:15:28 +0000 (03:15 +0100)]
QUIC: update transport parameters for draft -19

Bug: 13881
Change-Id: I6fc96681058f875c627b83c38f5a9b559938d1a4
Reviewed-on: https://code.wireshark.org/review/32833
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoDRBD: Add dissector for the Distributed Replicated Block Device protocol
Joel Colledge [Tue, 5 Mar 2019 15:23:53 +0000 (16:23 +0100)]
DRBD: Add dissector for the Distributed Replicated Block Device protocol

Bug: 15589
Change-Id: Iab2284f79130b0ab024e7ab00c0774d1907077db
Reviewed-on: https://code.wireshark.org/review/32332
Tested-by: Petri Dish Buildbot
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoUse a local buffer for rescanning and finding records.
Guy Harris [Thu, 11 Apr 2019 01:27:21 +0000 (18:27 -0700)]
Use a local buffer for rescanning and finding records.

We use one in all the other loop-over-all-records operations, such as
retapping, saving, printing/writing dissections, etc.; these are the
only ones remaining.

Change-Id: Ib854e3a3dfb5c4b05ae103998046f4bd11c39e7e
Reviewed-on: https://code.wireshark.org/review/32819
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoF1AP: upgrade dissector to v15.5.0
Pascal Quantin [Thu, 11 Apr 2019 13:54:41 +0000 (15:54 +0200)]
F1AP: upgrade dissector to v15.5.0

Change-Id: Id5ebdfc1c7351ab234020dbb51dabbadc65d8fbd
Reviewed-on: https://code.wireshark.org/review/32826
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
5 years agoE1AP: upgrade dissector to v15.3.0
Pascal Quantin [Thu, 11 Apr 2019 13:14:36 +0000 (15:14 +0200)]
E1AP: upgrade dissector to v15.3.0

Change-Id: Ia3bdc2c76e0ad9d6951598d37771a1137b24a8c7
Reviewed-on: https://code.wireshark.org/review/32824
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
5 years agoXnAP: upgrade dissector to v15.3.0
Pascal Quantin [Thu, 11 Apr 2019 12:43:44 +0000 (14:43 +0200)]
XnAP: upgrade dissector to v15.3.0

Change-Id: Iba03132e146e22f37a8af842e3ec1b44ce4d364b
Reviewed-on: https://code.wireshark.org/review/32823
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
5 years agoversion_info.c: Handle Visual Studio 2019
Anders Broman [Thu, 11 Apr 2019 12:46:37 +0000 (14:46 +0200)]
version_info.c: Handle Visual Studio 2019

https://dev.to/yumetodo/list-of-mscver-and-mscfullver-8nd
tested OK.

Change-Id: Ia379dcf1bd412ae542de5b8a64ad61b64f9cebc8
Reviewed-on: https://code.wireshark.org/review/32822
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoRTCP XR RR: fix dissection of timestamp field.
Aymeric Moizard [Wed, 10 Apr 2019 09:21:15 +0000 (11:21 +0200)]
RTCP XR RR: fix dissection of timestamp field.

The current dissector doesn't display correctly the
hf_rtcp_xr_timestamp field. ENC_TIME_NTP seems to be
missing.

Bug: 15687
Change-Id: Ie417e8a11e05e5fb842a4fb0ad5437da1f916130
Reviewed-on: https://code.wireshark.org/review/32809
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoNGAP: upgrade dissector to v15.3.0
Pascal Quantin [Wed, 10 Apr 2019 21:20:27 +0000 (23:20 +0200)]
NGAP: upgrade dissector to v15.3.0

Change-Id: I9b60b99cd3caa310799508221cec0c26c9a8d597
Reviewed-on: https://code.wireshark.org/review/32817
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
5 years agoICAP: Support ICAP over TLS
Uli Heilmeier [Mon, 8 Apr 2019 19:39:45 +0000 (21:39 +0200)]
ICAP: Support ICAP over TLS

IANA hasn't assigned a port for ICAPS. Therefore we default to 0
to have the "Decode as" option available.

Bug: 15684
Change-Id: I69aa89e2b0e719f9abbd4b57a5c35723203623b1
Reviewed-on: https://code.wireshark.org/review/32790
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoradius: add Meraki dictionary
Ethan Everett [Fri, 29 Mar 2019 16:04:09 +0000 (09:04 -0700)]
radius: add Meraki dictionary

Change-Id: Ibba2254bd9711b9cbac2d8f3ef2e209ccdc45bc0
Reviewed-on: https://code.wireshark.org/review/32621
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoX2AP: use the right tree for EndcSONConfigurationTransfer IE
Pascal Quantin [Wed, 10 Apr 2019 20:35:48 +0000 (22:35 +0200)]
X2AP: use the right tree for EndcSONConfigurationTransfer IE

Change-Id: I44739870524af86c9b590fdc995d7b93490f9296
Reviewed-on: https://code.wireshark.org/review/32816
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
5 years agowsutil: Fix pipe handle leaks on Windows
Tomasz Moń [Wed, 10 Apr 2019 16:19:18 +0000 (18:19 +0200)]
wsutil: Fix pipe handle leaks on Windows

If the PATHEXT environment variable contains .py and extcap is enabled,
then Wireshark did leak 2 pipes for every .py file present in the extcap
directory (regardless if there was .bat wrapper for it or not).

Bug: 15689
Change-Id: Iae402c0075ee8155a7205a59711bbae734da7e9e
Reviewed-on: https://code.wireshark.org/review/32812
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoieee80211: fix bitmask on HE Capabilities field
Alexis La Goutte [Wed, 10 Apr 2019 05:31:59 +0000 (07:31 +0200)]
ieee80211: fix bitmask on HE Capabilities field

Issue reported by Helge Magnus Keck

Change-Id: I7878a56acf07119fc7f900eb72b6d497c675567c
Reviewed-on: https://code.wireshark.org/review/32808
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoLCS-AP: Update to V15.2.0 (2019-03)
Anders Broman [Wed, 10 Apr 2019 13:15:19 +0000 (15:15 +0200)]
LCS-AP: Update to  V15.2.0 (2019-03)

Change-Id: I39e9b0871a7d5ce51872bcd44aa3c357ced5d543
Reviewed-on: https://code.wireshark.org/review/32811
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDiameter: Add 3GPP AVP:s and sub dissection.
Anders Broman [Wed, 10 Apr 2019 12:35:38 +0000 (14:35 +0200)]
Diameter: Add 3GPP AVP:s and sub dissection.

Change-Id: I93b7afe9b2a2046204376dfd62cd0b508193c91b
Reviewed-on: https://code.wireshark.org/review/32810
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agortps: fix conflict on value_string
Alexis La Goutte [Sun, 20 Jan 2019 15:22:33 +0000 (15:22 +0000)]
rtps: fix conflict on value_string

Field 'parameterId' (rtps.param.id) has a conflicting entry in its value_string: 15 is at indices 67 (PID_DOMAIN_ID) and 74 (PID_IS_RELIABLE [deprecated])

Change-Id: I34081c099da808d85236d9e255d6fe256fdf9cf7
Reviewed-on: https://code.wireshark.org/review/31632
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee80211: Add length tag check for Mesh Configuration IE
Alexis La Goutte [Tue, 9 Apr 2019 06:30:34 +0000 (08:30 +0200)]
ieee80211: Add length tag check for Mesh Configuration IE

Issue reported by Helge Magnus Keck

Change-Id: Ib761b4209d1efc80ca2c107dda9919e71f5865c2
Reviewed-on: https://code.wireshark.org/review/32798
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee80211: One to one mapping between conversations and associations
Mikael Kanstrup [Fri, 5 Apr 2019 11:49:59 +0000 (13:49 +0200)]
ieee80211: One to one mapping between conversations and associations

In the IEEE 802.11 dissector the conversations concept is (re)used
for tracking associations. The conversations are then used to keep
data that's unique for a certain association, like negotiated AKMS.

Though currently associations are unique per (re)association
whereas conversations are unique based only on src/dest address.
This is problematic for captures with multiple associations with
same STA/BSSI pair.

For example:
Assoc req frame (assoc #1, conversation #1)
Reassoc frame (assoc #2, conversation #1)
Assoc req frame (assoc #3, conversation #1)

To make a one to one mapping between conversations and associations
store an association counter with each frame and use it with the pinfo
srcport/destport fields to build a conversation key:
(src, dest, association_counter).

Bug: 15616
Change-Id: Ie020bdffbcdab4739ee07f73025ef1157c1fc329
Reviewed-on: https://code.wireshark.org/review/32737
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoieee80211: Handle variable MIC length for FT IE
Mikael Kanstrup [Wed, 3 Apr 2019 12:53:02 +0000 (14:53 +0200)]
ieee80211: Handle variable MIC length for FT IE

Also the MIC inside FT IE is variable length in coming IEEE 802.11
spec. According to IEEE 802.11 spec the MIC length is based on AKMS
negotiated during (re)association phase. This is good as long as
the capture file contains needed assoc frames.

Though if association frames are missing the MIC length is unknown.
As a backup try to use the AKMS found in current frame to
determine MIC length. Handle this logic in a new function like this:

MIC length is detemined by:
1. User overridden MIC length setting
2. AKMS negotiated during association phase (conversation)
3. AKMS from current frame
4. Default 16 bytes length.

Also changes had to be done to the ieee80211_packet_data_t handling.
This structure appears to be used as a temporary storage for data
related to current frame. However data was stored in file scope making
it impossible to know whether data was from current or another frame.
This is fixed by changing to the pinfo pool.

Bug: 15616
Change-Id: I521d440b47d71cbc94cd6c56714d21274c8dd23e
Reviewed-on: https://code.wireshark.org/review/32693
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoieee80211: Fix some coverity scan issues
Mikael Kanstrup [Sat, 23 Mar 2019 21:15:27 +0000 (22:15 +0100)]
ieee80211: Fix some coverity scan issues

Fix coverity scan issues:
- Insecure data handling (CID 1444231)
- Unchecked return value (CID 1444234)

Introduced by:
    9cf77ec5e1 ieee80211: Support decrypting WPA3-Personal / SAE captures

Change-Id: I8eb581750d2b0519f03f92873433f79409b0386b
Reviewed-on: https://code.wireshark.org/review/32546
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoQt: use toLocalFile() instead of path() to check for existence.
Dario Lombardo [Sun, 7 Apr 2019 17:11:55 +0000 (19:11 +0200)]
Qt: use toLocalFile() instead of path() to check for existence.

path() incorrectly gives paths as /C:/Program Files/Wireshark/udpdump.html
under windows. The leading slash gives a wrong test on the file. Instead
toLocalFile() handles it correctly. isLocalFile() has been used to get if
we have a local file or a network URL. The reported bug occurred under Windows
only, but the change is compatible with Linux paths as well.

Accidentally when the test on the file was successful, nothing got called.
The routine has been reworked to open an existing local file.

Bug: 15592
Change-Id: Id6e3a91dfb4c9d20ae8cb0735eabab64caeff47f
Reviewed-on: https://code.wireshark.org/review/32772
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoLDP: Support RFC7140 (Extensions for HSMP LSP)
Uli Heilmeier [Tue, 9 Apr 2019 18:47:40 +0000 (20:47 +0200)]
LDP: Support RFC7140 (Extensions for HSMP LSP)

Adds support for RFC7140.

Change-Id: I0d7312a078bcb654574707fc46da0fe0629dbb7d
Reviewed-on: https://code.wireshark.org/review/32803
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>
5 years agofix: no previous prototype
Alexis La Goutte [Tue, 9 Apr 2019 07:32:27 +0000 (07:32 +0000)]
fix: no previous prototype

for function 'ieee802154_create_tap_tlv_tree' [-Wmissing-prototypes]

Change-Id: I74de53e945685a289c302a784afd3d3f5f22891b
Reviewed-on: https://code.wireshark.org/review/32799
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoLDP: Complete support for RFC8077 (PWID FEC)
Uli Heilmeier [Mon, 8 Apr 2019 13:44:28 +0000 (15:44 +0200)]
LDP: Complete support for RFC8077 (PWID FEC)

Adds support for PWid FEC Element and Generalized PWid FEC Element
as defined in RFC8077.

Bug: 15681
Change-Id: I114484e76a3b7161d9b510cde83c2d917f07a333
Reviewed-on: https://code.wireshark.org/review/32782
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoIPDR: add protocol property to decode user-defined sessions as SAMIS-TYPE-1
Andrii Vladyka [Fri, 5 Apr 2019 02:11:43 +0000 (22:11 -0400)]
IPDR: add protocol property to decode user-defined sessions as SAMIS-TYPE-1

Change-Id: Ic267d4ef3dffb50df8632c2f22df189ebca579f2
Reviewed-on: https://code.wireshark.org/review/32728
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoX2AP: upgrade dissector to v15.5.0
Pascal Quantin [Tue, 9 Apr 2019 10:53:20 +0000 (12:53 +0200)]
X2AP: upgrade dissector to v15.5.0

Change-Id: I43f96e8ea5acb3cd94b8b3b4e08e0d10a5e8d951
Reviewed-on: https://code.wireshark.org/review/32800
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
5 years agoieee80211: Add missing bitmask field for Mesh Configuration
Alexis La Goutte [Tue, 9 Apr 2019 06:27:19 +0000 (08:27 +0200)]
ieee80211: Add missing bitmask field for Mesh Configuration

Formation Information: Connect to Mesh Gate / AS
Reserved bit Capability

Issue reported by Helge Magnus Keck

Change-Id: Icf5337ab45bbf7ce1660b560b5fbc22d11785ec0
Reviewed-on: https://code.wireshark.org/review/32797
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee80211: Remove zero-length array usage
Mikael Kanstrup [Mon, 8 Apr 2019 09:10:18 +0000 (11:10 +0200)]
ieee80211: Remove zero-length array usage

Remove the zero-length array usage to fix warnings reported about
using this extended feature.

Fixes: v2.9.0rc0-2520-g61ccf52107 ("ieee80211: Decrypt and dissect EAPOL
keydata")

Change-Id: I62eceb543e3398db2eee22e12609959e27d684f7
Reviewed-on: https://code.wireshark.org/review/32781
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoS1AP: upgrade dissector to v15.5.0
Pascal Quantin [Tue, 9 Apr 2019 05:08:34 +0000 (07:08 +0200)]
S1AP: upgrade dissector to v15.5.0

Change-Id: Ibef1a516dfd0cb5b66abdc8df0663174687ca39a
Reviewed-on: https://code.wireshark.org/review/32796
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
5 years agoWindows: Use an lz4 DLL built with vcpkg.
Gerald Combs [Mon, 8 Apr 2019 17:02:52 +0000 (10:02 -0700)]
Windows: Use an lz4 DLL built with vcpkg.

Update the Windows build environment to use lz4 packages built from a
VS 2017 command prompt with

    set LZ4_VERSION=1.8.3
    vcpkg remove lz4:x86-windows lz4:x64-windows
    vcpkg install lz4:x86-windows lz4:x64-windows
    vcpkg export lz4:x86-windows --output=lz4-%LZ4_VERSION%-win32ws --zip
    vcpkg export lz4:x64-windows --output=lz4-%LZ4_VERSION%-win64ws --zip

The packages also include a PDB, so copy it to the build directory and
add it to the PDB .zip.

Change-Id: Icea512405d2085e5b271fa4a3ba8c0fe318b8cb5
Reviewed-on: https://code.wireshark.org/review/32785
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>
5 years agoieee80211: fix wrong offset for mesh configuration capability bitmask
Alexis La Goutte [Mon, 8 Apr 2019 19:02:06 +0000 (21:02 +0200)]
ieee80211: fix wrong offset for mesh configuration capability bitmask

Issue reported by Helge Magnus Keck
Change-Id: Ide5c4d78f536e55a2eb318506633a4b6273f8014
Reviewed-on: https://code.wireshark.org/review/32789
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoConsistently use NULL when setting current_frame.
Guy Harris [Mon, 8 Apr 2019 16:33:44 +0000 (09:33 -0700)]
Consistently use NULL when setting current_frame.

Change-Id: I17cf2b341f096d4a3de835c01ad50309483a9e39
Reviewed-on: https://code.wireshark.org/review/32784
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoREADME: add more operating systems in the opening sentence.
Dario Lombardo [Sat, 6 Apr 2019 21:57:52 +0000 (23:57 +0200)]
README: add more operating systems in the opening sentence.

Change-Id: I931d96fba1aa4c21f3174c67014deb373533e6ff
Reviewed-on: https://code.wireshark.org/review/32763
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
5 years agoAdd 6LoWPAN Selective Fragment Recovery
James Ko [Tue, 26 Mar 2019 20:48:42 +0000 (13:48 -0700)]
Add 6LoWPAN Selective Fragment Recovery

Reassemble fragments with RFRAG Dispatch type and header.

Change-Id: Ifa30289069fda13fadc090fa5b78c0fcbfbae39e
Reviewed-on: https://code.wireshark.org/review/32594
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee80211: Add RLQP (Advertisement protocol ID)
Alexis La Goutte [Mon, 8 Apr 2019 07:49:50 +0000 (09:49 +0200)]
ieee80211: Add RLQP (Advertisement protocol ID)

Reported by Helge Magnus Keck

Change-Id: Ie36f89531d5afe617b8dd149e0ef7314209a3e52
Reviewed-on: https://code.wireshark.org/review/32780
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee80211: fix typo on BSS Available Admission Capability
Alexis La Goutte [Mon, 8 Apr 2019 07:47:18 +0000 (09:47 +0200)]
ieee80211: fix typo on BSS Available Admission Capability

UP0 (bit6) => UP6 (bit6)

Reported by Helge Magnus Keck

Change-Id: I8b19be77ebf6c37b0d1eb21f92bb507b8804deb7
Reviewed-on: https://code.wireshark.org/review/32779
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoUse a single wtap_rec and Buffer for an entire capture session.
Guy Harris [Sun, 7 Apr 2019 02:42:23 +0000 (19:42 -0700)]
Use a single wtap_rec and Buffer for an entire capture session.

That way we aren't allocating memory, reading packets from a batch, and
freeing the memory for each batch of packets delivered by dumpcap; we do
the allocation when the capture starts and the freeing when it finishes.

Change-Id: If012ab865f3a99d869535ad10827ad8680c1b10c
Reviewed-on: https://code.wireshark.org/review/32766
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoIf you use data_file_url(), you must first call init_progfile_dir().
Guy Harris [Mon, 8 Apr 2019 02:56:22 +0000 (19:56 -0700)]
If you use data_file_url(), you must first call init_progfile_dir().

And if you call init_progfile_dir(), you must call
init_process_policies() before that.

And even if you *don't* use data_file_url(), you might use it in the
future, or you might use other calls to get data file paths, so make
*all* the extcap programs make those calls.

(Yes, this is important on macOS, for example; it may also be important
on Windows.  On other UN*Xes we may just compile in the data file path,
but that's not true on *all* our platforms.)

Change-Id: I99265ed69ec24096884ec067feddd7d7f3855436
Reviewed-on: https://code.wireshark.org/review/32775
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoUse a common wtap_rec and Buffer for all packets.
Guy Harris [Mon, 8 Apr 2019 00:22:23 +0000 (17:22 -0700)]
Use a common wtap_rec and Buffer for all packets.

That way we don't do initialization, possible expansion of the buffer
from its initial size, and cleanup for every packet.

Change-Id: If967bd8f0cc65631b8b128b2c048d32ba54c8033
Reviewed-on: https://code.wireshark.org/review/32774
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoproto.h: avoid warning about not really deprecated (Clang)
Alexis La Goutte [Sun, 7 Apr 2019 09:05:40 +0000 (09:05 +0000)]
proto.h: avoid warning about not really deprecated (Clang)

proto.h:853:5: warning: declaration is marked with '\deprecated' command but does not have a deprecation attribute [-Wdocumentation-deprecated-sync]
proto.h:866:5: warning: declaration is marked with '\deprecated' command but does not have a deprecation attribute [-Wdocumentation-deprecated-sync]

Change-Id: I6da6048b2c4e2860f655ae595f4f800587c63217
Reviewed-on: https://code.wireshark.org/review/32770
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee1722: Associate dissector with UDP port 17220
Ederson de Souza [Fri, 5 Apr 2019 21:04:35 +0000 (14:04 -0700)]
ieee1722: Associate dissector with UDP port 17220

As per IEEE 1722-2016 Annex J, AVTP packets can also be sent via IP
using UDP port 17220. This patch adds current AVTP dissector to that
port, so that dissecting AVTP over UDP works out of the box.

Change-Id: I7c052b28d672b50d14b3a04c64c4cbe8ca4080e1
Reviewed-on: https://code.wireshark.org/review/32747
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years ago[Automatic update for 2019-04-07]
Gerald Combs [Sun, 7 Apr 2019 08:33:11 +0000 (08:33 +0000)]
[Automatic update for 2019-04-07]

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

Change-Id: I89082c842c38ace16a57b0834c80fae19401794e
Reviewed-on: https://code.wireshark.org/review/32767
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoThe wtap from which we're reading to get statistics isn't a statistic itself.
Guy Harris [Sun, 7 Apr 2019 01:35:00 +0000 (18:35 -0700)]
The wtap from which we're reading to get statistics isn't a statistic itself.

Move it to the capture_session structure from the info_data_t structure,
and pass it as an argument to capture_info_new_packets().

Change-Id: I822392bbf48eeb27ba9e17b73775d2fc4349bc17
Reviewed-on: https://code.wireshark.org/review/32765
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoExplicitly make cf->{rec,buf} the information for the selected packet.
Guy Harris [Sat, 6 Apr 2019 22:16:04 +0000 (15:16 -0700)]
Explicitly make cf->{rec,buf} the information for the selected packet.

Move it next to other capture_file fields for the currently-selected
packet, add a comment indicating that's what all those fields are for,
separate them from the following fields that *aren't* for the
currently-selected field, and explicitly use them in cf_select_packet().

Also add a comment about why we're waiting until the end to free up the
old cf->edt in cf_select_packet() and cf_unselect_packet().

Change-Id: I1653af06eeb4ebe1131bc08bcaa2dc639932c7fa
Ping-Bug: 15683
Reviewed-on: https://code.wireshark.org/review/32764
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoNR RRC: upgrade dissector to v15.5.0
Pascal Quantin [Sat, 6 Apr 2019 20:16:41 +0000 (22:16 +0200)]
NR RRC: upgrade dissector to v15.5.0

Change-Id: If396f597a2c3c9d6558d6607faa4d0a054c9966d
Reviewed-on: https://code.wireshark.org/review/32760
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
5 years ago1514 is a better initial Buffer size than 1500.
Guy Harris [Sat, 6 Apr 2019 21:02:49 +0000 (14:02 -0700)]
1514 is a better initial Buffer size than 1500.

Ethernet packets without the CRC are 1514 bytes long, not 1500 bytes
long; using 1514 bytes will avoid a reallocation for a full-sized
Ethernet packet.

Change-Id: Ie8da3f13bf3df07e23e4478b7dcf84f06dec6a9d
Reviewed-on: https://code.wireshark.org/review/32761
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoRevert "Get rid of the per-capture_file wtap_rec and Buffer."
Peter Wu [Sat, 6 Apr 2019 17:42:39 +0000 (18:42 +0100)]
Revert "Get rid of the per-capture_file wtap_rec and Buffer."

This reverts commit 9445403f9558901dc54c88754ff21795ea1803f3.

cf_select_packet frees the buffer backing the dissection result
(cf->edt) which results in use-after-frees when callers try to access
the contents. See for example this call trace:

* PacketList::selectionChanged
  * cf_select_packet(cap_file_, row)
  * frameSelected(row) -> ByteViewTab::selectedFrameChanged
    * addTab(source_name, get_data_source_tvb(source))

get_data_source_tvb returns the buffer that backs the dissection and
must remain valid even after dissection has completed. If this is not
done, then a possibly expensive redissection must be done in order to
populate the byte view. The temporary memory savings are not worth it.

Bug: 15683
Change-Id: Ia5ec2c7736cdebbac3c5bf46a4e2470c9236262d
Reviewed-on: https://code.wireshark.org/review/32758
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoLTE RRC: upgrade dissector to v15.5.0
Pascal Quantin [Sat, 6 Apr 2019 17:41:18 +0000 (19:41 +0200)]
LTE RRC: upgrade dissector to v15.5.0

Change-Id: I227db32a59a16c31d7712cb9c48b55fa4aaf28ca
Reviewed-on: https://code.wireshark.org/review/32759
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
5 years agoDCOM - Add dissector for ITypeInfo
alexsirr [Tue, 26 Mar 2019 22:04:11 +0000 (15:04 -0700)]
DCOM - Add dissector for ITypeInfo

Bug: 15646
Change-Id: I6476c3fd8bf928e865fc2ced5b70b49e9a2bacd7
Reviewed-on: https://code.wireshark.org/review/32591
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoDissect USB "device" Setup CONTROL messages
Artem Mygaiev [Sat, 30 Mar 2019 09:10:10 +0000 (11:10 +0200)]
Dissect USB "device" Setup CONTROL messages

Before this change Wireshark would assume there is no USB devices that
use "device" recepient (RQT_SETUP_RECIPIENT_DEVICE) in Setup stage of
USB CONTROL messages. But there are plenty of such, examples are:
FrescoLogic's FL2000 USB Display controller, Razer USB peripherals;
there are open projects that investigate protocols for them in order to
implement OSS drivers and SW stacks.

Allow dissection of USB "device" Setup CONTROL messages by treating them
in the same way as "other" or "reserved" with assumption that at least
IntefaceClass is set to UNKNWON (0xffff) which is true for at least
beforementioned FL2000 and Razer HW implementations.

Change-Id: I44f4f8cdccd973194aeda2c39c59529d531c31b2
Reviewed-on: https://code.wireshark.org/review/32626
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoMake call_dissector assertions non-fatal.
Gerald Combs [Fri, 5 Apr 2019 17:01:56 +0000 (10:01 -0700)]
Make call_dissector assertions non-fatal.

Replace g_assert in our call_dissector* routines with DISSECTOR_ASSERT.

Change-Id: I76104ba09e272ff34e3eaa958c7f711e27e4a3b5
Reviewed-on: https://code.wireshark.org/review/32741
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>
5 years agoGen-bugnote: Replace multiple instances where needed.
Gerald Combs [Fri, 5 Apr 2019 16:25:27 +0000 (09:25 -0700)]
Gen-bugnote: Replace multiple instances where needed.

Change-Id: Ic0d8ec3604ce6a31b68ef265cd5337b0565b8a24
Reviewed-on: https://code.wireshark.org/review/32740
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years ago.mailmap: update of March
Alexis La Goutte [Sat, 16 Mar 2019 18:25:28 +0000 (18:25 +0000)]
.mailmap: update of March

Change-Id: I6e010fe0529085aed2fb6f7c07e9598d27416e7d
Reviewed-on: https://code.wireshark.org/review/32436
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee80211: Add Reserved entry for VHT OP Channel Width
Alexis La Goutte [Fri, 5 Apr 2019 11:23:41 +0000 (13:23 +0200)]
ieee80211: Add Reserved entry for VHT OP Channel Width

Reported by Helge Magnus Keck

Change-Id: If0aae0879d52a2516642d162395795c05c28b9b9
Reviewed-on: https://code.wireshark.org/review/32736
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee80211: Add space on description for some Extended Capabilities field
Alexis La Goutte [Fri, 5 Apr 2019 11:22:03 +0000 (13:22 +0200)]
ieee80211: Add space on description for some Extended Capabilities field

Reported by Helge Magnus Keck

Change-Id: Ia96521920b3108f2d5867c9392fd93210ac99d37
Reviewed-on: https://code.wireshark.org/review/32735
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agofile_dialog.c: initialize wtap_rec and Buffer in get_stats_for_preview()
Pascal Quantin [Fri, 5 Apr 2019 08:06:07 +0000 (10:06 +0200)]
file_dialog.c: initialize wtap_rec and Buffer in get_stats_for_preview()

Change-Id: If491e56cd207feef661d88c8a3c86e86e7f90b77
Reviewed-on: https://code.wireshark.org/review/32733
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
5 years agoClean up white space.
Guy Harris [Fri, 5 Apr 2019 08:19:49 +0000 (01:19 -0700)]
Clean up white space.

Change-Id: I01436a16a81dc8aca28c21e6a0121fbddf3216b7
Reviewed-on: https://code.wireshark.org/review/32734
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoGet rid of the per-capture_file wtap_rec and Buffer.
Guy Harris [Fri, 5 Apr 2019 07:23:35 +0000 (00:23 -0700)]
Get rid of the per-capture_file wtap_rec and Buffer.

Most code that reads from a capture_file already has its own wtap_rec
and Buffer; change the remaining ones to do so as well.

Change-Id: I9b7c136642bbb375848c37ebe23c9cdeffe830c3
Reviewed-on: https://code.wireshark.org/review/32732
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>