metze/wireshark/wip.git
8 years agoWindows: Remove the need for _CRT_NONSTDC_NO_DEPRECATE.
Gerald Combs [Mon, 11 Apr 2016 18:31:17 +0000 (11:31 -0700)]
Windows: Remove the need for _CRT_NONSTDC_NO_DEPRECATE.

Replace some function calls with their non-deprecated equivalents so
that we can remove _CRT_NONSTDC_NO_DEPRECATE from CMakeLists.txt and
config.nmake.

Leave _CRT_SECURE_NO_DEPRECATE in place. Removing it failed with 145
warnings and 72 errors.

Note that we could probably improve startup performance by using wmem
in diam_dict.*.

Change-Id: I6e130003de838aebedbdd1aa78c50de8a339ddcb
Reviewed-on: https://code.wireshark.org/review/14883
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoPCEP: add TRIGGERED-INITIAL-SYNC flag parsing and align
Francesco Fondelli [Tue, 12 Apr 2016 08:45:57 +0000 (10:45 +0200)]
PCEP: add TRIGGERED-INITIAL-SYNC flag parsing and align
capabilities to draft-ietf-pce-stateful-sync-optimizations-04

Change-Id: I602e6395939e6f870782f2d1a867d2663e4b15e2
Signed-off-by: Francesco Fondelli <francesco.fondelli@gmail.com>
Reviewed-on: https://code.wireshark.org/review/14892
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoAdd support for HTTP/SCTP.
Michael Tuexen [Tue, 12 Apr 2016 21:07:48 +0000 (23:07 +0200)]
Add support for HTTP/SCTP.

Initially use SCTP port 80, which has been assigned by IANA
for HTTP/SCTP.

Change-Id: I0f153371b68a15485f8c43e77cbffee8055775b4
Reviewed-on: https://code.wireshark.org/review/14895
Petri-Dish: Michael Tüxen <tuexen@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
8 years agobtbredr: fix NESTING_INDENT_MISMATCH (CID 1358479)
Alexis La Goutte [Tue, 12 Apr 2016 17:53:22 +0000 (19:53 +0200)]
btbredr: fix NESTING_INDENT_MISMATCH (CID 1358479)

Change-Id: I77840cf59afa71f0e773d13233f5390f67ffc01c
Reviewed-on: https://code.wireshark.org/review/14894
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoAdd more files to the pre-commit ignore list.
Gerald Combs [Tue, 12 Apr 2016 16:37:20 +0000 (09:37 -0700)]
Add more files to the pre-commit ignore list.

checkAPIs.pl will otherwise fail for the following files and functions:

epan/wmem/wmem_strbuf.c: strcpy
epan/wmem/wmem_strutil.c: vsprintf
wsutil/file_util.h: mkdir

Change-Id: I186730c8974499959233bd21f9b428c5d896a2b5
Reviewed-on: https://code.wireshark.org/review/14893
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
8 years agoDon't write to Protocol Column right away in packet-wreth.c
Edward Smith [Sun, 10 Apr 2016 01:46:11 +0000 (21:46 -0400)]
Don't write to Protocol Column right away in packet-wreth.c

Change-Id: Ic50d1f7658ff318cdfad6d6f4bad73fa87c21288
Reviewed-on: https://code.wireshark.org/review/14875
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agosshdump,ciscodump: fix local addresses discovery
Peter Wu [Tue, 12 Apr 2016 06:45:20 +0000 (08:45 +0200)]
sshdump,ciscodump: fix local addresses discovery

Fixes a NULL-deref when no interface addresses are discovered.

Remove NULL interface from list (an empty GSList is represented by NULL
while g_slist_alloc returns a list with a single NULL data).

Change-Id: I2eded40bb697e051445a526d1f34d8a50ef9ccd4
Reviewed-on: https://code.wireshark.org/review/14888
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoDon't use _snwprintf (use StringCchPrintf instead).
Jeff Morriss [Mon, 11 Apr 2016 14:48:18 +0000 (10:48 -0400)]
Don't use _snwprintf (use StringCchPrintf instead).

The MS docs say that StringCchPrintf() is safer.

Change-Id: Id3669ff75f2acb2218a8ef74cf0562e4ac3abb1e
Reviewed-on: https://code.wireshark.org/review/14880
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoQt: prevent input to the capture filter field during initialization
Peter Wu [Thu, 31 Mar 2016 21:20:26 +0000 (23:20 +0200)]
Qt: prevent input to the capture filter field during initialization

Mark the capture filter field as readonly until initialization is
completed. This avoids useless entries in the recent capture filters
list and fixes a use-after-free when typing during startup.

(This use-after free occurred when a new item is added to the recent
filters list which invalidates the previously retrieved list).

Change-Id: Ifae9444986436a60781bf5f83a6e650501ccc4d5
Reviewed-on: https://code.wireshark.org/review/14740
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoconfigure.ac: Use environment variable to set VERSION_FLAVOR
João Valverde [Mon, 11 Apr 2016 21:22:56 +0000 (22:22 +0100)]
configure.ac: Use environment variable to set VERSION_FLAVOR

Change-Id: I6889151878a2f83d295a7c749675a6c44575d608
Reviewed-on: https://code.wireshark.org/review/14886
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agocheckAPIs: Add links to banned functions.
Gerald Combs [Mon, 11 Apr 2016 17:32:50 +0000 (10:32 -0700)]
checkAPIs: Add links to banned functions.

Add links to Microsoft's "Security Development Lifecycle (SDL) Banned
Function Calls" and "Deprecated CRT Functions".

Change-Id: I6f1ffca8158b942fccb982868c6760c2c6e2d97c
Reviewed-on: https://code.wireshark.org/review/14881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoBluetooth: Add BR/EDR RF dissector
Michal Labedzki [Thu, 18 Dec 2014 14:54:38 +0000 (15:54 +0100)]
Bluetooth: Add BR/EDR RF dissector

Bluetooth BR/EDR RF dissector is pseudoheader with some
useful information to decode Bluetooth air packets.
This implements LINKTYPE_BLUETOOTH_BREDR_BB assigned
by tcpdump group.

Change-Id: I751d1f5d9c15650d93e6e8b2cc94294eb48c73de
Reviewed-on: https://code.wireshark.org/review/14760
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoDon't use the prohibited API open().
Jeff Morriss [Mon, 11 Apr 2016 14:43:24 +0000 (10:43 -0400)]
Don't use the prohibited API open().

This open call is Linux-specific (so there's no harm in using open() rather
than ws_open()) but this will keep checkAPIs happy.

Change-Id: I5695c1bd3b1a4af320ef0acfa1a8162c1d9f14e1
Reviewed-on: https://code.wireshark.org/review/14879
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoLua: Fix add and remove Fields when reload Lua plugins
Stig Bjørlykke [Sat, 9 Apr 2016 12:30:07 +0000 (14:30 +0200)]
Lua: Fix add and remove Fields when reload Lua plugins

Reset wslua_dfilter and remove the Field tap_listener when
reloading plugins.

Check for tap listeners in rescan_packets() after ws_epan_new()
because Lua may register the Lua field tap when adding Fields.

Bug: 12328
Change-Id: Ibbd8339033132c6f3b61d7e9c9ced9ed2b9affec
Reviewed-on: https://code.wireshark.org/review/14871
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years agoZigBee R22 Added support for new Link Power Delta command
Chris Brandson [Wed, 6 Apr 2016 15:13:52 +0000 (08:13 -0700)]
ZigBee R22 Added support for new Link Power Delta command

The R22 version of the ZigBee PRO Core Spec adds a Link Power Delta
command which is added by this update.

Change-Id: Ib07cf81ef30b243be3b5e82bf9bef7459ee0c806
Reviewed-on: https://code.wireshark.org/review/14830
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
8 years agowslua: Abort on out of memory
Peter Wu [Sat, 2 Apr 2016 22:12:32 +0000 (00:12 +0200)]
wslua: Abort on out of memory

The current wslua code does not properly handle out of memory
conditions. Since recovering from OOM is difficult in many places, just
abort the program (which is done by g_realloc).

Change-Id: Idae68d08c90c82ba5df18a28cc1e507d61d20e78
Reviewed-on: https://code.wireshark.org/review/14786
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agolua: fix reload with -Xlua_script
Peter Wu [Fri, 8 Apr 2016 21:28:45 +0000 (23:28 +0200)]
lua: fix reload with -Xlua_script

Use ex_opt_get_nth instead of ex_opt_get_next to avoid consuming the
parameters. This ensures that lua scripts via the "-Xlua_script"
parameter are also reloaded.

Change-Id: I316726cdf99f7ee3d738d3632a7f639ea8596f96
Reviewed-on: https://code.wireshark.org/review/14870
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years ago[Automatic update for 2016-04-10]
Gerald Combs [Sun, 10 Apr 2016 15:11:01 +0000 (08:11 -0700)]
[Automatic update for 2016-04-10]

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

Change-Id: Ibb63f9cb5cacb3b25f2038912a53d170be9cdaee
Reviewed-on: https://code.wireshark.org/review/14876
Reviewed-by: Gerald Combs <gerald@wireshark.org>
8 years agoMake sure inet_ipv6.h is in the distribution tarball.
Guy Harris [Sun, 10 Apr 2016 00:17:36 +0000 (17:17 -0700)]
Make sure inet_ipv6.h is in the distribution tarball.

Change-Id: Icff2711f4b2a8fe679f10331e0749e3274e3c02e
Reviewed-on: https://code.wireshark.org/review/14874
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years ago[GTK] Check for xdg-open at run time
João Valverde [Mon, 4 Apr 2016 01:25:01 +0000 (02:25 +0100)]
[GTK] Check for xdg-open at run time

Remove HTML_VIEWER compile-time setting.

If xdg-open doesn't exist use user web browser preference as fallback.

Change-Id: I3b4a4a1a36b0192d75f2c97595f37d0d88a0941e
Reviewed-on: https://code.wireshark.org/review/14805
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoMove IPv6 address utility functions to wsutil
João Valverde [Fri, 8 Apr 2016 04:18:13 +0000 (05:18 +0100)]
Move IPv6 address utility functions to wsutil

Change-Id: Ica8babbf4760b02e4840557fc61241152b2763c5
Reviewed-on: https://code.wireshark.org/review/13025
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoMove a declaration to wsutil
João Valverde [Fri, 8 Apr 2016 04:16:19 +0000 (05:16 +0100)]
Move a declaration to wsutil

This fixes the wsutil dependency on libwireshark.

Change-Id: Ic82e769ce39ad0a8c800d371cfa6bd300849fee1
Reviewed-on: https://code.wireshark.org/review/14859
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoUpdate USBPcap installer packaged in our Windows installer and add a warning
Pascal Quantin [Thu, 7 Apr 2016 18:26:37 +0000 (20:26 +0200)]
Update USBPcap installer packaged in our Windows installer and add a warning

The newer version creates a system restore point during installation
Also add an explicit note in Wireshark installer explaining that USBPcap is
experimental and some hints on how to recover in case of issue

Bug: 12316
Change-Id: Ifb15ee98bf9db843debe5878f3df8c78f846d8d0
Reviewed-on: https://code.wireshark.org/review/14854
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoWmem: Use the native v*printf routines on Windows.
Gerald Combs [Fri, 8 Apr 2016 16:38:54 +0000 (09:38 -0700)]
Wmem: Use the native v*printf routines on Windows.

GLib's v*printf routines are close to unreasonably slow on
Windows. Use the native CRT routines in wmem_strdup_vprintf and
wmem_strbuf_append_vprintf on that platform.

Change-Id: I5e94aa6fe47434e5a18f3a4d5b6b24ebe71499c1
Reviewed-on: https://code.wireshark.org/review/14868
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoReplace and remove host_ip_af() function
João Valverde [Tue, 22 Mar 2016 03:24:35 +0000 (03:24 +0000)]
Replace and remove host_ip_af() function

Change-Id: I932c156cbc6883d1d63bf0457fd62cfb67c3340e
Reviewed-on: https://code.wireshark.org/review/14750
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoUse a single WS_NORETURN macro
Peter Wu [Tue, 5 Apr 2016 20:49:05 +0000 (22:49 +0200)]
Use a single WS_NORETURN macro

Having to define two macros for marking a function as never returning
seems a bit redundant. Merge the MSVC and GCC-like attributes into a
single WS_NORETURN.

Tested with Clang 3.7.1, GCC 4.4.7 and even GCC 4.1.2 using this small
program (-Wall -Wextra, the first two generate warnings for
uninitialized variables, the last one compiles without warnings):

    #include <stdlib.h>
    __attribute__((noreturn)) void foo() { exit(1); }
    __attribute__((noreturn)) void bar();
    void bar() { exit(1); }
    int main() {
      int j, i;
      if (i) { bar(); return j; }
      foo();
      return j;
    }

Change-Id: I7d19c15e61b8f8fa4936864407199c4109f8cc82
Reviewed-on: https://code.wireshark.org/review/14822
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoFix CMake VC Redist message
Graham Bloice [Fri, 8 Apr 2016 13:25:05 +0000 (14:25 +0100)]
Fix CMake VC Redist message

The usage message was using the wrong variable

Change-Id: I5ca261240db49134f3d48a5e322d9272f8af7adf
Reviewed-on: https://code.wireshark.org/review/14865
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
8 years agoRTPS: Added vendor-specific submessage RTI_CRC
Juanjo Martin [Fri, 8 Apr 2016 09:37:41 +0000 (11:37 +0200)]
RTPS: Added vendor-specific submessage RTI_CRC

Added the submessage and prepared the code paths so it is easy to add
more vendor-specific submessages (from any vendor)

Change-Id: I47aa35d64839cd04eb35f7f8fdd94ef1324570fb
Reviewed-on: https://code.wireshark.org/review/14864
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agoRADIUS: Update Aruba Dictionary
Alexis La Goutte [Fri, 8 Apr 2016 08:40:52 +0000 (10:40 +0200)]
RADIUS: Update Aruba Dictionary

Add Aruba-Calea-Server-Ip (41) and Aruba-Admin-Path (42)

Change-Id: I95411a68e4c84032f4e4bf5c240f145eb0ea238c
Reviewed-on: https://code.wireshark.org/review/14863
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoFix a typo
AndersBroman [Fri, 8 Apr 2016 07:56:28 +0000 (09:56 +0200)]
Fix a typo

Change-Id: I32c551fc39ef496e8bbaba288c4ad4dafa2412c9
Reviewed-on: https://code.wireshark.org/review/14862
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agopacket_list: fix Called C++ object pointer is null found by Clang Analyzer
Alexis La Goutte [Wed, 6 Apr 2016 16:27:05 +0000 (18:27 +0200)]
packet_list: fix Called C++ object pointer is null found by Clang Analyzer

Change-Id: Ie1a16973e94f09eeacea770936f9a9b4ab82b01d
Reviewed-on: https://code.wireshark.org/review/14838
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years ago[MSVC2015] Fix finding of vcredist when using MSVC2015.
AndersBroman [Wed, 6 Apr 2016 15:25:18 +0000 (17:25 +0200)]
[MSVC2015] Fix finding of vcredist when using MSVC2015.

Change-Id: I23ddc8c7601e61c7c092a258e4e540bc475e020a
Reviewed-on: https://code.wireshark.org/review/14831
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoMinor lemon Makefile.am fixup
João Valverde [Fri, 8 Apr 2016 04:34:31 +0000 (05:34 +0100)]
Minor lemon Makefile.am fixup

Change-Id: I80108d565e40835e9bf3fa58b1999735a45d77f0
Reviewed-on: https://code.wireshark.org/review/14860
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoFix nmake build
Michael Mann [Thu, 7 Apr 2016 22:11:57 +0000 (18:11 -0400)]
Fix nmake build

Change-Id: Ieadfe3f4a23b721e32709a45660756d264bc4ec2
Reviewed-on: https://code.wireshark.org/review/14856
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoUse faster string functions at startup.
Gerald Combs [Thu, 7 Apr 2016 20:05:27 +0000 (13:05 -0700)]
Use faster string functions at startup.

Use wmem_strconcat and g_strconcat instead of wmem_strdup_printf and
g_strdup_printf when we register various protocols. This shows a fairly
significant speedup in the Visual Studio profiler.

Change-Id: I98709329513daa66ad3665925dc69149c43df884
Reviewed-on: https://code.wireshark.org/review/14855
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
8 years agoRemove -Warray-bounds, it is enabled by default with -Wall
João Valverde [Tue, 15 Mar 2016 01:37:06 +0000 (01:37 +0000)]
Remove -Warray-bounds, it is enabled by default with -Wall

Change-Id: If2041c66ccdf8a975d660524c793d45aa9f80623
Reviewed-on: https://code.wireshark.org/review/14852
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoRevert "Try to suppress a compiler feature that goes wrong."
João Valverde [Thu, 7 Apr 2016 18:00:19 +0000 (19:00 +0100)]
Revert "Try to suppress a compiler feature that goes wrong."

This reverts commit ec075789e31942008eb8ad7faf35b7012778dac8.

Change-Id: I6f84f01f2027f32d3727dd9d7d097d6d90e063c2
Reviewed-on: https://code.wireshark.org/review/14851
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoDon't build lemon using -Werror
João Valverde [Thu, 7 Apr 2016 17:42:01 +0000 (18:42 +0100)]
Don't build lemon using -Werror

Change-Id: I0b7d691616578e8d5897b60fc31a469c9ab81607
Reviewed-on: https://code.wireshark.org/review/14850
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoautotools: Use AC_SUBST to set -Werror flag
João Valverde [Mon, 7 Mar 2016 18:43:28 +0000 (18:43 +0000)]
autotools: Use AC_SUBST to set -Werror flag

Change-Id: I34a90155ab613ca97bf58b72f56ec08eff87d3ab
Reviewed-on: https://code.wireshark.org/review/14849
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoIPMI (picmg): fix 'ipmi.picmg25.fault' exists multiple times with NOT compatible...
Alexis La Goutte [Wed, 6 Apr 2016 16:33:04 +0000 (18:33 +0200)]
IPMI (picmg): fix 'ipmi.picmg25.fault' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT8

Change-Id: Icaf0611166eba18b166a8bdc870bab20916ea666
Reviewed-on: https://code.wireshark.org/review/14840
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoIAX2: fix 'iax2.video.marker' exists multiple times with NOT compatible types: FT_BOO...
Alexis La Goutte [Wed, 6 Apr 2016 16:31:08 +0000 (18:31 +0200)]
IAX2: fix 'iax2.video.marker' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT16

Change-Id: I12895f2a08c8a4d8408f109f5aebb53555f458d5
Reviewed-on: https://code.wireshark.org/review/14839
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoL2TP: fix 'l2tp.avp.csu.current_t/rx_speed' exists multiple times with NOT compatible...
Alexis La Goutte [Wed, 6 Apr 2016 16:35:24 +0000 (18:35 +0200)]
L2TP: fix 'l2tp.avp.csu.current_t/rx_speed' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32

Change-Id: I9d871dd6eb100bf7dd2331122a6a88669ce978cb
Reviewed-on: https://code.wireshark.org/review/14841
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoconfigure.ac: Move a test
João Valverde [Thu, 7 Apr 2016 13:11:54 +0000 (14:11 +0100)]
configure.ac: Move a test

Change-Id: Icf9bd86583df43ab8b7748c9f6828d187ebbc0a4
Reviewed-on: https://code.wireshark.org/review/14847
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoBring back the hotkey for "w" in "... without saving"
Jiří Engelthaler [Thu, 7 Apr 2016 08:36:22 +0000 (10:36 +0200)]
Bring back the hotkey for "w" in "... without saving"

The hotkey was intentionally removed in Ie505650889212082e088a525f4b82e62b9177b0d.
The hotkey is present in GTK version but missing in QT version.

Change-Id: Id54e704cd0398b4f07f00c9d1d298409b90d927b
Reviewed-on: https://code.wireshark.org/review/14845
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years agoAdd URL for the Linux Documentation dir file describing USB/IP.
Guy Harris [Thu, 7 Apr 2016 08:35:57 +0000 (01:35 -0700)]
Add URL for the Linux Documentation dir file describing USB/IP.

Change-Id: I43f02c3d3350e7852c54df3efb977ae266726a8c
Reviewed-on: https://code.wireshark.org/review/14844
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoCIP: Attribute updates
D. Ulis [Thu, 7 Apr 2016 01:17:34 +0000 (21:17 -0400)]
CIP: Attribute updates

1. Switched to common way to parse Get Attr All, using dissect_cip_get_attribute_all_rsp, for CCO (class version) and CIP Validator. This also fixed a missing attribute in the old CIP Validator code.
2. Add cip_string2 attribute implementation
3. For CIP Validator, set the protocol as "CIPS Validator", previously this was "CIPS Supervisor".
4. For classes with subdissectors, add the service to the Info column in the response.

Change-Id: Id9593ca39497261075df8146cf63ee9581462e2a
Reviewed-on: https://code.wireshark.org/review/14837
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agoExpand before multiply (CID-1355683 and CID-1355684)
Jaap Keuter [Tue, 5 Apr 2016 22:00:25 +0000 (00:00 +0200)]
Expand before multiply (CID-1355683 and CID-1355684)

Cast the value before multiplication to prevent overflow.

Change-Id: I673e9e3e869e326ba3d23c3a2100e274e9dc7566
Reviewed-on: https://code.wireshark.org/review/14823
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
8 years agoCast away a warning.
Guy Harris [Thu, 7 Apr 2016 00:27:55 +0000 (17:27 -0700)]
Cast away a warning.

Alas, QByteArray's constructor takes an int, not a size_t, as a size.
Explicitly cast the size down to an int.

Change-Id: Idc24b5920e8e417dd8555628d685f94224fe47e1
Reviewed-on: https://code.wireshark.org/review/14836
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoQt: Follow stream performance improvements.
Gerald Combs [Tue, 1 Mar 2016 00:34:32 +0000 (16:34 -0800)]
Qt: Follow stream performance improvements.

Make FollowStreamText a subclass of QPlainTextEdit instead of QTextEdit.
For large amounts of text, the former should be less unbearably slow
than the latter. Increase the maximum stream size to 500MB. This isn't
perfect but it's much more usable than 2MB and much easier than the next
step, which is to write our own text display widget.

Process UI events while we fill in the stream data. This gives us
behavior similar to the GTK+ UI and is similar to what we do in other
dialogs.

Switch from g_memdup+g_free to a QByteArray in the Qt UI and GByteArray
in the GTK+ UI.

Don't call readStream twice.

Make sure we free all of our stream data in the Qt UI. This fixes a
serious memory leak.

Ping-Bug: 11777
Change-Id: Ibad9bde86692ae07a80660566d1e661ab8b64601
Reviewed-on: https://code.wireshark.org/review/14271
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
8 years agoAdd support for the I-FORWARD-TSN chunk.
Michael Tuexen [Wed, 6 Apr 2016 18:37:24 +0000 (15:37 -0300)]
Add support for the I-FORWARD-TSN chunk.

Change-Id: I4b9d2c33ba4d19bb542c11660f298ad2ff7e52c6
Reviewed-on: https://code.wireshark.org/review/14832
Petri-Dish: Michael Tüxen <tuexen@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
8 years agozvt: fix parsing of the 3-byte length field
Martin Kaiser [Wed, 6 Apr 2016 21:22:13 +0000 (23:22 +0200)]
zvt: fix parsing of the 3-byte length field

if the first length byte is 0xff, the actual length is the last
two bytes interpreted as little endian

Change-Id: I098ce428888147ad9ca0a30c3ed451d1f89eace7
Reviewed-on: https://code.wireshark.org/review/14834
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years agoconfigure.ac: fix a help string
Martin Kaiser [Wed, 6 Apr 2016 20:01:23 +0000 (22:01 +0200)]
configure.ac: fix a help string

Change-Id: I9b079caae968dbccf5015da91d97f5a8881d2a1a
Reviewed-on: https://code.wireshark.org/review/14833
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years agoandroiddump: Change insecure sprint into g_snprintf
Michal Labedzki [Mon, 14 Mar 2016 07:09:54 +0000 (08:09 +0100)]
androiddump: Change insecure sprint into g_snprintf

This avoid potential overflows.

Bug: 12093
Change-Id: Icbfe4a9f04c5f8d4e0284e4800d4775773246abf
Reviewed-on: https://code.wireshark.org/review/14762
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
8 years agoSet the extra type the right way.
Guy Harris [Tue, 5 Apr 2016 23:31:49 +0000 (16:31 -0700)]
Set the extra type the right way.

Use %option extra_type= rather than #defining YY_EXTRA_TYPE.

Change comments to reflect that the state structure is used both by the
lexical analyzer and the parser.

Change-Id: I19a81de61cbd6e86d71154f376ef0681cc6d42fb
Reviewed-on: https://code.wireshark.org/review/14826
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoExpand a comment.
Guy Harris [Tue, 5 Apr 2016 23:10:56 +0000 (16:10 -0700)]
Expand a comment.

Change-Id: I13732bb2877a41b5f5d018128e05ebd4bfb6a1bf
Reviewed-on: https://code.wireshark.org/review/14825
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoGet rid of extra %noyyalloc etc. stuff.
Guy Harris [Tue, 5 Apr 2016 22:57:30 +0000 (15:57 -0700)]
Get rid of extra %noyyalloc etc. stuff.

Change-Id: I2af498202981a43d0f50cf014fba9116875d2819
Reviewed-on: https://code.wireshark.org/review/14824
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years ago[ERF] g_list_free_full () is glib >= 2.28, g_hash_table_add is >= 2.32
AndersBroman [Tue, 5 Apr 2016 13:32:56 +0000 (15:32 +0200)]
[ERF] g_list_free_full () is glib >= 2.28, g_hash_table_add is >= 2.32
change to supported functions.

Change-Id: Ic088b835d05dce4a1b9b7a102cab89be44da46d6
Reviewed-on: https://code.wireshark.org/review/14819
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoconfigure.ac: Update libtool macros (version bump)
João Valverde [Mon, 4 Apr 2016 05:41:28 +0000 (06:41 +0100)]
configure.ac: Update libtool macros (version bump)

Obviate the need for libtool bug work around.

Requires libtool 2.2.2 as the first fully working release of the
2.0 branch.

Change-Id: I925f44f06b4c8e3bb06d356308afe1bde1b149f3
Reviewed-on: https://code.wireshark.org/review/14811
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoUse AC_CONFIG_FILES
João Valverde [Sat, 26 Mar 2016 06:18:05 +0000 (06:18 +0000)]
Use AC_CONFIG_FILES

AC_OUTPUT with arguments is obsolescent.

Change-Id: Ibd53f5db1137ec34c70e22ac73385f379aa5d6e5
Reviewed-on: https://code.wireshark.org/review/14816
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
8 years ago802.15.4 added support for the new ZigBee IEs
Chris Brandson [Mon, 21 Mar 2016 22:41:10 +0000 (15:41 -0700)]
802.15.4 added support for the new ZigBee IEs

ZigBee has added new 802.15.4 Information Elements, defined in
Annex D.8 of ZigBee Specification R22. Specifically this is the
Enhanced Beacon Payload IE, TX Power, and Rejoin IEs.

Change-Id: Ic54b92c6d1f6437dc7888d10e9ae63453eb60e1d
Reviewed-on: https://code.wireshark.org/review/14547
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoRemove obsolete automake implicit rule
João Valverde [Tue, 5 Apr 2016 02:52:32 +0000 (03:52 +0100)]
Remove obsolete automake implicit rule

Change-Id: I75df2d5ede18b91b218748b8de224ad02257b449
Reviewed-on: https://code.wireshark.org/review/14817
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoAdd more stuff to the release tarball.
Guy Harris [Tue, 5 Apr 2016 02:34:09 +0000 (19:34 -0700)]
Add more stuff to the release tarball.

Sort some lists in Makefile.common while we're at it.

Change-Id: I888078f30f7bbe6e5b20e2142c43211e3eb11e31
Reviewed-on: https://code.wireshark.org/review/14815
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoMore distcheck fixes
João Valverde [Tue, 5 Apr 2016 02:02:03 +0000 (03:02 +0100)]
More distcheck fixes

Fixes 7f873d92cb7038247ab578d14d7e4794dcd6d98b. Replacement function
header files are not automatically added to the distribution
tarball.

Move libwsutil_la_SOURCES for better readability.

Change-Id: I75699a0aa8681d94701931467c9290d9c7c140ac
Reviewed-on: https://code.wireshark.org/review/14814
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoPut popcount.c and popcount.h into the release tarball.
Guy Harris [Tue, 5 Apr 2016 01:54:21 +0000 (18:54 -0700)]
Put popcount.c and popcount.h into the release tarball.

Change-Id: I77fcd9e6f38d0cc3d4a018c540b8faa98db0da7b
Reviewed-on: https://code.wireshark.org/review/14813
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoFix VPATH build
João Valverde [Tue, 5 Apr 2016 01:12:02 +0000 (02:12 +0100)]
Fix VPATH build

Fixup for ecb4dc396ef71feb67aeda7603e09b0cea0bc920.

Change-Id: I3230e0ca203deb15dde8f22806307d59d70e05dd
Reviewed-on: https://code.wireshark.org/review/14812
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoUse AC_REPLACE_FUNCS and LTLIBOBJS
João Valverde [Sun, 27 Mar 2016 00:32:57 +0000 (00:32 +0000)]
Use AC_REPLACE_FUNCS and LTLIBOBJS

Change-Id: I0f46167fe900c39d678560809cd5391c2a9bc4d2
Reviewed-on: https://code.wireshark.org/review/14809
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoAvoid unnecessary replacement source file floorl.c
João Valverde [Mon, 4 Apr 2016 22:06:50 +0000 (23:06 +0100)]
Avoid unnecessary replacement source file floorl.c

Change-Id: If282cb22dcf099559cbe8acd5b1affd07155af8c
Reviewed-on: https://code.wireshark.org/review/14808
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoFix 'make dist' ws_diag_control.h dependency
João Valverde [Mon, 4 Apr 2016 23:40:18 +0000 (00:40 +0100)]
Fix 'make dist' ws_diag_control.h dependency

Change-Id: Ice9e40700631aed3ec0246232e287735ead22146
Reviewed-on: https://code.wireshark.org/review/14810
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoInclude ws_diag_control.h in config.h
João Valverde [Mon, 14 Mar 2016 19:03:11 +0000 (19:03 +0000)]
Include ws_diag_control.h in config.h

Change-Id: Ia394071710ecda3b0e6686a51fbca45a8ff20317
Reviewed-on: https://code.wireshark.org/review/14749
Petri-Dish: João Valverde <j@v6e.pt>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoautotools: Clean up libm tests
João Valverde [Thu, 24 Mar 2016 05:01:57 +0000 (05:01 +0000)]
autotools: Clean up libm tests

Change-Id: I01bef4d6c2cf2280935d573166652d905948028d
Reviewed-on: https://code.wireshark.org/review/14806
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoRADIUS: more formatting/white space cleanup.
Jeff Morriss [Mon, 4 Apr 2016 20:32:54 +0000 (16:32 -0400)]
RADIUS: more formatting/white space cleanup.

Change-Id: I34c467c0bf602c9e866df55f25187a750aac4e88
Reviewed-on: https://code.wireshark.org/review/14807
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
8 years agoDNS: change ttl from uint32 to int32.
Dario Lombardo [Fri, 1 Apr 2016 10:39:38 +0000 (12:39 +0200)]
DNS: change ttl from uint32 to int32.

As stated in the RFC1035 the TTL is a signed int.

https://tools.ietf.org/html/rfc1035#section-3.2.1

Change-Id: I07e57309f83f1877b1b4cb6a085bc3dabf053379
Reviewed-on: https://code.wireshark.org/review/14759
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoRename "libz" to "zlib"
João Valverde [Fri, 1 Apr 2016 00:32:56 +0000 (01:32 +0100)]
Rename "libz" to "zlib"

Change-Id: I12f92c983d587c2a4751428cdf299635090c9f0b
Reviewed-on: https://code.wireshark.org/review/14748
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoRemove synchronous DNS name resolution
João Valverde [Sat, 26 Mar 2016 03:16:17 +0000 (03:16 +0000)]
Remove synchronous DNS name resolution

Change-Id: Ie5e670b769eb0674950f3679ef511047641c2873
Reviewed-on: https://code.wireshark.org/review/14751
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoandroiddump: Fix crash on start capturing
Michal Labedzki [Sun, 13 Mar 2016 18:04:06 +0000 (19:04 +0100)]
androiddump: Fix crash on start capturing

Wiretap require registration right now. Do it.

Change-Id: I7ec4c4a4c6d3fa6625fff970f7f39f1ab74e3ef5
Reviewed-on: https://code.wireshark.org/review/14761
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoDon't double-close the input.
Guy Harris [Mon, 4 Apr 2016 01:55:28 +0000 (18:55 -0700)]
Don't double-close the input.

Change-Id: I9b345ee28a59596369efac8bdd0a51447d723017
Reviewed-on: https://code.wireshark.org/review/14803
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoDon't double-close the input.
Guy Harris [Mon, 4 Apr 2016 01:27:33 +0000 (18:27 -0700)]
Don't double-close the input.

Change-Id: I3f02227f9cda2ad4c878e2a736923919e10fbf25
Reviewed-on: https://code.wireshark.org/review/14802
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoAfter the move of zlib test we need to add ZLIB_CFLAGS
AndersBroman [Sun, 3 Apr 2016 19:56:30 +0000 (21:56 +0200)]
After the move of zlib test we need to add ZLIB_CFLAGS

Change-Id: Idee028bb6962a7a50d13ec45b41b71410fb92c6e
Reviewed-on: https://code.wireshark.org/review/14799
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoRRC: upgrade dissector to v13.2.0
Pascal Quantin [Sun, 3 Apr 2016 20:56:56 +0000 (22:56 +0200)]
RRC: upgrade dissector to v13.2.0

Change-Id: Id2f7b90549057accf23b040cafcee738a2c0d9ee
Reviewed-on: https://code.wireshark.org/review/14800
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoFix #defines.
Guy Harris [Sun, 3 Apr 2016 22:41:55 +0000 (15:41 -0700)]
Fix #defines.

Change-Id: I0fcd865d686d50ae9be17e97a4495daebc4bc4fc
Reviewed-on: https://code.wireshark.org/review/14801
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoMake the Flex scanners and YACC parser in libraries reentrant.
Guy Harris [Thu, 31 Mar 2016 01:44:01 +0000 (18:44 -0700)]
Make the Flex scanners and YACC parser in libraries reentrant.

master-branch libpcap now generates a reentrant Flex scanner and
Bison/Berkeley YACC parser for capture filter expressions, so it
requires versions of Flex and Bison/Berkeley YACC that support that.

We might as well do the same.  For libwiretap, it means we could
actually have multiple K12 text or Ascend/Lucent text files open at the
same time.  For libwireshark, it might not be as useful, as we only read
configuration files at startup (which should only happen once, in one
thread) or on demand (in which case, if we ever support multiple threads
running libwireshark, we'd need a mutex to ensure that only one file
reads it), but it's still the right thing to do.

We also require a version of Flex that can write out a header file, so
we change the runlex script to generate the header file ourselves. This
means we require a version of Flex new enough to support --header-file.

Clean up some other stuff encountered in the process.

Change-Id: Id23078c6acea549a52fc687779bb55d715b55c16
Reviewed-on: https://code.wireshark.org/review/14719
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoLTE RRC: upgrade dissector to v13.1.0
Pascal Quantin [Sun, 3 Apr 2016 15:46:52 +0000 (17:46 +0200)]
LTE RRC: upgrade dissector to v13.1.0

Change-Id: I830c97f6f228a61b942f3b4df46ccdd22a043b5e
Reviewed-on: https://code.wireshark.org/review/14796
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoInclude json.h with quotes, not angle brackets.
Guy Harris [Sun, 3 Apr 2016 17:29:26 +0000 (10:29 -0700)]
Include json.h with quotes, not angle brackets.

Change-Id: I9fdb38ca724ec1a76126a956c7f7b07fd4c1ddb0
Reviewed-on: https://code.wireshark.org/review/14798
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoUse quotes, not angle brackets, for wtap-int.h and file_wrappers.h.
Guy Harris [Sun, 3 Apr 2016 17:14:40 +0000 (10:14 -0700)]
Use quotes, not angle brackets, for wtap-int.h and file_wrappers.h.

This is consistent with what the rest of the files do, and doesn't
require that the compiler explicitly be told to treat the current
directory as an include directory.

Change-Id: Iefaedd2acc936f45d5095546f8dea7167d2e88c8
Reviewed-on: https://code.wireshark.org/review/14797
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agowsutil: Remove getenv_utf8(), replaced with g_getenv()
João Valverde [Thu, 31 Mar 2016 03:38:51 +0000 (04:38 +0100)]
wsutil: Remove getenv_utf8(), replaced with g_getenv()

Replace getenv() calls in filesystem.c too for consistency.

Change-Id: I31425179290e556e6696953531989d93777adf92
Reviewed-on: https://code.wireshark.org/review/14752
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: João Valverde <j@v6e.pt>
Tested-by: João Valverde <j@v6e.pt>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoDon't deref before NULL check on pointer (CID-1358044)
Jaap Keuter [Sat, 2 Apr 2016 11:13:23 +0000 (13:13 +0200)]
Don't deref before NULL check on pointer (CID-1358044)

When the state pointer is NULL it's defensively coded against by a
NULL pointer check. Variable initialization before should then not
dereference that pointer.

Change-Id: I0ed09e2f22be5651324f43fc3fd339d2f95684c0
Reviewed-on: https://code.wireshark.org/review/14776
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoreassemble: remove special treatment for truncated data
Peter Wu [Tue, 23 Feb 2016 00:56:45 +0000 (01:56 +0100)]
reassemble: remove special treatment for truncated data

Do not try to recover from truncated tvbs for fragment_add_seq-like
functions:

 - If it is the first block and the dissector requested frag_data_len
   number of bytes, we should not lie and pretend that we are fully
   reassembled.
 - For other blocks, returning NULL as no reassembly was possible makes
   sense. But other fragments in the list should not be cleared as there
   may be partial fragments which were returned before.

It seems that this special behavior was introduced in
b2c11b5e13248b1c98ee5104eab411e842911e19 (freeing fragments and
returning NULL as an optimization when fragments are deemed not needed
anymore) and faeb2c2ee16e61e54c880163e98d6528dd0c5619 (for returning
fd_head for the first fragment, "so the first fragment gets dissected as
fragmented packet").

Now in theory unused fragments could stick around, but that also
possible with the normal fragment_add functions.

Bug: 11799
Change-Id: I20829c54e1b2eee25a91fe4de51b19b1458c7789
Reviewed-on: https://code.wireshark.org/review/14082
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years ago[Automatic update for 2016-04-03]
Gerald Combs [Sun, 3 Apr 2016 15:10:48 +0000 (08:10 -0700)]
[Automatic update for 2016-04-03]

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

Change-Id: I454d61dea623c65dbe425c8ad3f354452ce0c6a5
Reviewed-on: https://code.wireshark.org/review/14793
Reviewed-by: Gerald Combs <gerald@wireshark.org>
8 years agoDon't use <wtap.h> to refer to the main libwiretap header file.
Guy Harris [Sun, 3 Apr 2016 06:31:37 +0000 (23:31 -0700)]
Don't use <wtap.h> to refer to the main libwiretap header file.

Either use "wtap.h", if it's only for files in the wiretap directory, or
<wiretap/wtap.h>, if it's also a header that stuff outside libwiretap
can include.

Change-Id: If1c71b3dae9a3c0d64661ae1734f925319e447d1
Reviewed-on: https://code.wireshark.org/review/14788
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoFix cmake libwsutil zlib missing linkage
João Valverde [Sun, 3 Apr 2016 04:53:12 +0000 (05:53 +0100)]
Fix cmake libwsutil zlib missing linkage

Change-Id: I803f5fee26d2f10d56cad774a71c71d3dcbbcc20
Reviewed-on: https://code.wireshark.org/review/14787
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoMove zlib version check to wsutil
João Valverde [Fri, 1 Apr 2016 00:16:15 +0000 (01:16 +0100)]
Move zlib version check to wsutil

Change-Id: I0950f61e90af5bb21c0017204de0c0b509616e5c
Reviewed-on: https://code.wireshark.org/review/14747
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoAvoid UAF after deregister_dissector
Peter Wu [Thu, 31 Mar 2016 19:53:05 +0000 (21:53 +0200)]
Avoid UAF after deregister_dissector

When deregister_dissector is called by Lua, the protocol was not
property removed from the dependent dissectors list. Fix this and also
duplicate the memory for keys and values since these strings might be
dynamically allocated.

Fixes a use-after-free after reloading Lua dissectors that use
DissectorTable:add() and opening a new/closing an existing capture file.

Change-Id: If2ae02f155e7ab8fc653c08003755897471f9be0
Reviewed-on: https://code.wireshark.org/review/14735
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoUse AC_PROG_SED
João Valverde [Fri, 25 Mar 2016 21:26:47 +0000 (21:26 +0000)]
Use AC_PROG_SED

Change-Id: I879e2457b8127404b8ddf12ed2d2ff8c90a49dc3
Reviewed-on: https://code.wireshark.org/review/14755
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoUse AC_CHECK_MEMBERS
João Valverde [Fri, 25 Mar 2016 21:12:51 +0000 (21:12 +0000)]
Use AC_CHECK_MEMBERS

Change-Id: I18779ad869c97a6ddd12e39fe2f7a1f7b0c8cf56
Reviewed-on: https://code.wireshark.org/review/14754
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoUse AC_STRUCT_TIMEZONE
João Valverde [Fri, 25 Mar 2016 21:04:13 +0000 (21:04 +0000)]
Use AC_STRUCT_TIMEZONE

Change-Id: I96c12dce662691d37d6eb6c1893c5e9d91a8ea6f
Reviewed-on: https://code.wireshark.org/review/14753
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
8 years agoQt: Remember selected item in packet tree
Peter Wu [Tue, 29 Mar 2016 22:47:12 +0000 (00:47 +0200)]
Qt: Remember selected item in packet tree

Previously, changing a packet in the packet list would lose the
currently selected field item in the packet tree. After this patch, this
issue no longer occurs because the selected field is focussed again.

The approach is to remember the header field ID on the path from a field
to its root. Limitations of the current simple approach is that multiple
fields/trees under a tree might result in the wrong selection. This is
better than nothing though.

This patch greatly helps analyzing a capture file which has the same
format, except that I need to check a data source for decrypted data.
Previously I would have to scroll down and select the field to see the
data source which also made it impossible to quickly switch between
packets and compare them.

Change-Id: Ic113ca9245fd9faa10f91182794c50cfde8d10f4
Reviewed-on: https://code.wireshark.org/review/14697
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoQt: Keep byte tab when reloading/closing capture file
Peter Wu [Wed, 30 Mar 2016 22:03:35 +0000 (00:03 +0200)]
Qt: Keep byte tab when reloading/closing capture file

Do not remove byte view on closing a capture file. For this to work, the
tree items must also be remembered.

Change-Id: Ice5cd1006b957e2d1331effc15c4c0a9de89916d
Reviewed-on: https://code.wireshark.org/review/14715
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoUse faster wmem_str* functions in a few places.
Gerald Combs [Fri, 1 Apr 2016 19:48:22 +0000 (12:48 -0700)]
Use faster wmem_str* functions in a few places.

Use wmem_strdup and wmem_strconcat instead of wmem_strdup_printf.

This shaves a small amount of time off of register_all_protocols on
Windows according to the Visual Studio profiler.

Change-Id: Ib6991e8de5b4fc30e960c513a3028c09dfe6a0a4
Reviewed-on: https://code.wireshark.org/review/14770
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoandroiddump: Register interfaces when list interfaces
Michal Labedzki [Tue, 15 Mar 2016 18:06:36 +0000 (19:06 +0100)]
androiddump: Register interfaces when list interfaces

Trying to find interfaces every androiddump run use
a lot of system resources so Wireshark can hang for a while.
Back to old behaviour and register interfaces only when
list them.

Change-Id: Ib63cad05fb47722d3b9de24abf28a86e614417cd
Reviewed-on: https://code.wireshark.org/review/14764
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoBluetooth: Fix conflicting address fields
Michal Labedzki [Sun, 27 Mar 2016 11:50:55 +0000 (13:50 +0200)]
Bluetooth: Fix conflicting address fields

For Broadcast address use FT_ETHER with FF:FF:FF:FF:FF:FF address
instead of string address "Broadcast".

Change-Id: I638d3d6a1baa9c965dd0a9f548cedbd81af3ec5b
Reviewed-on: https://code.wireshark.org/review/14767
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>