metze/wireshark/wip.git
5 years ago[Automatic update for 2018-10-21]
Gerald Combs [Sun, 21 Oct 2018 08:23:58 +0000 (08:23 +0000)]
[Automatic update for 2018-10-21]

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

Change-Id: Idd6532c6a268e1a0ab9e171f55549155c26a43dc
Reviewed-on: https://code.wireshark.org/review/30294
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoAdd tvb_ascii_isprint API
Michael Mann [Sat, 20 Oct 2018 21:46:34 +0000 (17:46 -0400)]
Add tvb_ascii_isprint API

This allows dissectors to check if a portion of the tvb is an ascii string while hiding the use of tvb_get_ptr.

Change-Id: Iaec7559dcfdefb8a5ae23e099ced45e90e611f8f
Reviewed-on: https://code.wireshark.org/review/30291
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agolemon: sync with upstream (2018-09-08)
Peter Wu [Sat, 20 Oct 2018 17:29:43 +0000 (19:29 +0200)]
lemon: sync with upstream (2018-09-08)

Changes:
- Drop the old basename modification that was present in the Wireshark
  version of lemon.c. Use a new option available since 2018-04-20
  ("Add the -dDIRECTORY command-line option to LEMON.")
- Redo the static analyzer warning fixes, identifying the root causes
  and adding assertions instead of hiding code with __clang_analyzer__.
- Ignore compiler warnings instead of adding config.h, _U_, extra const
  keywords, unsigned/signed changes, etc.
- Remove lemon.html, it is out-of-date and external links are available.

In order to make future updates easier, document the exact steps that
were followed to create the lemon.c and lempar.c files. Future changes
SHOULD follow the same process.

My process to reach this updated lemon version:
1. Identify previous sync. Found v2.5.2rc0-147-g653af0f6d0 ("lemon: Sync
   with latest trunk.") which seems based on sqlite commit 2b3d584ffe.
2. Check successive Wireshark patches. Identified many non-functional
   changes to silence compiler warnings and static analyzer issues.
   Found one feature (basename) that can be replaced with upstream -d.
3. Write minimal patches and document changes.

Upstream typos and coding style issues (other than trailing whitespace)
were deliberately not fixed to remain as close as possible to upstream.

Change-Id: I606f46dede86e34520f962a9e7163912392aad57
Reviewed-on: https://code.wireshark.org/review/30290
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agolemon: fix memleak in ReportTable
Peter Wu [Sat, 20 Oct 2018 19:38:39 +0000 (21:38 +0200)]
lemon: fix memleak in ReportTable

Building without -DENABLE_ASAN=1 but with -fsanitize=address (as is done
by oss-fuzz) still triggers a memleak report. Closer inspection revealed
that two other members were leaked.

Change-Id: I3d022ac50c554891a73b9380b7879c1a60c3c798
Reviewed-on: https://code.wireshark.org/review/30289
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agocheckAPIs: check ett variable registrations.
Jeff Morriss [Sun, 21 Oct 2018 02:17:50 +0000 (22:17 -0400)]
checkAPIs: check ett variable registrations.

Using unregistered etts leads to an abort so check for them in checkAPIs.
This does slow down checkAPIs by about 15% but it seems a reasonable cost
for the benefit.

Note that finding ett registration blocks was fairly inaccurate so we
just check for whether ett variable addresses are used - on the assumption
that if someone's using the address they're probably using it to register
the ett.

Change-Id: Ifbac75c4a8a0fdb27d9c9d1584a2de791bfbc118
Reviewed-on: https://code.wireshark.org/review/30293
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agopw: make ett names longer.
Jeff Morriss [Sun, 21 Oct 2018 01:58:43 +0000 (21:58 -0400)]
pw: make ett names longer.

This makes it easier to find (and check) them programatically.

Change-Id: I8eb99116fa582eddc534659589b361edd91c085a
Reviewed-on: https://code.wireshark.org/review/30292
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoSeparate signed and unsigned decimal UAT fields.
Guy Harris [Sat, 20 Oct 2018 20:36:56 +0000 (13:36 -0700)]
Separate signed and unsigned decimal UAT fields.

Most of them are unsigned; do the appropriate fetching, checking, and
writing-to-UAT-file for them.  Have separate macros and routines for the
one signed one, which is the drbid in the LTE MAC dissector.

Use the Wireshark string-to-number routines; they do the appropriate
bounds checking, and make sure unsigned numbers don't start with a -.

Change-Id: I4f137aa31d631c5b5622b2c320574b8ab3333f31
Reviewed-on: https://code.wireshark.org/review/30288
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoUpdated OPC UA 1.0.4 enumeration
cacamille3 [Fri, 19 Oct 2018 16:52:22 +0000 (18:52 +0200)]
Updated OPC UA 1.0.4 enumeration

Change-Id: I55bd26abde59442280833973f6a6b52ba1d7b337
Reviewed-on: https://code.wireshark.org/review/30262
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
5 years agoFix up some comments.
Guy Harris [Sat, 20 Oct 2018 19:03:31 +0000 (12:03 -0700)]
Fix up some comments.

Change-Id: I0dba163baa5d4fdaa321a92bc95808300d5c8456
Reviewed-on: https://code.wireshark.org/review/30286
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoInclude transport protocols' hfids in the list of wanted hfids.
Guy Harris [Sat, 20 Oct 2018 08:56:59 +0000 (01:56 -0700)]
Include transport protocols' hfids in the list of wanted hfids.

We need to get the fields corresponding to those protocols, so we know
the range within the packet that those protocols cover.

Improve a debugging message while we're at it.

Bug: 15208
Change-Id: Idc329079584e8d035622b148503a2ec1a295ccaa
Reviewed-on: https://code.wireshark.org/review/30280
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agofuzzshark: integrate oss-fuzz targets in CMake
Peter Wu [Tue, 16 Oct 2018 22:47:20 +0000 (00:47 +0200)]
fuzzshark: integrate oss-fuzz targets in CMake

The current fuzzshark target built by CMake is not usable for fuzzing.
Address this by adding a new ENABLE_FUZZER option that enables mandatory
instrumentation and libFuzzer linking options for the fuzzshark binary.

Create more CMake targets for specific fuzzing targets such as
fuzzshark_ip and fuzzshark_ip_proto-udp. These targets are not built by
default, either build individual targets or use the all-fuzzers target.

Now these binaries are not specific to oss-fuzz, so move them to a new
directory (perhaps the corpora can be added here in the future).
oss-fuzz build.sh is simplified and reuses the CMake targets.

When OSS_FUZZ is set, it will force static linking with external
libraries and limit parallel linker jobs (maybe not necessary for
Google's oss-fuzz builders, but my 8G/6c VM ran out of memory).

Change-Id: If3ba8f60ea1f5c3bd2131223050a81f9acbce05d
Reviewed-on: https://code.wireshark.org/review/30228
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee80211: automatically determine MIC length for OWE
Joeri de Ruiter [Thu, 18 Oct 2018 14:26:23 +0000 (16:26 +0200)]
ieee80211: automatically determine MIC length for OWE

MIC length is determined automatically for OWE and multiple MIC lengths per session are supported.

Bug: 15215
Change-Id: Ie655fbd3fdc8555df430d4dc8a0081e169150c28
Reviewed-on: https://code.wireshark.org/review/30246
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agocheckAPIs: use new regex to remove comments.
Jeff Morriss [Fri, 19 Oct 2018 19:22:01 +0000 (15:22 -0400)]
checkAPIs: use new regex to remove comments.

The new pattern is from the Perl FAQ; it works better for me than the
old code.  Of note is that it works with C++/C99-style comments
following a statement (as opposed to at the start of a line).

The new regex is only slightly slower than the old one: `make checkAPI`
goes from 3m30s of user time to 3m35s.

The big functional difference can be seen by looking at the
post-removal contents of packet-hl7.c.

Before:

    struct msh {                    // typical/default values
        char field_separator;       //
        char component_separator;   //
        char repetition_separator;  //
        char escape_character;      // &\0\0MSH\0\0';
                    if (tree) {

(With the old regex we lost a lot of code!)

After:

    struct msh {
        char field_separator;
        char component_separator;
        char repetition_separator;
        char escape_character;
        char subcomponent_separator;
        char message_type[4];
        char trigger_event[4];
    };

Change-Id: Iac35413d480cc7b05b820cb3b292f87ed30e6801
Reviewed-on: https://code.wireshark.org/review/30265
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoFix capitalization of preference display name.
Guy Harris [Sat, 20 Oct 2018 06:39:52 +0000 (23:39 -0700)]
Fix capitalization of preference display name.

They're supposed to use sentence case.

Change-Id: I28c5120fdfae14c628a2ffbfe6fc4b571f71767a
Reviewed-on: https://code.wireshark.org/review/30277
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoRegenerate ASN.1 dissectors.
Guy Harris [Sat, 20 Oct 2018 06:37:56 +0000 (23:37 -0700)]
Regenerate ASN.1 dissectors.

Change-Id: I9a51a4a3fbaa8fb2cadaa673730ba3395c3c5ad9
Reviewed-on: https://code.wireshark.org/review/30276
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoDo error checking for the console log level.
Guy Harris [Sat, 20 Oct 2018 06:02:29 +0000 (23:02 -0700)]
Do error checking for the console log level.

Use ws_strtou32(), and do the same error checking for it that's done for
other numerical preferences.

Change-Id: Id8158129e626fa39bf221c27a8b0fc1ebf992f31
Reviewed-on: https://code.wireshark.org/review/30274
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoMake uat_fld_chk_num_hex() more like other uat_fld_chk_num routines.
Guy Harris [Sat, 20 Oct 2018 05:57:35 +0000 (22:57 -0700)]
Make uat_fld_chk_num_hex() more like other uat_fld_chk_num routines.

Allow a space after the number.

Return "Invalid value" for strings that aren't valid numbers and "Value
too large" for values that don't fit in a 32-bit integer.

Change-Id: Iff616330968bf434fc7daf822a09ffc4f768105b
Reviewed-on: https://code.wireshark.org/review/30272
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoUse ws_basetostru32(), rather than strtoul(), when parsing uint preferences.
Guy Harris [Fri, 19 Oct 2018 21:10:59 +0000 (14:10 -0700)]
Use ws_basetostru32(), rather than strtoul(), when parsing uint preferences.

Also use ws_hextostru32() when parsing color preferences.

This detects additional errors such as negative values.

Addresses part of
https://ask.wireshark.org/question/5538/preference-range/.

Change-Id: I526a96fcd3c4ad1ee96b3bd682d7c7fa0bfe3434
Reviewed-on: https://code.wireshark.org/review/30269
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agotshark: replace exit with abort in TRY/CATCH.
Dario Lombardo [Fri, 19 Oct 2018 15:07:14 +0000 (17:07 +0200)]
tshark: replace exit with abort in TRY/CATCH.

Change-Id: I3fe6c63fcf179fd10b0b722b2749c68365eb0870
Reviewed-on: https://code.wireshark.org/review/30258
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoosi-options: name ett variables 'ett_' (instead of 'ott_').
Jeff Morriss [Fri, 19 Oct 2018 18:40:59 +0000 (14:40 -0400)]
osi-options: name ett variables 'ett_' (instead of 'ott_').

This allows for better automated code checking.

Change-Id: Ice5e276c24417e033acceb4ea2d233561f699054
Reviewed-on: https://code.wireshark.org/review/30264
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoUse ws_basetostru32(), rather than strtoul(), when parsing ranges.
Guy Harris [Fri, 19 Oct 2018 20:28:05 +0000 (13:28 -0700)]
Use ws_basetostru32(), rather than strtoul(), when parsing ranges.

Make ws_basetostru32(), and the other ws_baseto... routines, public, and
use ws_basetostru32() when parsing ranges, to detect additional errors
such as negative values.

Addresses part of
https://ask.wireshark.org/question/5538/preference-range/.

Change-Id: I00fac97a198a237b01b5cd9406ea32c220f80972
Reviewed-on: https://code.wireshark.org/review/30266
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agopfcp: register a couple ett variables.
Jeff Morriss [Fri, 19 Oct 2018 14:09:38 +0000 (10:09 -0400)]
pfcp: register a couple ett variables.

Change-Id: I770f31a8db7f236e3823ab843913caadd55e41e6
Reviewed-on: https://code.wireshark.org/review/30259
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agozbee-zcl: register several ett variables.
Jeff Morriss [Fri, 19 Oct 2018 15:38:33 +0000 (11:38 -0400)]
zbee-zcl: register several ett variables.

Change-Id: I2524ec075304efe98b10fe338311540c0119655d
Reviewed-on: https://code.wireshark.org/review/30261
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoIEEE 1609.2 dissector converted from per to oer by hand
AndersBroman [Thu, 18 Oct 2018 14:55:41 +0000 (16:55 +0200)]
IEEE 1609.2 dissector converted from per to oer by hand

- Change per -> oer
- constraned integer 64 bits with upper bound NO_BOUND hand converted
- hf variables commented out.
- constrained integer fn changed to handle >= 0 ( Negative values)
- Pragma to handle unused functions.

Bug: 13766
Change-Id: Ia00d3aa0e4c27c0303366f14b97a1ebf9e39af3d
Reviewed-on: https://code.wireshark.org/review/30248
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAdding vendor id 0x010F (eProsima Fast-RTPS) to RTPS dissector
Miguel Company [Thu, 18 Oct 2018 13:40:12 +0000 (15:40 +0200)]
Adding vendor id 0x010F (eProsima Fast-RTPS) to RTPS dissector

Change-Id: Id8ffdde5daddeb82e465bf729faf4e18f97552f6
Reviewed-on: https://code.wireshark.org/review/30244
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoproto.c: Add hint to an assert.
AndersBroman [Fri, 19 Oct 2018 07:54:57 +0000 (09:54 +0200)]
proto.c: Add hint to an assert.

Change-Id: I0204cb38f66363a5d8634d69abe7a2d7d7ebe631
Reviewed-on: https://code.wireshark.org/review/30257
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDocumentation fix.
Michal Slavka [Thu, 18 Oct 2018 13:27:08 +0000 (15:27 +0200)]
Documentation fix.

Change-Id: I139f54f6eb62a82d3b31738966cade02d5a7c7b1
Reviewed-on: https://code.wireshark.org/review/30243
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agopfcp: corrected User ID IE
Joakim Karlsson [Thu, 18 Oct 2018 17:36:45 +0000 (19:36 +0200)]
pfcp: corrected User ID IE

bad implementation, will now use existing decoder instead

Change-Id: I756154f2b0866b08ae31f31ac3876c443b572f8a
Reviewed-on: https://code.wireshark.org/review/30249
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDOCSIS: indication of encrypted data
Bruno Verstuyft [Thu, 18 Oct 2018 12:48:48 +0000 (14:48 +0200)]
DOCSIS: indication of encrypted data

Change-Id: I81d4387a5c68eff4f5bdb95950a5871a940d0623
Reviewed-on: https://code.wireshark.org/review/30241
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee1609dot2: fix asn build on case-sensitive filesystems
Peter Wu [Thu, 18 Oct 2018 21:05:03 +0000 (23:05 +0200)]
ieee1609dot2: fix asn build on case-sensitive filesystems

Change-Id: Ic7e584468ded5aa4be80de6afa2e40d95ebf1410
Fixes: v2.9.0rc0-2241-gf8022a5502 ("IEEE 1609: Make sure our build target name is lower case.")
Reviewed-on: https://code.wireshark.org/review/30256
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoWSMP: Initialize a variable.
Gerald Combs [Thu, 18 Oct 2018 20:53:19 +0000 (13:53 -0700)]
WSMP: Initialize a variable.

Fix

../epan/dissectors/packet-wsmp.c:359:9: error: variable 'psid' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
        default:
        ^~~~~~~
../epan/dissectors/packet-wsmp.c:369:9: note: uninitialized use occurs here
    if((psid == 0x20) && (IEEE1609dot2_handle)){
        ^~~~

Change-Id: Ieb82a4c0ac8030a5bf8ddff962acb2f7c1711783
Reviewed-on: https://code.wireshark.org/review/30255
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoFindM.cmake: directly pass -lm to fix selective static linking
Peter Wu [Thu, 18 Oct 2018 17:50:04 +0000 (19:50 +0200)]
FindM.cmake: directly pass -lm to fix selective static linking

When CMAKE_FIND_LIBRARY_SUFFIXES is set to ".a" (in order to find only
static libraries), executables would be linked with libm.a. This fails
when the C runtime is not statically linked as well:
https://bugzilla.redhat.com/show_bug.cgi?id=1433347

Change-Id: I1480607bd3d0678661694657a2709ee1c56f9530
Reviewed-on: https://code.wireshark.org/review/30253
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoFindGLIB2.cmake: workaround to make static linking work
Peter Wu [Thu, 18 Oct 2018 17:38:51 +0000 (19:38 +0200)]
FindGLIB2.cmake: workaround to make static linking work

When using pkg_search_module(GLIB2 glib-2.0), it will also include
transitive dependencies (pcre) in GLIB2_STATIC_LIBRARIES, but it will
still lack -pthread (which is in GLIB2_STATIC_LDFLAGS). For simplicity
just hardcode these.

Change-Id: Ia227f8b56e088c71210a748aeb2dedaba521c090
Reviewed-on: https://code.wireshark.org/review/30252
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agocmake: rewrite FindGMODULE2.cmake and FindGTHREAD2.cmake
Peter Wu [Thu, 18 Oct 2018 16:54:24 +0000 (18:54 +0200)]
cmake: rewrite FindGMODULE2.cmake and FindGTHREAD2.cmake

These modules currently set the library variables from PkgConfig
directly, but these are not absolute paths. These modules are therefore
not usable for static linking. Rewrite these files to follow a more
familiar pattern: collect hints, find absolute header/library paths and
let FPHSA handle the REQUIRED check.

The old modules had some special cases for Apple, but I believe that
these cases are no longer relevant.

Change-Id: Idaef7e35b40a3ab4449d92ccb12a9febde962cf6
Reviewed-on: https://code.wireshark.org/review/30251
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoCMake: limit the -pie linker option to executables
Peter Wu [Wed, 17 Oct 2018 20:47:34 +0000 (22:47 +0200)]
CMake: limit the -pie linker option to executables

WS_LINK_FLAGS also apply to libraries, but -pie has no effect on them.

Change-Id: I9c7fde228c5faf20edf0ad45692577070b24a280
Reviewed-on: https://code.wireshark.org/review/30239
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoIEEE 1609: Make sure our build target name is lower case.
Gerald Combs [Thu, 18 Oct 2018 17:57:14 +0000 (10:57 -0700)]
IEEE 1609: Make sure our build target name is lower case.

Change-Id: Iefed1635a5f5621b7f57522da5e73263ec3842ed
Reviewed-on: https://code.wireshark.org/review/30250
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoTDS: Update release notes to indicate that Sybase is now supported.
Craig Jackson [Thu, 18 Oct 2018 18:33:21 +0000 (14:33 -0400)]
TDS: Update release notes to indicate that Sybase is now supported.

Change-Id: I541226f9ba8981d1014698703b61bd32a7a5c9b1
Reviewed-on: https://code.wireshark.org/review/30254
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoIEEE 1609(WSMP): Use the IEEE 1609,2 dissector if present.
AndersBroman [Thu, 18 Oct 2018 14:36:56 +0000 (16:36 +0200)]
IEEE 1609(WSMP): Use the IEEE 1609,2 dissector if present.

Bug: 13766
Change-Id: I4473a8e0a3d927c4bab42fc6f94af0bb5de5b6ef
Reviewed-on: https://code.wireshark.org/review/30247
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAdd IEEE 1609.2 ASN.1 files needed to generate OER IEEE 1609.2 dissector
AndersBroman [Thu, 18 Oct 2018 14:11:07 +0000 (16:11 +0200)]
Add IEEE 1609.2 ASN.1 files needed to generate OER IEEE 1609.2 dissector

The generated dissector is intentionally left out for now.
Bug: 13766
Change-Id: Ib082e71e3146bffd87d06ef196dc9be8aeb0e5c6
Reviewed-on: https://code.wireshark.org/review/30245
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAdd dissector for ITU-t X.696 Octet Encoding Rules (OER).
AndersBroman [Thu, 18 Oct 2018 13:14:06 +0000 (15:14 +0200)]
Add dissector for ITU-t X.696 Octet Encoding Rules (OER).

Bug: 13766
Change-Id: Id1770d8b0bab73ef26af679cba4d88c65cbc21cc
Reviewed-on: https://code.wireshark.org/review/30242
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years ago6lowpan: Show IPv6 summary line in tree
Stig Bjørlykke [Wed, 17 Oct 2018 07:48:40 +0000 (09:48 +0200)]
6lowpan: Show IPv6 summary line in tree

Add a preference to show IPv6 summary line in the protocol tree.
Mark source and destination as generated when length is 0.

Change-Id: I1c1befed100e92de38006f1e4ce65bf19c14a32b
Reviewed-on: https://code.wireshark.org/review/30230
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
5 years agolua: add support for ethernet addresses to the Address class
Martin Kaiser [Wed, 10 Oct 2018 15:26:59 +0000 (17:26 +0200)]
lua: add support for ethernet addresses to the Address class

The code for the Address class already contains commented-out code for a
number of additional address types.

Activate the draft constructor for ethernet addresses and complete it.
Use the newly-added function to parse a string that contains an ethernet
address.

Add a basic test tvb.lua. Read an ethernet address from a tvb and
compare it to a constant Address.ether object.

Change-Id: I9771dd6e7ade4b572a8b864b8986d641b4eba3e5
Reviewed-on: https://code.wireshark.org/review/30163
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agotools/validate-commit.py: post-commit hook to check for commit issues
Peter Wu [Tue, 16 Oct 2018 15:29:47 +0000 (17:29 +0200)]
tools/validate-commit.py: post-commit hook to check for commit issues

During review we might overlook issues with the commit messages. Some
commits somehow ended up IP addresses or local VM hostnames as author
address. Automate detecting such issues as well as other whitespace
issues with the commit message itself (detected by commit-msg).

Note: when installing as post-commit hook, it will also be executed when
doing things like 'git reset --hard'.

Change-Id: Ic638e7f51d89277ac359c04764effb69eb4f2fa1
Reviewed-on: https://code.wireshark.org/review/30225
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee80211: Extend FILS support (802.11ai)
Joeri de Ruiter [Wed, 17 Oct 2018 13:06:30 +0000 (15:06 +0200)]
ieee80211: Extend FILS support (802.11ai)

- Include some new tags from 802.11ai
- Support authentication messages using FILS authentication
- Determine MIC length automatically

Bug: 15210
Change-Id: I21a6c8df0a4f0429f8d900f32f0e95ace126d4e6
Reviewed-on: https://code.wireshark.org/review/30232
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 batch decoding in CQL packet dissector
Michael Penick [Wed, 17 Oct 2018 18:47:26 +0000 (14:47 -0400)]
Fix batch decoding in CQL packet dissector

Batch sub-query values were being incorrectly decoded for non-prepared
(kind = 0) queries.

Change-Id: I89ee1ab9c298c2d09a09ee3ed7a8b837e7c3c5b2
Reviewed-on: https://code.wireshark.org/review/30236
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoadded new OPC UA 1.04 AttributesId
cacamille3 [Wed, 17 Oct 2018 18:04:35 +0000 (20:04 +0200)]
added new OPC UA 1.04 AttributesId

Change-Id: I35963ca61792d41cf72895277e61c9fce3870200
Reviewed-on: https://code.wireshark.org/review/30234
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agowslua: Add support for base.RANGE_STRING handling.
Richard Sharpe [Sun, 14 Oct 2018 19:14:13 +0000 (12:14 -0700)]
wslua: Add support for base.RANGE_STRING handling.

A range string is passed as a table of tables, eg:

  range_string = {
     { 0, 24, "Some string for values 0 to 24" },
     { 25, 25, "The string for value 25" },
     { 26, 255, "The string for the remainder" }
  }

Included is a minimal Lua test for range strings and value strings
(which did not have one previously.) It will take more time than I
currently have to figure out how to do a more exhaustive test.

Also fixed some grammar issues in error messages along the way.

Change-Id: Ia9d1efc8adabb6528c4bdcf1624c9ede49e2fdc6
Reviewed-on: https://code.wireshark.org/review/30211
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
5 years agoextcap: Close stdout_fd and stderr_fd when done
Stig Bjørlykke [Mon, 15 Oct 2018 18:41:39 +0000 (20:41 +0200)]
extcap: Close stdout_fd and stderr_fd when done

The documentation for g_spawn_async_with_pipes() states that stdout_fd
and stderr_fd must be closed when they are no longer in use.

Ping-Bug: 15205
Change-Id: I943eaa68058b0828686469672ea3611e67390b2f
Reviewed-on: https://code.wireshark.org/review/30221
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
5 years agovalidate-diameter-xml.sh: do not hard-code temporary directory
Peter Wu [Wed, 17 Oct 2018 10:22:17 +0000 (12:22 +0200)]
validate-diameter-xml.sh: do not hard-code temporary directory

In the event that validation fails, the hard-coded temporary directory
would remain present. Use of a fixed hard-coded directory also prevents
concurrent runs.

Change-Id: I29f09dc004b1ab3578b4a9c51ea7e1a5b526159f
Reviewed-on: https://code.wireshark.org/review/30231
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
5 years agoRevert "cmake: fix version check for c-ares and gnuTLS"
Joakim Karlsson [Tue, 16 Oct 2018 08:00:33 +0000 (10:00 +0200)]
Revert "cmake: fix version check for c-ares and gnuTLS"

This reverts commit 189a7357e799c0faa5e36d4966f485b9b6d394e3.

Change-Id: I6550703036a135866d7751da489c4974be79bb37
Reviewed-on: https://code.wireshark.org/review/30226
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoKNX-IP: new KNXnet/IP dissector
Ralf Nasilowski [Thu, 16 Aug 2018 08:49:31 +0000 (10:49 +0200)]
KNX-IP: new KNXnet/IP dissector

The new KNXnet/IP dissector replaces the old KNXnet/IP dissector.

The new KNXnet/IP dissector supports the new KNX features
- A_MemoryExtended services
- A_PropertyExt services
- KNX Data Security
- KNXnet/IP Core V2
- KNXnet/IP Device Management V2
- KNXnet/IP Tunneling V2
- KNXnet/IP Routing V2
- KNXnet/IP Security

Change-Id: I3d1d716ef03d16d2720e6a1fcb23c2243d1cd956
Reviewed-on: https://code.wireshark.org/review/29155
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
5 years agolicensecheck: fix detection of multiple licenses
Peter Wu [Mon, 15 Oct 2018 20:08:48 +0000 (22:08 +0200)]
licensecheck: fix detection of multiple licenses

licensecheck.pl: by the time the second license is evaluated, the $2
variable was already invalidated. Fix that and make it possible for
checklicenses.py to check for multiple license choices.

Change-Id: I8e9e788c33ccd64e85839c82924e28a504f6ae8f
Reviewed-on: https://code.wireshark.org/review/30223
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agozebra: fix spelling-error-in-binary found by lintian
Alexis La Goutte [Mon, 15 Oct 2018 18:55:20 +0000 (18:55 +0000)]
zebra: fix spelling-error-in-binary found by lintian

Lenght => Length
paramters => parameters

Change-Id: I42eef8991e17f23e16c395dfe2f400c1ac91fec4
Reviewed-on: https://code.wireshark.org/review/30222
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agocmake: fix version check for c-ares and gnuTLS
Joakim Karlsson [Sun, 14 Oct 2018 18:37:16 +0000 (20:37 +0200)]
cmake: fix version check for c-ares and gnuTLS

Version requirement was already in place but not executed

Change-Id: I9a163fae2b428cecd309f932f5ef87dd8db8c516
Reviewed-on: https://code.wireshark.org/review/30210
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoMAC NR: align Multiple Entry PHR MAC CE decoding with v15.3.0
Pascal Quantin [Mon, 15 Oct 2018 08:19:55 +0000 (10:19 +0200)]
MAC NR: align Multiple Entry PHR MAC CE decoding with v15.3.0

Change-Id: I4ca2284c3b0418116e810a7c66d693a3647e4191
Reviewed-on: https://code.wireshark.org/review/30217
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
5 years agoSupporting Zebra API version 4 and 5 used in FRRouting. (minimize changes)
Hitoshi Irino [Sat, 13 Oct 2018 07:37:46 +0000 (16:37 +0900)]
Supporting Zebra API version 4 and 5 used in FRRouting. (minimize changes)

Fixed wrong types to avoid unwanted type conversion.

Change-Id: Iaaa2438cd4727bc0f20e003572f41d9cfe8bc927
Reviewed-on: https://code.wireshark.org/review/30200
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoaddr_resolv: function to convert an eth address into raw bytes
Martin Kaiser [Wed, 10 Oct 2018 15:25:52 +0000 (17:25 +0200)]
addr_resolv: function to convert an eth address into raw bytes

Add a function to convert a string that contains an ethernet address
(including the colons) into a sequence of 6 bytes.

Use the existing internal functions to parse an ethernet address.

Declare the new function as local to libwireshark. It'll be used by
wslua to support ethernet addresses.

While at it, fix an incorrect comment about parse_ether_address(). If
accept_mask is false, only a complete 6-byte ethernet address is
accepted.

Change-Id: Ib03306c44866fe97d3cbff2634411b7f5ec31a79
Reviewed-on: https://code.wireshark.org/review/30162
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoFP: Added E-DCH T1 heuristic dissector
Darien Spencer [Sun, 23 Sep 2018 10:57:37 +0000 (13:57 +0300)]
FP: Added E-DCH T1 heuristic dissector

Change-Id: I22a3ba4a7caab1e4885292e6d28b2bc3d1e22bb7
Reviewed-on: https://code.wireshark.org/review/30208
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoUpdate VS command prompt menu names for VS 2017.
Guy Harris [Sun, 14 Oct 2018 20:52:13 +0000 (13:52 -0700)]
Update VS command prompt menu names for VS 2017.

At least on my W10 machine, they shols up as "xxx Native Tools
Commmand Prompt for VS 2017", not "VS2017 xxx Native Tools Command
Prompt".

Change-Id: I55d7ad24df717cfce21f6abdaf97ed1972128e3c
Reviewed-on: https://code.wireshark.org/review/30215
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agojson-glib requires GLib 2.37.6 or later.
Guy Harris [Sun, 14 Oct 2018 20:08:47 +0000 (13:08 -0700)]
json-glib requires GLib 2.37.6 or later.

Go for 2.37.6 for now; we may want to use a newer version.

Change-Id: Icce58716d5f7cb8367e7ff83cad070b2fcd7e1c2
Reviewed-on: https://code.wireshark.org/review/30213
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoNote that you have to be careful reading messages from a pipe.
Guy Harris [Sun, 14 Oct 2018 19:46:45 +0000 (12:46 -0700)]
Note that you have to be careful reading messages from a pipe.

Change-Id: I354e0633b8bd1da3d95fcb770fb9d5a0e4ee5880
Reviewed-on: https://code.wireshark.org/review/30212
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoextcap: Read stderr on extcap error without an infinite loop
Stig Bjørlykke [Sun, 14 Oct 2018 18:22:08 +0000 (20:22 +0200)]
extcap: Read stderr on extcap error without an infinite loop

Check if data is available on stderr before doing a blocking read() to
avoid an infinite read loop when having less data than STDERR_BUFFER_SIZE.

Append data instead of overwrite when doing multiple read() to fetch
available data.

This is a regression from g6a949ed155.

Bug: 15205
Change-Id: I84b232aeafb6123f77f3f5d48bbe89326fe7eb0f
Reviewed-on: https://code.wireshark.org/review/30209
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
5 years agoglib: restore some GLIB_CHECK_VERSION
Joakim Karlsson [Sun, 14 Oct 2018 16:15:27 +0000 (18:15 +0200)]
glib: restore some GLIB_CHECK_VERSION

This restore changes made in Ie95cf37f9cd283545693e290340a7489cc989c95

This change is due to SHA512 checksum wasn't introduced until 2.36.0

Change-Id: I048d5c879dc1038108edd93ed781fd97b50ddc42
Reviewed-on: https://code.wireshark.org/review/30207
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 2018-10-14]
Gerald Combs [Sun, 14 Oct 2018 08:30:48 +0000 (08:30 +0000)]
[Automatic update for 2018-10-14]

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

Change-Id: I3dc92d31a377dafc7c333139a580dbb140ec47e2
Reviewed-on: https://code.wireshark.org/review/30201
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agomacos-setup.sh: fix missing json_glib version check
Peter Wu [Sat, 13 Oct 2018 21:01:22 +0000 (23:01 +0200)]
macos-setup.sh: fix missing json_glib version check

Change-Id: I3d1fecebd4cb0a7b7656cfb3342f68c4e4f929cf
Fixes: v2.9.0rc0-1933-ge9d353112e ("tools: add libjson-glib to macos-setup.")
Reviewed-on: https://code.wireshark.org/review/30196
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agomacos-setup.sh: fix missing bcg729 version check
Peter Wu [Sat, 13 Oct 2018 21:00:23 +0000 (23:00 +0200)]
macos-setup.sh: fix missing bcg729 version check

Reorder spandsp for consistency with the installation steps.

Change-Id: If9ade381ef7316efb4cce0dbc6486c33d44dd9f8
Fixes: v2.5.0rc0-583-ge23e28da22 ("Add bcg729.")
Reviewed-on: https://code.wireshark.org/review/30195
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoXRA: Fix of overflow in calculation of PLC timestamp
Bruno Verstuyft [Tue, 9 Oct 2018 13:33:24 +0000 (15:33 +0200)]
XRA: Fix of overflow in calculation of PLC timestamp

Change-Id: I8f566ea44f88633b9ff40c964498b863e0773884
Reviewed-on: https://code.wireshark.org/review/30090
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoWindows: Remove Cygwin warning
Graham Bloice [Sat, 13 Oct 2018 20:57:23 +0000 (21:57 +0100)]
Windows: Remove Cygwin warning

As Cygwin is no longer required for Windows, remove
the CMake warning if it isn't found

Change-Id: I2fd44a00941d6b3f33666d8f6fcfa44a40224ad9
Reviewed-on: https://code.wireshark.org/review/30194
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
5 years agoUpdate installation instructions for MSVC and Qt.
Guy Harris [Sat, 13 Oct 2018 21:23:55 +0000 (14:23 -0700)]
Update installation instructions for MSVC and Qt.

Change-Id: Id610d4d11a0aaa132c0a528a8dfcb41c1cfc4215
Reviewed-on: https://code.wireshark.org/review/30197
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoLTE RRC: add direction to UL-CCCH and DL-CCCH PDUs
Pascal Quantin [Fri, 12 Oct 2018 21:03:38 +0000 (23:03 +0200)]
LTE RRC: add direction to UL-CCCH and DL-CCCH PDUs

This will be useful for the RRC Early Data procedure.

Change-Id: Idcf4251315ee171aa15e650682d7e686a05a9e0a
Reviewed-on: https://code.wireshark.org/review/30185
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agotext2pcap: gracefully handle hexdump without trailing LF
Peter Wu [Fri, 12 Oct 2018 22:21:16 +0000 (00:21 +0200)]
text2pcap: gracefully handle hexdump without trailing LF

When copying hexdumps, the newline might be missing which would result
in a capture file missing one byte in its packet. Adjust the grammar to
recognize the two trailing hexadecimal characters as a "byte".

This is safe because Flex picks the rule that matches the longest input
string. So given "01 ", it will always match all three characters. If
something like "01x" is given, then the "text" rule will be matched (as
before). Only if no more characters are available (such as at the end of
a file), then the rule will match two hexdigits.

Remove the unnecessary hexdigit rule while at it.

Change-Id: I21dc37d684d1c410ce720cb27706a6e54f87f94d
Reviewed-on: https://code.wireshark.org/review/30190
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agotest: increase coverage for text2pcap supported formats
Peter Wu [Fri, 12 Oct 2018 21:25:40 +0000 (23:25 +0200)]
test: increase coverage for text2pcap supported formats

The manual documents several cases, be sure to check for them to avoid
further grammar changes from breaking expectations.

Change-Id: Ie38ecf624120a3a9297d02b4fd9b05511acf5ac9
Reviewed-on: https://code.wireshark.org/review/30189
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agotest: fix text2pcap tests not to overwrite case_text2pcap_pcap
Peter Wu [Fri, 12 Oct 2018 17:21:56 +0000 (19:21 +0200)]
test: fix text2pcap tests not to overwrite case_text2pcap_pcap

Fix an unfortunate typo that disabled all of the pcap tests. Patch the
correct capinfos output with the expected packets/datasize values and
fix the dns+icmp datasize case to match the original test.sh value.

Change-Id: I25aac4c8040c2000602753269f69f4bdc4a8a59b
Reviewed-on: https://code.wireshark.org/review/30167
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoWe don't support VS prior to 2015 in the master branch.
Guy Harris [Fri, 12 Oct 2018 22:03:08 +0000 (15:03 -0700)]
We don't support VS prior to 2015 in the master branch.

Change-Id: I16380ca9205832960c0b2e7f43e237797d7671b6
Reviewed-on: https://code.wireshark.org/review/30188
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoFix section anchor.
Guy Harris [Fri, 12 Oct 2018 21:14:07 +0000 (14:14 -0700)]
Fix section anchor.

Change-Id: I5480c643c44698af764297feb77750850ffefde8
Reviewed-on: https://code.wireshark.org/review/30186
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoConsistenly use "Windows native" rather than "Windows Native".
Guy Harris [Fri, 12 Oct 2018 20:34:37 +0000 (13:34 -0700)]
Consistenly use "Windows native" rather than "Windows Native".

Change-Id: I40164b892e48dc4f484f8e24451b29c68a0da62d
Reviewed-on: https://code.wireshark.org/review/30182
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoFix typoes introduced by the previous change.
Guy Harris [Fri, 12 Oct 2018 20:32:32 +0000 (13:32 -0700)]
Fix typoes introduced by the previous change.

Change-Id: Ifc3b2c4d51e935f8cb4c5514e6c1f0c4bb9007ba
Reviewed-on: https://code.wireshark.org/review/30180
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoSome cleanups.
Guy Harris [Fri, 12 Oct 2018 20:24:45 +0000 (13:24 -0700)]
Some cleanups.

More use of "UNIX-like" as the term for "macOS and Linux and *BSD and
Solaris and AIX and..." or, alternatively, for "not Windows".

Add Fedora as a Linux distribution for which packages are available.

Use "Windows" rather than "Win32" in more cases; "Win32" dates back to
the days when the big difference was between Boring Old 16-bit Windows
and modern shiny new 32-bit Windows, but the former is now dead and the
latter now supports both 32-bit and 64-bit machines and software.  More
people have probably never heard "Win32" but are familiar with
"Windows".

*ALL* UNIX-like platforms support symlinks; Linux wasn't even the first
one, it just picked them up from the UN*Xes with which it was trying to
be compatible.

Change-Id: I254e74f0ed3c86b55d00f9e8d7b78d009b61fb5e
Reviewed-on: https://code.wireshark.org/review/30178
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoTDS: Implement Error token for TDS 4.x.
Craig Jackson [Fri, 12 Oct 2018 16:01:21 +0000 (12:01 -0400)]
TDS: Implement Error token for TDS 4.x.

For completeness, make dissect_tds_error_token compatible with TDS 4.x as well
as TDS 7. It is mostly replaced by the ExtendedError token for TDS 5.0.

Change-Id: Ia01be7d417ec008f97e3310346329f07b7c79e74
Reviewed-on: https://code.wireshark.org/review/30166
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoUpdates.
Guy Harris [Fri, 12 Oct 2018 19:11:06 +0000 (12:11 -0700)]
Updates.

We use VS 2017, not VS 2015, for 2.6.x and development builds.

Microsoft's documentation is moving from msdn.microsoft.com to
docs.microsoft.com.

The way you download pre-2017 versions of VS has changed.

Update links to the Android, GNOME, KDE and macOS human interface
guidelines while we're at it.

Change-Id: I1a3973f76aa5b476cb906b8a8604b82d6131e9c5
Reviewed-on: https://code.wireshark.org/review/30168
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoWin32: Make extcap utilities console applications.
Gerald Combs [Tue, 9 Oct 2018 15:44:54 +0000 (08:44 -0700)]
Win32: Make extcap utilities console applications.

Switch from using WinMain in extcap to wmain.

Change-Id: I54fafad598f5ff74fe84a3ce3e993ac5a31188f7
Reviewed-on: https://code.wireshark.org/review/30094
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 agoUpdate BACnet protocol to revision 20.
Dirk Römmen [Fri, 12 Oct 2018 14:31:07 +0000 (16:31 +0200)]
Update BACnet protocol to revision 20.

Change-Id: I95370096da31925f3d642d184a1bde3fbbdb265c
Reviewed-on: https://code.wireshark.org/review/30161
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agotest: reduce further influence from the environment
Peter Wu [Fri, 12 Oct 2018 16:12:01 +0000 (18:12 +0200)]
test: reduce further influence from the environment

Some tests used the default home directory which can have side-effects
(such as loading plugins, loading deprecated preferences). These could
cause tests to fail. Always use a sane environment to fix this.

Change getTsharkInfo to use this clean environment as well
(WIRESHARK_CONFIG_DIR does not exist with master-2.6 and would also not
propagate things like ASAN_OPTIONS=detect_leaks=0).

Change-Id: I1674f71972d35de91d191e0c29fdb59b8a0a56ce
Reviewed-on: https://code.wireshark.org/review/30165
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agotest: fix DeprecationWarning: invalid escape sequence
Peter Wu [Fri, 12 Oct 2018 12:12:41 +0000 (14:12 +0200)]
test: fix DeprecationWarning: invalid escape sequence

Change-Id: I4e0365c1f9d30a033b26f68f815c8209b96d73f5
Reviewed-on: https://code.wireshark.org/review/30164
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoMAC NR: fix dissection of Long Truncated BSR CE
Pascal Quantin [Fri, 12 Oct 2018 07:50:13 +0000 (09:50 +0200)]
MAC NR: fix dissection of Long Truncated BSR CE

As specified in 3GPP 38.321, in case of Long Truncated BSR CE, the UE
reports the BSR value for the LCG(s) with the logical channels having
data available for transmission following a decreasing order of the
highest priority logical channel (with or without data available for
transmission) in each of these LCG(s), and in case of equal priority,
in increasing order of LCGID.
SO we cannot make any assumption on the LCG being reported without
keeping track of the logical channel priorities currently active.

Change-Id: I148a13446e9dc035bb1bcd79cb15d8570bcefa57
Reviewed-on: https://code.wireshark.org/review/30151
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>

5 years agoieee80211: extend parsing of SAE messages
Joeri de Ruiter [Thu, 11 Oct 2018 10:45:10 +0000 (12:45 +0200)]
ieee80211: extend parsing of SAE messages

- Groups in the SAE exchange are named
- The SAE message type is included explicitly (Commit or Confirm)

Bug: 15197
Change-Id: I8d95dd1603bbb8f46675ec66d60fd0b187787803
Reviewed-on: https://code.wireshark.org/review/30127
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoQUIC: fix null-ptr dereference in gQUIC version check
Peter Wu [Fri, 12 Oct 2018 11:20:07 +0000 (13:20 +0200)]
QUIC: fix null-ptr dereference in gQUIC version check

Bug: 15201
Change-Id: Idc9964347c251fe7f9599b90abc760f26d85a5ba
Fixes: v2.9.0rc0-2173-g9fcb4af6b6 ("QUIC: gQUIC Q044 always use CHLO from gQUIC (with tag)")
Reviewed-on: https://code.wireshark.org/review/30160
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
5 years agodtn: fix spelling-error-in-binary found by lintian
Alexis La Goutte [Fri, 12 Oct 2018 06:07:20 +0000 (06:07 +0000)]
dtn: fix spelling-error-in-binary found by lintian

Occurance -> Occurrence

Change-Id: I5dbe140f10f7a8b615c40fbf84a5fe2501ed46ff
Reviewed-on: https://code.wireshark.org/review/30140
Reviewed-by: Patricia Lindner <plindner6912@gmail.com>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
5 years agoAlso need a period at the end of the "Built using" clause.
Guy Harris [Fri, 12 Oct 2018 07:30:44 +0000 (00:30 -0700)]
Also need a period at the end of the "Built using" clause.

Change-Id: Ia872e912f1331ef8d6b54b6751f5c132fbf0b4f3
Reviewed-on: https://code.wireshark.org/review/30148
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoNeed a space between the VS year number and the toolchain version.
Guy Harris [Fri, 12 Oct 2018 07:23:13 +0000 (00:23 -0700)]
Need a space between the VS year number and the toolchain version.

Change-Id: I5e0047fde7a2d5a98767c6ed440b85575f711b9e
Reviewed-on: https://code.wireshark.org/review/30145
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years ago3.0 requires VS 2015 or later.
Guy Harris [Fri, 12 Oct 2018 06:32:44 +0000 (23:32 -0700)]
3.0 requires VS 2015 or later.

Change-Id: I20c40ea923df12747f6aec9dd672b3a9a1d6403f
Reviewed-on: https://code.wireshark.org/review/30144
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoClean up MSVC version string generation.
Guy Harris [Fri, 12 Oct 2018 05:12:29 +0000 (22:12 -0700)]
Clean up MSVC version string generation.

Don't bother with versions prior to VS 2010; as of Wireshark 2.4, we
don't support them.

Show it as "Visual Studio (year)", followed by the toolchain version
(not to be confused with the compiler version - or with the Visual
Studio version!).

Do the same thing for the clang/C2 compiler; just append the clang
version stuff after that.

Indent the #if/#elif/#else/#endif to make it a little clearer how
they're nested.

Change-Id: Ib7a3af3251e6375d267b3b5da9f8e26a377ceeac
Reviewed-on: https://code.wireshark.org/review/30138
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoDCOM: always NUL-terminate dissect_dcom_BSTR results
Peter Wu [Thu, 11 Oct 2018 11:04:03 +0000 (13:04 +0200)]
DCOM: always NUL-terminate dissect_dcom_BSTR results

All of the six users in plugins/epan/profinet/packet-dcom-cba.c expect
the string to be NUL-terminated, so ensure this to avoid reading
uninitialized memory for the Info column.

Bug: 15130
Change-Id: Ibc922068d14b87ce324af3cec22a5f8343088b40
Reviewed-on: https://code.wireshark.org/review/30128
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agowmem_tree: fix crash with wmem_tree_destroy and NULL scope
Peter Wu [Thu, 11 Oct 2018 10:14:00 +0000 (12:14 +0200)]
wmem_tree: fix crash with wmem_tree_destroy and NULL scope

The function was documented for use with a NULL scope, but it actually
crashes since callbacks are not available for NULL scopes. git master
is unaffected, but the GTK+ protocol dialog in 2.4 and 2.6 do crash.

Bug: 14349
Change-Id: I54350e112192394797cf85eaac4f30194178d7c4
Fixes: v2.3.0rc0-2597-gb7d6cca4ae ("Add wmem_tree_destroy")
Reviewed-on: https://code.wireshark.org/review/30126
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDCERPC: fix memleak by removing dummy element from ndr_pointer_list
Peter Wu [Wed, 10 Oct 2018 13:41:42 +0000 (15:41 +0200)]
DCERPC: fix memleak by removing dummy element from ndr_pointer_list

Instead of creating the pointers list early, defer it to the point when
a new list item is added. This avoids the need for a dummy element.

This happens to fix the memory leak in bug 14735 as well (verified with
both ASAN and valgrind).

Change-Id: I3b169dfc447bd7465d06c26e0bd9dfd4225b1307
Bug: 14735
Reviewed-on: https://code.wireshark.org/review/30115
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDCERPC: simplify pointer list tracking
Peter Wu [Wed, 10 Oct 2018 12:46:14 +0000 (14:46 +0200)]
DCERPC: simplify pointer list tracking

Observe that the "current_depth" and "len_ndr_pointer_list" just track
the length of the current singly linked list in order to insert (append)
or remove [the last] element (a linked list of lists and a linked list
of pointers respectively). Replace these callers by equivalents that do
not require explicit length tracking, internally they both have to do a
O(n) lookup anyway.

There used to be a case where "current_depth" could run out-of-sync, no
longer tracking the actual list length: when the callback (tnpd->fnct or
tnpd->callback) triggers an exception. I believe this was unintentional.

No functional change intended, but this should make further changes to
the data structures easier.

Change-Id: I3cb13aba22caa87dc7baba411cf34f47792f7bb7
Ping-Bug: 14735
Fixes: v2.5.0rc0-292-g6bd87bdd5d ("dcerpc: improve greatly the speed of processing of DCERPC packets")
Reviewed-on: https://code.wireshark.org/review/30114
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agotvbuff_composite: fix buffer overflow due to wrong offset adjustment
Peter Wu [Wed, 10 Oct 2018 22:02:26 +0000 (00:02 +0200)]
tvbuff_composite: fix buffer overflow due to wrong offset adjustment

The tvb_offset method should return the offset of the buffer within the
backing tvb (ds_tvb). The currently returned non-zero offset is valid
for tvbuff_subset.c, but not for the composite TVB. The backing tvb is
the tvb itself, so the offset should be zero (or "counter" for
consistency with tvbuff_real.c and others).

This bug is observable with the capture from the bug. In tshark, the
data field in the PDML output has value "field length invalid!" and the
position attribute ("pos") is too large. With the -V option it even
crashes with a buffer overflow (read). In the GUI, the bytes tab shows
range 3199-19642 even if the data source is only 16444 bytes while the
selection should have been 0-16443.

Bug: 14466
Change-Id: I01399ff500321dba262eb60b67c4cddb173b4679
Reviewed-on: https://code.wireshark.org/review/30124
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee802154: Show FCF reserved bit
Stig Bjørlykke [Thu, 11 Oct 2018 19:54:08 +0000 (21:54 +0200)]
ieee802154: Show FCF reserved bit

Change-Id: Ibd18e988a3c0692c1a5eccb2db1abf87947f3c03
Reviewed-on: https://code.wireshark.org/review/30131
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoTools: Compress our tarball using threads.
Gerald Combs [Thu, 11 Oct 2018 22:08:23 +0000 (15:08 -0700)]
Tools: Compress our tarball using threads.

Check to see if xz supports threads and enable them if that's the case.

Change-Id: I8a0e7100fec98e5b7d7ccd9a987f7782bf7c7512
Reviewed-on: https://code.wireshark.org/review/30137
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoeap: don't dissect the identity as IMSI unless that's the case.
Dario Lombardo [Thu, 11 Oct 2018 12:20:22 +0000 (14:20 +0200)]
eap: don't dissect the identity as IMSI unless that's the case.

The identity in SIM/AKA/AKA' is IMSI (permanent identity) in some cases only.
Others contain a pseudonym or a fast reauthentication username. Dissect the
formers as flat usernames.

Bug: 15196
Change-Id: Ia4491431b6ff557a248271b743c1e37c4e6c0b24
Reviewed-on: https://code.wireshark.org/review/30129
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>