metze/wireshark/wip.git
13 months agotest: do not silently ignore feature detection failures
Peter Wu [Thu, 26 Jul 2018 21:47:20 +0000 (23:47 +0200)]
test: do not silently ignore feature detection failures

When ASAN memleak detection is enabled, any memory leak would result in
an exception and subsequently all features are marked as missing.
With the default profile, any Lua plugin or certain configurations could
cause a memory leak. To avoid such interference, set the configuration
path to a dummy location and warn whenever an error happens nonetheless.

Do not call setProgramPath() immediately, there is no "tshark" binary in
the current working directory anymore. Rely on test.py to set the path.

Change-Id: Idccc3d68eb6f6bb64d3a0b32897acecc65e0dfb6
Reviewed-on: https://code.wireshark.org/review/28867
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
13 months agoRevert "Pass all arguments to options as --option=argument."
Guy Harris [Thu, 26 Jul 2018 21:42:28 +0000 (21:42 +0000)]
Revert "Pass all arguments to options as --option=argument."

This reverts commit 137d45f52c6ff3deb56721a6e37be5c4ed8f095a.

Don't. Make. The. Argument. To. Your. Extcap. Program. Specific.
Options. Optional. (Unless they're Boolean, in which case we never
pass an argument - we just pass the option if it's true and don't
pass it if it's false.)

Change-Id: I11e4ecaa196fd94c493d51e1f73e90267e1d9b1d
Reviewed-on: https://code.wireshark.org/review/28866
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agoPass all arguments to options as --option=argument.
Guy Harris [Thu, 26 Jul 2018 21:28:34 +0000 (14:28 -0700)]
Pass all arguments to options as --option=argument.

For options with optional arguments, the only syntax that's *guaranteed*
to be handled by getopt_long() is --option=argument, not --option
argument.  The BSD/macOS version of getopt_long() only supports the
former, not the latter.

Change-Id: Icfaec9eda49f5a947961251ebd377d7c1684c823
Reviewed-on: https://code.wireshark.org/review/28865
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agocommit-msg: quote the filename, fix printed message
Peter Wu [Mon, 23 Jul 2018 11:30:35 +0000 (13:30 +0200)]
commit-msg: quote the filename, fix printed message

Quote the filename in case it contains spaces or other special chars.

Change-Id: I5ff901de0839551c06bc73b8bef631b64aff5199
Fixes: v2.9.0rc0-1078-gc20432285a ("git hooks: prevent first commit message line to exceed 80 chars.")
Reviewed-on: https://code.wireshark.org/review/28827
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
13 months ago--extcap-version requires = if it has an argument.
Guy Harris [Thu, 26 Jul 2018 20:38:20 +0000 (13:38 -0700)]
--extcap-version requires = if it has an argument.

The version argument to --extcap-version is optional, and some versions
of getopt_long() require, for a flag whose argument is optional, that
the argument be supplied as --flag=value, not --flag value.

Change-Id: I5e34132d8bb729b845ac75ff94d6d548c1c35a3d
Reviewed-on: https://code.wireshark.org/review/28864
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agodiameter: Update with some AVPs from TS 29.272
Joakim Karlsson [Thu, 26 Jul 2018 11:41:21 +0000 (13:41 +0200)]
diameter: Update with some AVPs from TS 29.272

Change-Id: Ia16c113821b3c48d48a193e67ae46c9b025e79aa
Reviewed-on: https://code.wireshark.org/review/28858
Reviewed-by: Anders Broman <a.broman58@gmail.com>
13 months agoMAC-LTE: Add framing/heuristic support for SR entries.
Martin Mathieson [Wed, 25 Jul 2018 21:50:18 +0000 (22:50 +0100)]
MAC-LTE: Add framing/heuristic support for SR entries.

Change-Id: Ibd1df6d904b164aec74afa7d6b259bf202808c8c
Reviewed-on: https://code.wireshark.org/review/28854
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
13 months agoAdd a preference to override the radiotap FCS bit.
Guy Harris [Thu, 26 Jul 2018 01:04:46 +0000 (18:04 -0700)]
Add a preference to override the radiotap FCS bit.

This is separate from the 802.11 preference, which only affects packets
where no file or packet metadata indicates whether there is an FCS (yes,
that is intentional behavior).  This is specifically for radiotap, in
case some driver fails to set the FCS bit correctly (this is currently
an issue with Npcap, which currently assumes that the packet has an FCS
iff NDIS indicated the packet with the DOT11_RECV_FLAG_RAW_PACKET flag;
that doesn't appear to be a reliable indicator, and it's not clear there
*is* a reliable indicator, so Npcap might have to fall back on something
really gross like a quirks database for particular adapters).

Change-Id: Ia3b134d89004307442d42cfa5ed3cf8fb938235f
Ping-Bug: 15010
Reviewed-on: https://code.wireshark.org/review/28855
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agoGSM SIM: Show length for 0x9f status word
Darien Spencer [Wed, 25 Jul 2018 17:43:24 +0000 (20:43 +0300)]
GSM SIM: Show length for 0x9f status word

Second byte, sw2, contains the amount of bytes in the response.

Change-Id: I237ef5978e81a2f13b821c5601177dac26829df1
Reviewed-on: https://code.wireshark.org/review/28850
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
13 months agoGSM SIM: Fix special case for "Wrong length" sw
Darien Spencer [Wed, 25 Jul 2018 17:48:46 +0000 (20:48 +0300)]
GSM SIM: Fix special case for "Wrong length" sw

While TS 51.011 defines '67 XX' as "Incorrect param P3", TS 102.221 specifies
a special case '67 00' which wasn't taken into account in the dissector

Change-Id: I2f17bd0035b3a9f4cdd625523eef06be416d451e
Reviewed-on: https://code.wireshark.org/review/28849
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
13 months agomsgpack: replace pow() with shift.
Dario Lombardo [Wed, 25 Jul 2018 18:03:57 +0000 (20:03 +0200)]
msgpack: replace pow() with shift.

This removes all casting issues.

Change-Id: I0377fe3fa31edf1e6c3f315d31dd01a728a3c173
Reviewed-on: https://code.wireshark.org/review/28852
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
13 months agoDon't remove a tap listener we didn't find in the first place.
Guy Harris [Wed, 25 Jul 2018 18:08:04 +0000 (11:08 -0700)]
Don't remove a tap listener we didn't find in the first place.

If remove_tap_listener() doesn't find a tap listener with the specified
data, print a warning message and skip the "remove the tap listener"
steps.

This means that the internal free_tap_listener() won't be called with a
null listener; remove the now-unnecessary check (if anybody *does* call
it with a null pointer, that's a bug).

This prevents the crash in bug 15006, but that now produces a warning
message; it doesn't fix the underlying bug, it just changes the symptom.

Change-Id: Ia9a2bfa3d57b86eac0d6e0b0bad03a7b81e254e3
Ping-Bug: 15006
Reviewed-on: https://code.wireshark.org/review/28853
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agoGSM SIM: Parse 0x61 and 0x6C status words
Darien Spencer [Wed, 25 Jul 2018 14:09:33 +0000 (17:09 +0300)]
GSM SIM: Parse 0x61 and 0x6C status words

In accordance with TS 102.221

Change-Id: I749f1504693a15a13e4513948cdf2b8ec96b27d7
Reviewed-on: https://code.wireshark.org/review/28847
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
13 months agonfapi: fix dissection of CONFIG.request
Alexis La Goutte [Fri, 20 Jul 2018 13:13:12 +0000 (13:13 +0000)]
nfapi: fix dissection of CONFIG.request

There is no Error Code field

Bug: 14988
Change-Id: If6e8cf37d508c014b585bdb0cb4830ce7eb45588
Reviewed-on: https://code.wireshark.org/review/28797
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: Peter Wu <peter@lekensteyn.nl>
13 months agonetlink: fix conflict
Alexis La Goutte [Tue, 24 Jul 2018 05:56:36 +0000 (07:56 +0200)]
netlink: fix conflict

'netlink-route.ifa_address' exists multiple times with NOT compatible types: FT_IPv4 and FT_IPv6

Change-Id: I3ba350cfc479a7733d48bc07b4102c8220126247
Reviewed-on: https://code.wireshark.org/review/28841
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>
13 months agodocsis-macmgmt: fix spelling-error-in-binary found by lintian
Alexis La Goutte [Wed, 25 Jul 2018 05:57:29 +0000 (05:57 +0000)]
docsis-macmgmt: fix spelling-error-in-binary found by lintian

Comparision -> Comparison

Change-Id: I13afe719a4efece15a27b6380f1021e5e84248c5
Reviewed-on: https://code.wireshark.org/review/28846
Reviewed-by: Anders Broman <a.broman58@gmail.com>
13 months agoCIP Motion: Code cleanup
Dylan Ulis [Tue, 24 Jul 2018 22:54:51 +0000 (18:54 -0400)]
CIP Motion: Code cleanup

1. Remove unused function parameters
2. Some tvb_get --> ret_uint
3. Move some variables to smaller scope. Better practice, and it's easier to see what variables need to persist outside of for loops.
4. Combine some scattered if (dimension == 1) blocks.

No functional changes.

Change-Id: Ifb2affb968356fcd7e980fd4ee046cf359252df4
Reviewed-on: https://code.wireshark.org/review/28845
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
13 months agocoap/oscore: fix conflict
Alexis La Goutte [Tue, 24 Jul 2018 05:55:58 +0000 (07:55 +0200)]
coap/oscore: fix conflict

'oscore.opt.object_security_kid' exists multiple times with NOT compatible types: FT_BYTES and FT_BOOLEAN

Change-Id: Iba511c0804a8904a33deefecf75231ccdde938d2
Reviewed-on: https://code.wireshark.org/review/28840
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
13 months agoCMake: More update_tools_help fixes.
Gerald Combs [Mon, 23 Jul 2018 18:26:22 +0000 (11:26 -0700)]
CMake: More update_tools_help fixes.

Use our target name instead of $<TARGET_FILE:...> in a few places. As
Peter pointed out, CMake will do the desired substitution for us. Update
a comment.

Change-Id: I03bf98cc1bf4807213eb89e5e5b1f4e3c08c17be
Reviewed-on: https://code.wireshark.org/review/28836
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
13 months agoGTP: add 5G NR User Plane Dissection
Prerit Jain [Fri, 13 Jul 2018 17:12:49 +0000 (22:42 +0530)]
GTP: add 5G NR User Plane Dissection

Change-Id: I9bf31585d0ef198d1a56d7259c72f59daa3b3d86
Reviewed-on: https://code.wireshark.org/review/28698
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
13 months agoCMake: Fixup some documentation dependencies.
Gerald Combs [Mon, 23 Jul 2018 20:47:35 +0000 (13:47 -0700)]
CMake: Fixup some documentation dependencies.

Change the dependencies of various wsug targets to update_tools_help
instead of the files it generates. Have the nsis_package_prep
and wix_package_prep targets depend on user_guide_chm instead of
update_tools_help. This should make parallel builds of all_guides,
wix_package_prep and possibly other targets more reliable.

Change-Id: I473f0e608aade1ac0053c03bef0942c69c650f65
Reviewed-on: https://code.wireshark.org/review/28838
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
13 months agoreassemble_test: Fix argument type warnings.
Gerald Combs [Mon, 23 Jul 2018 21:58:15 +0000 (14:58 -0700)]
reassemble_test: Fix argument type warnings.

Try to fix

../epan/reassemble_test.c:70:16: warning: format '%p' expects argument of type 'void *', but argument 6 has type 'fragment_head * {aka struct _fragment_item *}' [-Wformat=]

and similar warnings.

Change-Id: Ied2d2f7b7a3e6fa29d51c10f17199decdecfa81c
Reviewed-on: https://code.wireshark.org/review/28839
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
13 months agozbee-nwk-gp: don't assume packet is NULL
Julien Staub [Mon, 23 Jul 2018 06:27:57 +0000 (08:27 +0200)]
zbee-nwk-gp: don't assume packet is NULL

Command dissector can be called without a full ZGP frame.

Bug: 14993
Fixes: v2.9.0rc0-1225-g903927e012 ("ZBEE-NWK_GP: add key decryption during commissioning process")
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9478
Change-Id: Id2e4f7abb66a8cbb065f5685aab8c2e8241a5468
Reviewed-on: https://code.wireshark.org/review/28822
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
13 months agoSCTPGraphDialog: Remove two unused members
Vasil Velichkov [Mon, 23 Jul 2018 16:53:03 +0000 (19:53 +0300)]
SCTPGraphDialog: Remove two unused members

Those two members are leftovers from the gtk interface where a single
button was used. Current Qt interface uses three buttons so those two
members are no longer needed.

Change-Id: I10e8c6aa887582e21ceec87bc3021a49abcc34dd
Reviewed-on: https://code.wireshark.org/review/28834
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
13 months agoMsgPack: fix format 'long (unsigned) int' error
Uli Heilmeier [Mon, 23 Jul 2018 10:48:49 +0000 (12:48 +0200)]
MsgPack: fix format 'long (unsigned) int' error

fix 'long unsigned int' and 'long int' error

Change-Id: I79fd743561b511704d0324d79140574e900ff013
Reviewed-on: https://code.wireshark.org/review/28823
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
13 months agoCMake: fix build when some tools are not built
Peter Wu [Mon, 23 Jul 2018 15:58:50 +0000 (17:58 +0200)]
CMake: fix build when some tools are not built

oss-fuzz disables all targets except for fuzzshark, be sure to check for
tool availability or the cmake step will fail.

Change-Id: Ia873fdc1b548033ac61622f61299b5af7dfb41d9
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9533
Fixes: v2.9.0rc0-1251-gffbd3151b5 ("CMake: Fixup our tools help dependencies.")
Reviewed-on: https://code.wireshark.org/review/28832
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
13 months agoSCTPGraphDialog: Clear internal vectors
Vasil Velichkov [Fri, 20 Jul 2018 21:14:01 +0000 (00:14 +0300)]
SCTPGraphDialog: Clear internal vectors

Every time the graph is redrawn new items are added to the vectors but
these items are never removed and the used memory increase over time
which for larger captures could be problematic.

Change-Id: I5f029d5f48e215aacf4a69fb7aef348d16df9846
Reviewed-on: https://code.wireshark.org/review/28782
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
13 months ago.mailmap: update of July (2018)
Alexis La Goutte [Fri, 20 Jul 2018 06:20:02 +0000 (06:20 +0000)]
.mailmap: update of July (2018)

Change-Id: I905be4f9cff9bf71df666aec91f72c881f7c86bf
Reviewed-on: https://code.wireshark.org/review/28774
Reviewed-by: Dylan Ulis <daulis0@gmail.com>
Reviewed-by: Vadim Fedorenko <vadimjunk@gmail.com>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
13 months agoRemove executable file permission from lua test files
Jaap Keuter [Sun, 22 Jul 2018 18:17:50 +0000 (20:17 +0200)]
Remove executable file permission from lua test files

Change-Id: I18b3f145bb48a78edabed3cca03691d15cd06842
Reviewed-on: https://code.wireshark.org/review/28809
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: Peter Wu <peter@lekensteyn.nl>
13 months agoIn bgatt.uuid0xXXXX names, hex digits in XXXX are lower case.
Guy Harris [Sun, 22 Jul 2018 19:25:54 +0000 (12:25 -0700)]
In bgatt.uuid0xXXXX names, hex digits in XXXX are lower case.

The dissectors are registered using lower-case a through f; call them
that way.

XXX - why is this not just done with a dissector table with an unsigned
integer key?

Bug: 14994
Change-Id: I73dbfe8ea0cc3545d67f5315d3cd8ac1eee3385f
Reviewed-on: https://code.wireshark.org/review/28818
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agoIf the dissector isn't registered, you shouldn't be calling it.
Guy Harris [Sun, 22 Jul 2018 19:19:33 +0000 (12:19 -0700)]
If the dissector isn't registered, you shouldn't be calling it.

Report a dissector bug, rather than calling the data dissector.

Change-Id: I7bde1001a48d2443acf2dc7caa83434e0972aab7
Reviewed-on: https://code.wireshark.org/review/28814
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agoClean up whitespace.
Guy Harris [Sun, 22 Jul 2018 18:53:15 +0000 (11:53 -0700)]
Clean up whitespace.

Change-Id: Ib9c6e5fbb5cf94c56f5a3a81bad02c6f735f8211
Reviewed-on: https://code.wireshark.org/review/28812
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agoDo some more checks.
Guy Harris [Sun, 22 Jul 2018 18:51:06 +0000 (11:51 -0700)]
Do some more checks.

Don't assume that the amount of data remaining in the packet is greater
than or equal to the amount of padding; it might not be.  Throw an
exception if it isn't.

Make sure data eists before allocating a buffer for it and copying with
tvb_memcpy(), in case the length is too big.

Change-Id: Icde8b8cc687b7b9229756aabddb246f9b98c3a22
Ping-Bug: 14999
Reviewed-on: https://code.wireshark.org/review/28810
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agoDon't assume a given btgatt.uuid0xXXXX dissector exists.
Guy Harris [Sun, 22 Jul 2018 17:18:19 +0000 (10:18 -0700)]
Don't assume a given btgatt.uuid0xXXXX dissector exists.

They're not guaranteed to have been registered.

Bug: 14994
Change-Id: I11c2b2d4d8a7dd020a0ef3d700b29b0859bc68ca
Reviewed-on: https://code.wireshark.org/review/28805
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agoRemove false claims.
Guy Harris [Sun, 22 Jul 2018 16:38:44 +0000 (09:38 -0700)]
Remove false claims.

dissect_zbee_nwk_gp_cmd_commissioning_reply() *does* use the packet
argument.

Change-Id: Ife78d8090822474977ddf1ed6ce1a34611d06080
Reviewed-on: https://code.wireshark.org/review/28802
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agossl: dtls: Fix small memory leaks
Vasil Velichkov [Sun, 22 Jul 2018 08:37:46 +0000 (11:37 +0300)]
ssl: dtls: Fix small memory leaks

Use g_strsplit/g_strfreev instead of wmem_strsplit/wmem_free because in
wmem_strutil.h the wmem_strsplit is documented not to be used with a
NULL allocator.

The wmem_free does not free the string elements in contrast to g_strfreev.

Change-Id: Ia207d5df5b8b7edd4ba77071292761ae4819fb12
Reviewed-on: https://code.wireshark.org/review/28796
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
13 months ago[Automatic update for 2018-07-22]
Gerald Combs [Sun, 22 Jul 2018 08:15:04 +0000 (08:15 +0000)]
[Automatic update for 2018-07-22]

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

Change-Id: I386568a4e2e38a0977bedcdc98af61c3bdd6405c
Reviewed-on: https://code.wireshark.org/review/28792
Reviewed-by: Gerald Combs <gerald@wireshark.org>
13 months agoadd DXL dissector.
Dario Lombardo [Sun, 1 Jul 2018 10:51:35 +0000 (12:51 +0200)]
add DXL dissector.

Change-Id: I5aeccf54d1ab6b9b4098fb3dbf529550c57319e8
Reviewed-on: https://code.wireshark.org/review/28662
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
13 months agocisco-fp-min: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Thu, 5 Jul 2018 11:54:57 +0000 (11:54 +0000)]
cisco-fp-min: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: If470ed91123b6a0a630d6e0a17bffd296759031a
Reviewed-on: https://code.wireshark.org/review/28604
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
13 months agoCIP Motion: Attribute updates
Dylan Ulis [Fri, 20 Jul 2018 14:51:09 +0000 (10:51 -0400)]
CIP Motion: Attribute updates

1. Add more attribute definitions
2. Remove data that was only in object revision 1. This conflicts with
   the newer object definitions. No actual devices implemented this
   version.
3. Correct data from enum --> bit fields
4. Extract Methods into functions that are shared by attributes
   and other parsing.

Change-Id: I5a08188466349b7d735346981b16e096ae68032d
Reviewed-on: https://code.wireshark.org/review/28776
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
13 months agoadd MsgPack dissector.
Dario Lombardo [Sun, 1 Jul 2018 10:52:17 +0000 (12:52 +0200)]
add MsgPack dissector.

Change-Id: Id1ae76da1b4d158227a108f38d1ac83ae08e36f5
Reviewed-on: https://code.wireshark.org/review/28661
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
13 months agoFP: Fix wrong indexer
Darien Spencer [Sat, 21 Jul 2018 16:39:49 +0000 (19:39 +0300)]
FP: Fix wrong indexer

Change-Id: Iba74c38336ba06d207444fda32376a8c3851b61d
Reviewed-on: https://code.wireshark.org/review/28787
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
13 months agopacket-k12: Fix small memory leak
Vasil Velichkov [Fri, 20 Jul 2018 18:12:06 +0000 (21:12 +0300)]
packet-k12: Fix small memory leak

Use g_strsplit/g_strfreev instead of wmem_strsplit/wmem_free because in
wmem_strutil.h the wmem_strsplit is documented not to be used with a
NULL alocator.

5 bytes in 1 blocks are definitely lost in loss record 63 of 9,354
   at 0x4C2EBAB: malloc (vg_replace_malloc.c:299)
   by 0x4E8D3C5: g_malloc (gmem.c:99)
   by 0x8214317: wmem_alloc (wmem_core.c:37)
   by 0x8219227: wmem_strdup (wmem_strutl.c:41)
   by 0x8219AC1: wmem_strsplit (wmem_strutl.c:272)
   by 0x749E3C9: protos_chk_cb (packet-k12.c:363)

5 bytes in 1 blocks are definitely lost in loss record 64 of 9,354
   at 0x4C2EBAB: malloc (vg_replace_malloc.c:299)
   by 0x4E8D3C5: g_malloc (gmem.c:99)
   by 0x8214317: wmem_alloc (wmem_core.c:37)
   by 0x8219227: wmem_strdup (wmem_strutl.c:41)
   by 0x8219AC1: wmem_strsplit (wmem_strutl.c:272)
   by 0x749E24A: k12_copy_cb (packet-k12.c:327)

Change-Id: I994769d17c87ed1d4f620379a2502452f48d80a5
Reviewed-on: https://code.wireshark.org/review/28779
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
13 months agoAdd a tap "finish" callback, called when a listener is removed.
Guy Harris [Sat, 21 Jul 2018 00:07:19 +0000 (17:07 -0700)]
Add a tap "finish" callback, called when a listener is removed.

Change-Id: Ic6c23dbd39d1adf8f730f1c866e409f731947475
Reviewed-on: https://code.wireshark.org/review/28786
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agoCMake: Add tools help checks.
Gerald Combs [Fri, 20 Jul 2018 23:30:51 +0000 (16:30 -0700)]
CMake: Add tools help checks.

Generate help for dumpcap and rawshark only if PCAP_FOUND is true. Note
that we should generate all of the tools help conditionally.

Change-Id: I2145717dee8d8a1ac3d4fd328240f58dbdd07e6c
Reviewed-on: https://code.wireshark.org/review/28785
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
13 months agoKafka: add support for additional Produce, Fetch, OffsetCommit and Heartbeat API...
Tim Cuthbertson [Fri, 29 Jun 2018 23:37:39 +0000 (09:37 +1000)]
Kafka: add support for additional Produce, Fetch, OffsetCommit and Heartbeat API versions

Change-Id: I5bd41ed299e586b953042683acf2f05c678a7e93
Reviewed-on: https://code.wireshark.org/review/28748
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Evan Huus <eapache@gmail.com>
13 months agoIf we have fseek/ftell variants with 64-bit offsets, use them.
Guy Harris [Fri, 20 Jul 2018 22:20:40 +0000 (15:20 -0700)]
If we have fseek/ftell variants with 64-bit offsets, use them.

Or, at least, use them in the libwiretap file-writing code; we can
change other places to use them as appropriate.

Change-Id: I63af2267a22a158ee23f3359b043913dac0e285b
Reviewed-on: https://code.wireshark.org/review/28783
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agoCMake: Fixup our tools help dependencies.
Gerald Combs [Fri, 20 Jul 2018 20:55:40 +0000 (13:55 -0700)]
CMake: Fixup our tools help dependencies.

Make sure each tools help target is generated by and depends on its
generating executable.

Change-Id: I716c0db23b297e2d2692b72a47259c40aa0c52fa
Reviewed-on: https://code.wireshark.org/review/28780
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
13 months agoClean up tests.
Guy Harris [Fri, 20 Jul 2018 21:13:43 +0000 (14:13 -0700)]
Clean up tests.

On Windows with MSVC, just assume we have 64-bit file offset support,
including _fseeki64() and _ftelli64().

On UN*X, test for Large File Support and for fseeko()/ftello(), and for
what #defines are needed to enable them.

On Windows without MSVC, test for Large File Support, but assume we have
_fseeki64() and _ftelli64(); what *should* we be doing?

Clean up indentation and else()/endif() arguments while we're at it.

Change-Id: I801d1f4059abbed2d5123d2375a560634a9ee056
Reviewed-on: https://code.wireshark.org/review/28781
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agoCMake: Don't bother testing for _fseeki64 on Windows.
Gerald Combs [Fri, 20 Jul 2018 17:26:17 +0000 (10:26 -0700)]
CMake: Don't bother testing for _fseeki64 on Windows.

We don't appear to use it and if we ever do need it it's been available
since Visual Studio 2005 / MSVCR80.

Change-Id: Ifd44d78b96a21577ceea635653517a348ded50f7
Reviewed-on: https://code.wireshark.org/review/28778
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
13 months agoWSUG: Added placeholders for missing documentation
Moshe Kaplan [Thu, 19 Jul 2018 21:24:16 +0000 (17:24 -0400)]
WSUG: Added placeholders for missing documentation

Change-Id: I93b118964b0296bd32627439f8ae3c13169b1d5e
Reviewed-on: https://code.wireshark.org/review/28772
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
13 months agoAsciiDoctor markup updates.
Gerald Combs [Thu, 19 Jul 2018 20:11:29 +0000 (13:11 -0700)]
AsciiDoctor markup updates.

Separate includes by blank lines as recommended in
https://asciidoctor.org/docs/user-manual/#include-directive.
Separate block attributes as well.

Change-Id: I933917a14eae6d1fe1879372917ab2208755f470
Reviewed-on: https://code.wireshark.org/review/28769
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>
13 months agoLua: Switch from disable_lua to enable_lua.
Gerald Combs [Thu, 19 Jul 2018 22:06:07 +0000 (15:06 -0700)]
Lua: Switch from disable_lua to enable_lua.

Deprecate "disable_lua" in favor of "enable_lua". Configuration options
typically use "true" or a similar value to enable features. Using
"disable_lua = false" to enable Lua seems odd.

Change-Id: I224acad0559d409ea0a28b5555d1eb898564328c
Reviewed-on: https://code.wireshark.org/review/28773
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>
13 months agoWSUG: Update the Statistics chapter to match current Qt UI
Moshe Kaplan [Thu, 19 Jul 2018 02:17:45 +0000 (22:17 -0400)]
WSUG: Update the Statistics chapter to match current Qt UI

Hide the Compare option, reorder the chapters to match the current Qt
order and move the Wireless menu to a new chapter.

Change-Id: I7f0eeb45f4894f66a9c91d62d7d43db775f469e5
Reviewed-on: https://code.wireshark.org/review/28761
Reviewed-by: Gerald Combs <gerald@wireshark.org>
13 months agostun: fix typo found by lintian
Alexis La Goutte [Thu, 19 Jul 2018 06:40:01 +0000 (06:40 +0000)]
stun: fix typo found by lintian

adress -> address (on display filter)

Change-Id: I36fb6c897e76b6a1465a840f1a0aa8f640bc09f8
Reviewed-on: https://code.wireshark.org/review/28763
Reviewed-by: Anders Broman <a.broman58@gmail.com>
13 months agoISAKMP: Incorrect presentation of NETMASK for INTERNAL_IP4_SUBNET Config Attribute
Alexis La Goutte [Wed, 18 Jul 2018 05:40:12 +0000 (05:40 +0000)]
ISAKMP: Incorrect presentation of NETMASK for INTERNAL_IP4_SUBNET Config Attribute

Bug: 14987
Change-Id: I03c29026ec5c2d4b172bb49aff3f6877a9b9ab10
Reviewed-on: https://code.wireshark.org/review/28747
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
13 months agoPTP: Don't interpret UDP packets as 802.1as
Dylan Ulis [Thu, 19 Jul 2018 03:54:01 +0000 (23:54 -0400)]
PTP: Don't interpret UDP packets as 802.1as

Some fields were excluded/included when 802.1as is enabled. But, this
transportSpecific flag only applies over Ethernet, and not UDP.

Bug: 14990
Change-Id: I9d914ae3ee3ac15e81e79e9ea81b9449210ea01a
Reviewed-on: https://code.wireshark.org/review/28762
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
13 months agoExtcap programs must write to the packet pipe in binary mode.
Guy Harris [Thu, 19 Jul 2018 09:27:02 +0000 (02:27 -0700)]
Extcap programs must write to the packet pipe in binary mode.

It doesn't matter on UN*X, but it definitely matters on Windows; we're
writing a pcap file, not a text file, so every byte we write should go
down the pipe as is.

Bug: 14989
Change-Id: I26c067b8ff5dba644a579846dd97b568a81c7053
Reviewed-on: https://code.wireshark.org/review/28764
Reviewed-by: Guy Harris <guy@alum.mit.edu>
13 months agoWSUG: Update docs for 'Export Object'
Moshe Kaplan [Tue, 17 Jul 2018 03:31:40 +0000 (23:31 -0400)]
WSUG: Update docs for 'Export Object'

Change-Id: Ifab1a0d76d3ba81585d557a8a8b49351cdc6a002
Reviewed-on: https://code.wireshark.org/review/28734
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
13 months agoH.265: Parsing media format specific parameter from SDP.
Asaf Kave [Mon, 16 Jul 2018 11:23:50 +0000 (14:23 +0300)]
H.265: Parsing media format specific parameter from SDP.

Change-Id: I2607068671f370517b1f0a2f65f47a221b630d91
Reviewed-on: https://code.wireshark.org/review/28725
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
13 months agoTools: Remove parentheses around bug notes.
Gerald Combs [Tue, 17 Jul 2018 19:08:01 +0000 (12:08 -0700)]
Tools: Remove parentheses around bug notes.

Change-Id: Ib2eb24d769dceb6eaab152290e719ae35cad4dcb
Reviewed-on: https://code.wireshark.org/review/28742
Reviewed-by: Gerald Combs <gerald@wireshark.org>
13 months agoQt: Remove an unneeded function.
Gerald Combs [Mon, 16 Jul 2018 23:48:47 +0000 (16:48 -0700)]
Qt: Remove an unneeded function.

Remove MainWindow::createByteViewDialog, which was called once and
contained one line.

Change-Id: Ibe03db2c527b0a817d8b99df87d161405805bac3
Reviewed-on: https://code.wireshark.org/review/28733
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>
13 months agoQt: update to QCustomPlot 1.3.2
Peter Wu [Mon, 16 Jul 2018 22:20:01 +0000 (00:20 +0200)]
Qt: update to QCustomPlot 1.3.2

QCustomPlot 1.3.1 includes a fix for a crash ("Fixed potential crash in
QCPGraph::pointDistance if getScatterPlotData returns empty list").
Full changelog: http://www.qcustomplot.com/release/1.3.2/changelog.txt

The new files are based on QCustomPlot-source.tar.gz (1.3.2) with
Alexis' typo and license header changes from v1.99.2rc0-479-gc411029a3c
("Update to QCustomPlot 1.3.0") applied. All successive Wireshark
patches up to v2.5.0rc0-854-g6f28f1a59e ("Fix MacOS build") were
applied. The Retina patches ("Fix QCustmPlot retina problems." and "QCP:
Fix retina label calculations.") gave conflicts due contextual changes
which I resolved by renaming newCachedLabel to cachedLabel (following
the change in upstream commit baaad24706187f5be0a68011c780b51c4de11558).

Bug: 14971
Change-Id: I5012cb5a867891b466cbf1898fe4c28cbd11ba20
Reviewed-on: https://code.wireshark.org/review/28732
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
13 months agoTests: add minimal pytest support
Peter Wu [Fri, 6 Jul 2018 15:34:01 +0000 (17:34 +0200)]
Tests: add minimal pytest support

pytest is a powerful test framework. The initial motivation is to have
much better detailed reporting when a test fails, see for example
https://docs.pytest.org/en/latest/

Additionally, it has full parallelization support at the test level (via
the pytest-xdist plugin) instead of being limited to the suite level
(which currently has to be hard-coded via CMakeLists.txt).

Usage with the build dir in /tmp/wsbuild and src dir in /tmp/wireshark:

    export WS_BIN_PATH=/tmp/wsbuild/run
    pytest /tmp/wireshark/tests

For parallelization support and verbose printing:

    pip install pytest-xdist
    pytest -nauto -v /tmp/wireshark/tests

To limit yourself to a case based on a pattern:

    pytest -nauto -v /tmp/wireshark/tests -k test_unit_ctest_coverage

Tested on Arch Linux with Python 3.6.5, pytest-3.6.2, xdist-1.22.2.
pytest -n8 finished in 82 seconds while ctest -j8 required 87 seconds.

Change-Id: I832f4dd9f988d6656df795327e81610accf54b9f
Reviewed-on: https://code.wireshark.org/review/28651
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
13 months agowmem: make wmem_strsplit behave more like g_strsplit
Peter Wu [Mon, 16 Jul 2018 11:17:27 +0000 (13:17 +0200)]
wmem: make wmem_strsplit behave more like g_strsplit

In the past "g_strsplit" users were converted to use "wmem_strsplit" to
avoid memory leaks when dissection fails. The semantics were slightly
different though. When the DNS dissector tried to split the string "."
using delimiter ".", it would previously (unexpectedly) receive an empty
vector (and crash). Now it will receive a vector with one element.

Additionally, suggest that users of wmem_strsplit with a NULL allocator
use g_strsplit instead, otherwise it will leak the elements.

Bug: 14980
Change-Id: I408dfdb0ffa9e24ccdba69c8ee095abea72f6feb
Reviewed-on: https://code.wireshark.org/review/28724
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
13 months agoLPP: upgrade dissector to v15.0.0
Pascal Quantin [Tue, 17 Jul 2018 07:55:34 +0000 (09:55 +0200)]
LPP: upgrade dissector to v15.0.0

Change-Id: I8cb04749a772d9ed5fb191f584505d4b3096aa5e
Reviewed-on: https://code.wireshark.org/review/28735
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
13 months agoQt: Create the main display filter combo sooner.
Gerald Combs [Mon, 16 Jul 2018 16:06:39 +0000 (09:06 -0700)]
Qt: Create the main display filter combo sooner.

Construct MainWindow::df_combo_box_ in our initializer list, otherwise
anything that triggers a resizeEvent early on might result in an NPE.

Wait until everything is in place before calling setMinimumWidth.

Bug: 14979
Change-Id: I78b349f9c3ea53d8b1399a77169bbbd0a4a69191
Reviewed-on: https://code.wireshark.org/review/28728
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
14 months agoLua: add include/lua-5.1 and include/lua-5.2 to CMake path suffixes
Pascal Quantin [Mon, 16 Jul 2018 14:06:48 +0000 (16:06 +0200)]
Lua: add include/lua-5.1 and include/lua-5.2 to CMake path suffixes

Bug: 14983
Change-Id: I8be206ace7f61c62e2e42bc53841067ec39e3a0a
Reviewed-on: https://code.wireshark.org/review/28726
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
14 months agoextcap: Correct doc structure
Roland Knall [Mon, 16 Jul 2018 14:10:46 +0000 (16:10 +0200)]
extcap: Correct doc structure

Some issues in the developer doc have been corrected

Change-Id: I0d60e9080ef582dafa12607fb5ea43a8ae5d2d0f
Reviewed-on: https://code.wireshark.org/review/28727
Reviewed-by: Roland Knall <rknall@gmail.com>
14 months agoDOCSIS: fix null-pointer crash in OPT-RSP TLVs decoding
Peter Wu [Sun, 15 Jul 2018 16:06:25 +0000 (18:06 +0200)]
DOCSIS: fix null-pointer crash in OPT-RSP TLVs decoding

"tmp_fh->next" is NULL on the initial visit and thus
"tvb_get_guint8(tmp_fh->tvb_data,1)" crashes.

It is not entirely clear to me how reassembly should work in this DOCSIS
message, but based on the description in "6.4.45 OFDM Downstream Profile
Test Response (OPT-RSP)" in the DOCSIS MAC and Upper Layer Protocols
Interface Specification (CM-SP-MULPIv3.1-I07-150910), I suppose that it
was trying to support decoding of (a sequence of) TLVs where the value
is too large for a single frame.

Bug: 14954
Change-Id: I2eec91d0ca6356b2af61bfe55381c300c8872039
Fixes: v2.9.0rc0-1171-g738818fe4d ("DOCSIS: Added decoding for OPT (OFDM Downstream Profile Test) messages")
Reviewed-on: https://code.wireshark.org/review/28712
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
14 months agoSupply a 0s/0ns value for invalid time value lengths.
Guy Harris [Mon, 16 Jul 2018 04:16:16 +0000 (21:16 -0700)]
Supply a 0s/0ns value for invalid time value lengths.

Other routines that fetch values and can report a type/length error
without throwing an exception return a value, even if it's not the
appropriate value (as there is no appropriate value); make
get_time_value() do the same.

Ideally, we'd mark the protocol tree item, and the value, as being
invalid, and treat invalid values specially, but that's a bigger change
that would involve significantly more mucking about in the innards of
epan/proto.c as well as in code that looks at the protocol tree and at
field values, as well as deciding what the appropriate thing to do is
with a field with no value when, for example, -T {fields,pdml,json,ek,etc.}
is used.

Bug: 14957
Change-Id: Iab91198e560f52809d989cfce8b51b1b027cff73
Reviewed-on: https://code.wireshark.org/review/28722
Reviewed-by: Guy Harris <guy@alum.mit.edu>
14 months agoUpdate the comment giving I-D URLs.
Guy Harris [Sun, 15 Jul 2018 20:50:27 +0000 (13:50 -0700)]
Update the comment giving I-D URLs.

Change-Id: Id2ec0092369083b7bd6951c7121ac885c067ac1f
Reviewed-on: https://code.wireshark.org/review/28715
Reviewed-by: Guy Harris <guy@alum.mit.edu>
14 months ago[Automatic update for 2018-07-15]
Gerald Combs [Sun, 15 Jul 2018 08:15:00 +0000 (08:15 +0000)]
[Automatic update for 2018-07-15]

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

Change-Id: Ie42a61986a8001c57d04e62ba09f4c13e03d295f
Reviewed-on: https://code.wireshark.org/review/28704
Reviewed-by: Gerald Combs <gerald@wireshark.org>
14 months agoZBEE-NWK_GP: add key decryption during commissioning process
Julien Staub [Thu, 7 Jun 2018 09:09:21 +0000 (11:09 +0200)]
ZBEE-NWK_GP: add key decryption during commissioning process

Decrypt the key in commissioning and commissioning reply commands user keys.
The user must add the default TC-LK (as described in doc-09-5499-26) into the
key list for this feature to be visible.
Keys found in commissioning and commissioning reply commands are automatically
used for the reset of the capture

Use the SRC column to display the ZGP srcID

Bug: 13919
Change-Id: I90a7a7d1cdd003672bb2bd78e8ed76e1475d1208
Reviewed-on: https://code.wireshark.org/review/28084
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
14 months agoDHCPv6: device type is not mandatory for ecm.
Bruno Verstuyft [Thu, 12 Jul 2018 08:52:13 +0000 (10:52 +0200)]
DHCPv6: device type is not mandatory for ecm.

Change-Id: I295ff4e4225cdedc8928710002a042151a845514
Reviewed-on: https://code.wireshark.org/review/28686
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
14 months agoThe maximum offset in an IP option dissector is the length of the option.
Guy Harris [Sat, 14 Jul 2018 21:43:55 +0000 (14:43 -0700)]
The maximum offset in an IP option dissector is the length of the option.

It's *not* the sum of the length of the option and the length of the
option header.

Change-Id: I0b5ab0e35ca33dc02a0bc2501e0f0f531ec3f376
Reviewed-on: https://code.wireshark.org/review/28701
Reviewed-by: Guy Harris <guy@alum.mit.edu>
14 months agowmem_tree: describe tree traversal order
Matthieu Coudron [Thu, 5 Jul 2018 07:16:51 +0000 (16:16 +0900)]
wmem_tree: describe tree traversal order

it is an inorder traversal (left/parent/right).

Change-Id: Ia83efdfd45dab8c8386d84b3050af081312fde85
Reviewed-on: https://code.wireshark.org/review/28688
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
14 months agowmem_itree:update children max_edge after rotation
Matthieu Coudron [Thu, 5 Jul 2018 07:13:56 +0000 (16:13 +0900)]
wmem_itree:update children max_edge after rotation

After a rotation, the post_rotation callback was just updating the root
tree max_edge when it should also update its children since some of them
might have lost or changed children.
Any change in max_edge will bubble up/propagate to the parent.

Change-Id: Ia6705d71de5c85847d51f97f86fd35f4da20c03a
Reviewed-on: https://code.wireshark.org/review/28687
Reviewed-by: Anders Broman <a.broman58@gmail.com>
14 months agoPROFINET: Refactoring
gizem.yurdagul [Tue, 10 Jul 2018 10:41:52 +0000 (13:41 +0300)]
PROFINET: Refactoring

According to the prediction, some new features will be
added in the future. I'm working on the implementation
of these new features. dissect_PNIO_status is updated
as "extern" and transferred to the packet-pn.c.
Because upcoming feature will have own c file and it
will use this dissection. Thus, dependence between
classes will be decreased and duplicated code lines
will be prevented. So that future changes will be easier.

Change-Id: I067d9582dcc8b9909e5a9bc3ab5f30d3c879b226
Reviewed-on: https://code.wireshark.org/review/28677
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
14 months agoQt: try to sort numeric columns (such as ports) as number
Peter Wu [Fri, 6 Jul 2018 20:01:22 +0000 (22:01 +0200)]
Qt: try to sort numeric columns (such as ports) as number

Ensure that columns with numbers are sorted according to their numeric
value instead of their alphabetical order.

Bug: 11460
Change-Id: I6ccfb9d3699c7e95de4ed31eb9424c5687661593
Reviewed-on: https://code.wireshark.org/review/28652
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
14 months agomptcp: Correctly find mappings and reinjections
Matthieu Coudron [Tue, 19 Jun 2018 00:29:01 +0000 (09:29 +0900)]
mptcp: Correctly find mappings and reinjections

- removed mptcp.duplicated_dsn in favor of mptcp.reinjection_of/mptcp.reinjected_in
reinjected_in lists the packets where the DSN was later reinjected in.
reinjection_of lists the packets in which this DSN was already transmitted.
- There was a bug where the max_edge property of the interval tree was not
correctly updated. Right now wireshark gives a dsn for every TCP frame (even
empty packets).
- Now displays mappings only for packets with data (seglen > 0).
- Renamed dsn_map to dsn2packet_map and mappings to ssn2dsn_mappings.
- precises the complexity of enabling certain MPTCP options so that the user
better understand their impact on processing speed.

Change-Id: I24adc3161021b7f6a084763a74dc580f1c1f2c2e
Reviewed-on: https://code.wireshark.org/review/28326
Reviewed-by: Anders Broman <a.broman58@gmail.com>
14 months agogprscdr: Update to 3GPP TS 32.298 V15.3.0
Joakim Karlsson [Thu, 12 Jul 2018 10:57:18 +0000 (12:57 +0200)]
gprscdr: Update to 3GPP TS 32.298 V15.3.0

Change-Id: I48a02ab0321abbe793b7769e03e86c658c81499d
Reviewed-on: https://code.wireshark.org/review/28689
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
14 months agopfcp: Update to 3GPP TS 29.244 V15.2.0
Joakim Karlsson [Wed, 11 Jul 2018 23:19:26 +0000 (01:19 +0200)]
pfcp: Update to 3GPP TS 29.244 V15.2.0

Change-Id: I019b6b57156cc50bcf8b6462451932469e2c8fa1
Reviewed-on: https://code.wireshark.org/review/28685
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
14 months agopfcp: update Enterprise IE
Joakim Karlsson [Tue, 10 Jul 2018 10:52:05 +0000 (12:52 +0200)]
pfcp: update Enterprise IE

Missunderstanding of Length, Enterprise ID is not excluded in Length.

Remove removal of 8bit in IE type since Enterprise IE shall start with
value 32768.

Change-Id: Ie5c2e972cd893e41382ef9f07a5327ec05cf4141
Reviewed-on: https://code.wireshark.org/review/28680
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
14 months agoextcap: Create docbook documentation
Roland Knall [Tue, 10 Jul 2018 15:39:38 +0000 (17:39 +0200)]
extcap: Create docbook documentation

Move the information from README.extcap into docbook.

Change-Id: Ic6504787750d04fe6c66479896cba8d6148d804d
Reviewed-on: https://code.wireshark.org/review/28690
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
14 months agoCIP Motion: Update attribute service handling
Dylan Ulis [Mon, 9 Jul 2018 01:20:56 +0000 (21:20 -0400)]
CIP Motion: Update attribute service handling

1. Get/Set Axis Attribute List: Display the attribute name, and dissect where appropriate.
2. Minor: Cleanup exported functions/variables.

Bug: 14958
Change-Id: I2ff6883e66068472ac5ded0172f51575f5e20a21
Reviewed-on: https://code.wireshark.org/review/28660
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
14 months agoLTE RRC: upgrade dissector to v15.2.2
Pascal Quantin [Fri, 13 Jul 2018 08:21:59 +0000 (10:21 +0200)]
LTE RRC: upgrade dissector to v15.2.2

Change-Id: I405379c0a36e46e27ca9bcfc89c557b2e4ee9e0e
Reviewed-on: https://code.wireshark.org/review/28695
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
14 months agoCoAP: handle per packet data properly
Jaap Keuter [Thu, 12 Jul 2018 19:31:03 +0000 (21:31 +0200)]
CoAP: handle per packet data properly

Bug: 14966
Change-Id: I9c5c1da923a0cc2881465bcc484850d042a314d6
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/28694
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
14 months agoCOPS: fixed error codes
Bruno Verstuyft [Thu, 12 Jul 2018 13:05:53 +0000 (15:05 +0200)]
COPS: fixed error codes

Change-Id: If18f380fa813e1df234d5fd3bced806c419d154a
Reviewed-on: https://code.wireshark.org/review/28691
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
14 months agoAdd time_micros field to the riemann dissector
Romain Tartière [Thu, 12 Jul 2018 13:29:58 +0000 (15:29 +0200)]
Add time_micros field to the riemann dissector

This field was added in Riemann 0.2.13 and Riemann client 0.4.4:
https://github.com/riemann/riemann-java-client/commit/797e8db998dee01f98ae49848da016682a33250d

Change-Id: I132155d090725461f0e7df3d203dbe3d4a215f75
Reviewed-on: https://code.wireshark.org/review/28692
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
14 months agoFix URL to Riemann protobuf structures layout
Romain Tartière [Thu, 12 Jul 2018 13:32:42 +0000 (15:32 +0200)]
Fix URL to Riemann protobuf structures layout

Change-Id: I77693ccfdaac7be7bac7aa210b0984e196b73063
Reviewed-on: https://code.wireshark.org/review/28693
Reviewed-by: Roland Knall <rknall@gmail.com>
14 months agoQt: make "Save As" in Follow Streams usable
Peter Wu [Mon, 9 Jul 2018 22:33:24 +0000 (00:33 +0200)]
Qt: make "Save As" in Follow Streams usable

For formats other than "Raw" and "UTF-8", the written file does not
match the actual stream data. It would be duplicated in strange ways.
Executing the "Save As" action twice while the dialog is open would also
write two different files (huh?).

As a quick fix, just replace the strange save logic by writing the text
field contents. A functional difference is that previously it would
write data while parsing the "follow data" list, now it uses the text
field contents. That data will now be truncated after 500 MB.

Bug: 14933
Change-Id: I498676389d0da3ac070346d6903bd2e6b0fc7674
Fixes: v1.11.0-rc1-2538-g80f9326b2f ("Add TCP/UDP/SSL Follow feature to QtShark")
Reviewed-on: https://code.wireshark.org/review/28663
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
14 months agoDeviceNet: Add reference to spec name
Dylan Ulis [Wed, 11 Jul 2018 01:06:53 +0000 (21:06 -0400)]
DeviceNet: Add reference to spec name

Change-Id: Ibe7179ee58c7be2be223dd1ff11833fc86198d08
Reviewed-on: https://code.wireshark.org/review/28681
Reviewed-by: Guy Harris <guy@alum.mit.edu>
14 months agobtatt: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Thu, 5 Jul 2018 12:01:21 +0000 (12:01 +0000)]
btatt: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I1be03f0cadfe1a62ee5136daf8f5b875a983e5be
Reviewed-on: https://code.wireshark.org/review/28607
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
14 months agoGTPv2: Added missing string for value 1 of Secondary Rat Usage Report Type
Matej Tkac [Tue, 10 Jul 2018 07:30:57 +0000 (09:30 +0200)]
GTPv2: Added missing string for value 1 of Secondary Rat Usage Report Type

 Reference:    3GPP TS 29.274 V15.3.0 (2018-03), Table 8.132-1

Change-Id: Ibce9f8e2f2502a085d1368cacd0eaf6b8f5ef068
Reviewed-on: https://code.wireshark.org/review/28676
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
14 months agoIf we explicitly started a new page, print a column header line if necessary.
Guy Harris [Tue, 10 Jul 2018 04:45:33 +0000 (21:45 -0700)]
If we explicitly started a new page, print a column header line if necessary.

Change-Id: I9be7b41ce5ec5ece502035d0ca7c0fbb3eb3b37d
Ping-Bug: 14960
Reviewed-on: https://code.wireshark.org/review/28672
Reviewed-by: Guy Harris <guy@alum.mit.edu>
14 months agoExpand another comment to explain why we're ignoring empty lines.
Guy Harris [Tue, 10 Jul 2018 04:10:51 +0000 (21:10 -0700)]
Expand another comment to explain why we're ignoring empty lines.

Change-Id: Iafaeaffa1004ae741bdb4c6be91528f65aa06cfd
Reviewed-on: https://code.wireshark.org/review/28668
Reviewed-by: Guy Harris <guy@alum.mit.edu>
14 months agoNote that this code is checking for being on a new page.
Guy Harris [Tue, 10 Jul 2018 03:41:07 +0000 (20:41 -0700)]
Note that this code is checking for being on a new page.

Change-Id: Ib92292834bc00487958ff62584025e512de6d755
Reviewed-on: https://code.wireshark.org/review/28664
Reviewed-by: Guy Harris <guy@alum.mit.edu>
14 months agodns: fix off-by-one buffer overflow (write)
Peter Wu [Sun, 8 Jul 2018 13:10:15 +0000 (15:10 +0200)]
dns: fix off-by-one buffer overflow (write)

"maxname" is the size of the buffer which also includes the "null
label" (represented by the NUL byte). Do not write this past the end.

Bug: 14955
Change-Id: I51e2237741807aded7ffb82c178d7d7ce5123f78
Fixes: v2.9.0rc0-1142-g53e04b621c ("DNS: fix in expand_dns_name")
Reviewed-on: https://code.wireshark.org/review/28657
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Erika Szelleová <szelleerika@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
14 months agoH.265: implement Level bit rates, few general fixes.
Asaf Kave [Thu, 5 Jul 2018 14:16:24 +0000 (17:16 +0300)]
H.265: implement Level bit rates, few general fixes.

Fix wrong proto_tree_add_bits_item length, types for exp_golomb, sps_extension_4bits instead sps_scc_extension_flag.

Remove useless bit_offset assignment which, triggered a Clang warning.

Change-Id: Ibd6e5e9144df1feadbabbfe8498d33e4882f947f
Reviewed-on: https://code.wireshark.org/review/28609
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>