metze/wireshark/wip.git
8 years agocigi: if the packet is not cigi, just return
Martin Kaiser [Thu, 25 Jun 2015 18:59:51 +0000 (11:59 -0700)]
cigi: if the packet is not cigi, just return

don't THROW() an exception

Change-Id: Ie0ddd8caf1963ab0ab7e8bb47a275ce887e19d60
Reviewed-on: https://code.wireshark.org/review/9145
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years agoReplace Folder.CopyHere with 7-Zip.
Gerald Combs [Tue, 28 Apr 2015 19:04:34 +0000 (12:04 -0700)]
Replace Folder.CopyHere with 7-Zip.

Server Core editions of Windows don't have shell.application. As a result
CopyHere and its unzip capabilities aren't guaranteed to be available.
Plus, CopyHere is just plain slow.

Remove the CopyHere code. Search for 7z and 7za in various places and
download the standalone 7za if needed.

Bug: 11151
Change-Id: Ie719effbdcee3141764183bf3535ec9bd1c3e97a
Reviewed-on: https://code.wireshark.org/review/8226
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
8 years agoRemove the other g_hash_table_contains
Evan Huus [Thu, 25 Jun 2015 18:55:32 +0000 (11:55 -0700)]
Remove the other g_hash_table_contains

Missed a bunch of them in g131f8f0.

Change-Id: I5b1df810a31c26c3ab3cd778f8774519283217c8
Reviewed-on: https://code.wireshark.org/review/9143
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agocmake/add_lemon_files: depend on lemon and lempar
Peter Wu [Thu, 25 Jun 2015 18:18:10 +0000 (20:18 +0200)]
cmake/add_lemon_files: depend on lemon and lempar

Add a dependency on the lemon binary and lempar.c files because the
output depends on these tools. This is already done for autotools and
nmake.

In addition, clean up the generated .h and .out files.

Change-Id: Ic1fa2c23949abf05e976a67d226c90293b2ce834
Reviewed-on: https://code.wireshark.org/review/9139
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoLimit the text displayed for the Filter label in the SRT dialog so it doesn't push...
Michael Mann [Thu, 25 Jun 2015 18:41:53 +0000 (14:41 -0400)]
Limit the text displayed for the Filter label in the SRT dialog so it doesn't push the table off of dialog.

Add tooltip that displays entire filter string

Bug: 6399
Change-Id: I094f3785eb15daf6e05485748f01c36a9a98e163
Reviewed-on: https://code.wireshark.org/review/9142
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoBugfix parsing filters out of SRT tables with parameters.
Michael Mann [Thu, 25 Jun 2015 18:33:28 +0000 (14:33 -0400)]
Bugfix parsing filters out of SRT tables with parameters.

Change-Id: I5f9315b144333be789f8555f4128371994d4245b
Reviewed-on: https://code.wireshark.org/review/9141
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoFile: Add BTSNOOP File Format support
Michal Labedzki [Mon, 20 Jan 2014 12:19:23 +0000 (13:19 +0100)]
File: Add BTSNOOP File Format support

BTSNOOP format is supported by libwiretap and this dissector add
ability to open the same file in second mode:
1. Wireshark aka Protocol Viewer (default)
2. Fileshark aka File Viewer

Mode 2 also has feature to dissect protocols contained by this file,
try "Protocol Preferences -> Dissect next layer".

Change-Id: I99f0df5b55d31bf5a7d6e9269bfc054c09022b51
Reviewed-on: https://code.wireshark.org/review/17
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agowmem: convert tree key to void*
Evan Huus [Thu, 25 Jun 2015 18:09:28 +0000 (11:09 -0700)]
wmem: convert tree key to void*

Rather than forcing everything to live in guint32. We still use guints for now
via the G_POINTER_TO_UINT and vice-versa, but this paves the way in future for
custom comparison functions which will make e.g. string trees far more
efficient for long strings.

Change-Id: Ibb15400f74761ae295948507df8d2e022f2ebb05
Reviewed-on: https://code.wireshark.org/review/9138
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoRemove g_hash_table_contains from plugin_if
Evan Huus [Thu, 25 Jun 2015 17:45:25 +0000 (10:45 -0700)]
Remove g_hash_table_contains from plugin_if

The OSX 10.5 build doesn't seem to like it.

Change-Id: I7471639f649dbf89ba77d78f77faebbeefcf4ed3
Reviewed-on: https://code.wireshark.org/review/9134
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoFix a memory leak registering prefs
Evan Huus [Thu, 25 Jun 2015 17:34:25 +0000 (10:34 -0700)]
Fix a memory leak registering prefs

Built-in string prefs have to be dynamic, but get overwritten by the
registration routine, so we have to save and then free them after-the-fact.

Change-Id: Ib418b14296391dd198a8b49b0c99c5f697d8050f
Reviewed-on: https://code.wireshark.org/review/9132
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoQt, cmake: put the build dir before the source dir in the include path
Martin Kaiser [Thu, 25 Jun 2015 16:44:58 +0000 (09:44 -0700)]
Qt, cmake: put the build dir before the source dir in the include path

this should prevent Visual Studio from picking up generated include
files which may be lying around in the source tree (as leftovers from
previous in-tree builds)

Change-Id: I2406c31bc0638eb13ed4b539ddc607512051033d
Reviewed-on: https://code.wireshark.org/review/9130
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoQt: use <> for including the generated ui_*.h files
Martin Kaiser [Thu, 25 Jun 2015 16:17:03 +0000 (09:17 -0700)]
Qt: use <> for including the generated ui_*.h files

this should make Visual Studio pick up the generated include files
from the build directory instead of the source directory (which may
contain lefovers from an in-tree build)

Change-Id: Ie3de4cdd85a2865e203118a42ab10f443372f03b
Reviewed-on: https://code.wireshark.org/review/9129
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agodiameter: fix a memory leak on startup
Evan Huus [Thu, 25 Jun 2015 16:54:06 +0000 (09:54 -0700)]
diameter: fix a memory leak on startup

If we can't read the dictionary containing all our definitions, free necessary
memory before returning.

Change-Id: I814962d920852b9a82acb3bb2e7bc41addd835f7
Reviewed-on: https://code.wireshark.org/review/9131
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoAdd proper "Decode As" mechanism for L2TPv3 subdissectors instead of preference.
Michael Mann [Fri, 3 Apr 2015 03:11:51 +0000 (23:11 -0400)]
Add proper "Decode As" mechanism for L2TPv3 subdissectors instead of preference.

Change-Id: I87f6f9f40e1c33148de43b53a8881d51416f5d2c
Reviewed-on: https://code.wireshark.org/review/7898
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoPlugin Interface: Add GUI callbacks
Roland Knall [Fri, 5 Jun 2015 09:19:37 +0000 (11:19 +0200)]
Plugin Interface: Add GUI callbacks

 Rename ext_menubar to a more appropriate plugin_if.

 External menus can be implemented by plugins to present
 additional menus for deep-packet analysis. One side-effect
 of such menus being implemented as plugins is, that they
 are being executed in different threads and therefore can
 only use limited access to the main GUI. Also, there is
 no safe cross-gui (GTK and Qt) way for many features.

 This patch implements a first functionality, by which a
 plugin implemented using ext_menubar can apply a display
 filter to the main view.

 For now the implementation supports filtering, as well as
 saving a preference.

Change-Id: Iffe4caa954bbeb8ce356352de4dae348a50efba9
Reviewed-on: https://code.wireshark.org/review/8773
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoQt: mark unused parameters as such
Pascal Quantin [Thu, 25 Jun 2015 16:11:42 +0000 (18:11 +0200)]
Qt: mark unused parameters as such

Change-Id: Ib53d6da0d6660cf2c6a3283ff6123a2f18a8abda
Reviewed-on: https://code.wireshark.org/review/9128
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoeditcap: keep timestamp resolution when converting a nseclibpcap file to pcapng
Pascal Quantin [Wed, 24 Jun 2015 23:58:25 +0000 (16:58 -0700)]
editcap: keep timestamp resolution when converting a nseclibpcap file to pcapng

As reported on https://ask.wireshark.org/questions/43483/why-does-editcap-write-out-nseclibpcap-correctly-with-nanosecond-timestamps-but-not-with-pcapng

Change-Id: I81ec6dd6bdc6008297141ca8e210f4fb989cd3d6
Reviewed-on: https://code.wireshark.org/review/9111
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoQt: fix crashes when Wireshark is closed while running a capture
Martin Kaiser [Wed, 24 Jun 2015 22:41:22 +0000 (15:41 -0700)]
Qt: fix crashes when Wireshark is closed while running a capture

if we haven't captured any packets yet, don't display a warning about
unsaved changes

make sure that we're not running into a scenario where
MainWindow::testCaptureFileClose() tries to close the capture file at
the same time as the pipe handler who sees an eof on the pipe

cf_has_unsaved_data() should return false if we have a temporary file
that contains no packets

Change-Id: I18d75bd658b85d45dd3313d49e2cd654c6300de5
Reviewed-on: https://code.wireshark.org/review/9109
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoAdd minimize and maximize buttons to the TCP stream dialogs.
Jeff Morriss [Wed, 11 Feb 2015 21:34:08 +0000 (16:34 -0500)]
Add minimize and maximize buttons to the TCP stream dialogs.

The first thing I generally do when I open a graph is to maximize it.
Having a maximize button makes that a lot easier. Call QDialog(NULL,
Qt::Window) similar to g80342e4.

Call QDialog(NULL) in the about box.

Change-Id: I4f229ab579d0912cb03ba8f8d0300d933d0ba914
Reviewed-on: https://code.wireshark.org/review/7072
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agofix the 'then' statement is equivalent to the 'else' statement found by PVS Studio...
Alexis La Goutte [Sat, 6 Jun 2015 13:07:53 +0000 (15:07 +0200)]
fix the 'then' statement is equivalent to the 'else' statement found by PVS Studio (V523)

Change-Id: I016e69f43bad98eb0604852ea658adaa5fe77c12
Reviewed-on: https://code.wireshark.org/review/8786
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoStop using atof/strtod (fixes column sorting of float types)
Peter Wu [Thu, 25 Jun 2015 00:05:30 +0000 (02:05 +0200)]
Stop using atof/strtod (fixes column sorting of float types)

atof is locale-dependent. In locales such as Swedish, German and Dutch,
the dot is a thousand separator, resulting in wrong conversions for
floats.

While at it, make the mate dissector also be independent of locale.
Blacklist atof in checkAPIs. Lemon is still using strtod, but that is
not our problem for now.

Bug: 11297
Bug: 8964
Change-Id: I6fe3e45eb1d6d95d41aa4f3af1f81a6204a60c63
Reviewed-on: https://code.wireshark.org/review/9116
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoafp: replace all calls to THROW() and do proper error handling
Martin Kaiser [Thu, 25 Jun 2015 02:15:43 +0000 (19:15 -0700)]
afp: replace all calls to THROW() and do proper error handling

Change-Id: Ie471a67a978aeb54727d03f93b98e3e422441a58
Reviewed-on: https://code.wireshark.org/review/9119
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years agoVagrant setup fixes
Evan Huus [Thu, 25 Jun 2015 15:17:23 +0000 (08:17 -0700)]
Vagrant setup fixes

- add license headers to the scripts
- don't mount `.` into the VM manually, vagrant already puts it in /vagrant/
  for us, just use that.
- build with -j3, slightly more efficient even with two cores

Change-Id: I43580ade7ae2635696072b39e4f18a401a030a85
Reviewed-on: https://code.wireshark.org/review/9127
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoTCP: Add expert info to indicate when there is TCP Fast Open SYN (with Cookie)
Alexis La Goutte [Thu, 25 Jun 2015 03:04:27 +0000 (05:04 +0200)]
TCP: Add expert info to indicate when there is TCP Fast Open SYN (with Cookie)

Coming after Jasper talk #Sharkfest15 about TCP stuff

Change-Id: I2b01bc6dfe24e28454101da59720d2c74603b88f
Reviewed-on: https://code.wireshark.org/review/9120
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years agoARUBA (ERM): Add type 5
Alexis La Goutte [Wed, 24 Jun 2015 17:07:16 +0000 (19:07 +0200)]
ARUBA (ERM): Add type 5

it using PeekRemote-Ng (with Header version = 2)

Change-Id: I601cb7ecfaf01e51ec696502d10918f869486d01
Reviewed-on: https://code.wireshark.org/review/9126
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 agoAruba (ERM): Add missing type 4 (PPI) to Decode AS
Alexis La Goutte [Wed, 24 Jun 2015 16:51:35 +0000 (18:51 +0200)]
Aruba (ERM): Add missing type 4 (PPI) to Decode AS

Change-Id: If2cb75fc9992bec2d699c5abace06dccc8bfb4ae
Reviewed-on: https://code.wireshark.org/review/9125
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoRevert commit cc8ed845ed53ed60fa776728f1d7f2659dd311a3
Joerg Mayer [Thu, 25 Jun 2015 07:37:28 +0000 (09:37 +0200)]
Revert commit cc8ed845ed53ed60fa776728f1d7f2659dd311a3
Author: Maarten Bezemer <maarten.bezemer@gmail.com>
Date:   Wed Nov 12 13:39:07 2014 +0100

    Invoke asn2wrs.py using a custom command

Fixes  bugid 11304

Once there is a better solution feel free to revert the revert.

Change-Id: Id64b621c5f3b8a934ce9ec5c3c127326efab46f2
Reviewed-on: https://code.wireshark.org/review/9122
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
8 years agoNetflow: fix typo (wrong time units for duration)
Martin Mathieson [Thu, 25 Jun 2015 06:23:03 +0000 (23:23 -0700)]
Netflow: fix typo (wrong time units for duration)

Bug: 11295
Change-Id: Id732dd77609bc453e81703595882b20f68742618
Reviewed-on: https://code.wireshark.org/review/9121
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
8 years agoAdd basic Vagrant configuration
Evan Huus [Thu, 25 Jun 2015 02:05:38 +0000 (19:05 -0700)]
Add basic Vagrant configuration

For non-linux developers this should somewhat simplify development with e.g.
valgrind and other useful tools.

Change-Id: I973ab7412ad9a61f0892c25c079ea3424208abd1
Reviewed-on: https://code.wireshark.org/review/9117
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoNAS EPS: fix a missed capital letter
Pascal Quantin [Thu, 25 Jun 2015 02:34:26 +0000 (19:34 -0700)]
NAS EPS: fix a missed capital letter

Change-Id: I937b832807e7fb5af69d0f3238011b41f9223f12
Reviewed-on: https://code.wireshark.org/review/9118
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoFix proto_tree_add_bytes_item() when we fail to decode number from string
Pascal Quantin [Thu, 25 Jun 2015 01:04:13 +0000 (18:04 -0700)]
Fix proto_tree_add_bytes_item() when we fail to decode number from string

We still need to insert an empty g_byte_array

Bug: 11309
Change-Id: Idf2ed8ea81b3f612ef8d6ae1aed158108dcc4356
Reviewed-on: https://code.wireshark.org/review/9114
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoacse: don't THROW() an exception from a dissector
Martin Kaiser [Thu, 25 Jun 2015 01:00:16 +0000 (18:00 -0700)]
acse: don't THROW() an exception from a dissector

we already have an expert info, we can simply exit

Change-Id: I8adbfb084991195152a02bbef64c38c5aa9e841e
Reviewed-on: https://code.wireshark.org/review/9113
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years agoAdd ability to export PDUs for heuristic dissectors also
Pascal Quantin [Wed, 24 Jun 2015 19:21:42 +0000 (12:21 -0700)]
Add ability to export PDUs for heuristic dissectors also

Change-Id: I1bf1aa9794f9b4f106edffd4986fc0b1014522fa
Reviewed-on: https://code.wireshark.org/review/9099
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoprint blank strings in -Tfields
Evan Huus [Wed, 24 Jun 2015 23:03:17 +0000 (16:03 -0700)]
print blank strings in -Tfields

I'm not 100% sure if this is really a good idea in all cases, but at least some
people want it.

Bug: 10906
Change-Id: I26e69a683781cdc6ba1cfcd6a41458bbca7ca2c0
Reviewed-on: https://code.wireshark.org/review/9108
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoDissect 802.3 Jumbo frames while capturing.
Michael Mann [Sat, 7 Mar 2015 21:37:14 +0000 (16:37 -0500)]
Dissect 802.3 Jumbo frames while capturing.

Following the code Olivier Montanuy's code suggestion from bug 5390.

Bug: 5390
Change-Id: Ie7425a76fd65fc9d50474c010b4a5beb1b3cf73e
Reviewed-on: https://code.wireshark.org/review/7588
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agofile.c: fix Fix Branch condition evaluates to a garbage value found by Clang Analyzer
Alexis La Goutte [Wed, 24 Jun 2015 20:36:53 +0000 (22:36 +0200)]
file.c: fix Fix Branch condition evaluates to a garbage value found by Clang Analyzer

Change-Id: Ib7c9e114973f78775cf17889b6aeab217cb6d0ef
Reviewed-on: https://code.wireshark.org/review/9101
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoDisable "Refresh Interfaces" when capturing
Evan Huus [Wed, 24 Jun 2015 21:33:27 +0000 (14:33 -0700)]
Disable "Refresh Interfaces" when capturing

It breaks restarts, and doesn't do anything useful at this point anyways.

Bug: 11176
Change-Id: I6a010becf851fea8690b445874b29b54546fb2e3
Reviewed-on: https://code.wireshark.org/review/9106
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoqt: fix more button states
Evan Huus [Wed, 24 Jun 2015 21:41:44 +0000 (14:41 -0700)]
qt: fix more button states

As in gcc614a9 we have to manually uncheck buttons if we decide not to action
them.

Change-Id: Ia5dc29a292bc6d75a1e8753da06a053cafa66866
Reviewed-on: https://code.wireshark.org/review/9107
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoqt: fix button state when cancelling save
Evan Huus [Wed, 24 Jun 2015 21:18:04 +0000 (14:18 -0700)]
qt: fix button state when cancelling save

If the user decides not to capture after all, by hitting cancel when prompted
for their unsaved changes, we have to manually uncheck the button again because
Qt helpfully checks it for us.

Bug: 11145
Change-Id: I362d72787ddb138d382a899d091698c6652eebb2
Reviewed-on: https://code.wireshark.org/review/9102
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agodumpcap: fix files capture autostop condition
Pascal Quantin [Wed, 24 Jun 2015 21:18:13 +0000 (14:18 -0700)]
dumpcap: fix files capture autostop condition

CND_CLASS_CAPTURESIZE condition type needs the tested parameter to be a guint64

Bug: 11305
Change-Id: I096d995e1e08ff3a81b2a95710185d272d849c86
Reviewed-on: https://code.wireshark.org/review/9104
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoInitialize default stats before using them
Evan Huus [Wed, 24 Jun 2015 18:52:19 +0000 (11:52 -0700)]
Initialize default stats before using them

Quick hack fix for bug 11275.

The longer fix I am still thinking about, but it goes something like this: we
have a terribly confusing dependency graph in ordering our various preferences,
so it's fragile and needs refactoring.

1. We must call epan_init before we read the preferences files, since dissectors
register many preferences.
2. We must call pre_init_prefs before we call prefs_register_modules, since that
inits the default values of the "global" preferences structure. `init_prefs()`
handles this normally.
3. We must call epan_init before we call init_prefs since init_prefs depends on
UATs being initialized (which is something epan_init does).
4. We must call prefs_register_modules before we call epan_init since that
generates the `protocols` subtree which is needed for registering
dissector-specific preferences.

The above graph has a cycle, which I *think* can be solved by splitting
prefs_register_modules?

Bug: 11275
Change-Id: I08dae6a7ade178896e0de5e5091f7eeaca95846f
Reviewed-on: https://code.wireshark.org/review/9098
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoRun compress-pngs.sh.
Gerald Combs [Wed, 24 Jun 2015 19:26:26 +0000 (12:26 -0700)]
Run compress-pngs.sh.

Change-Id: If662cfbe6ad2ce80916d32750476e95f607fe902
Reviewed-on: https://code.wireshark.org/review/9100
Reviewed-by: Gerald Combs <gerald@wireshark.org>
8 years agoAdd a bunch of " I missed in my previous patch.
Joerg Mayer [Wed, 24 Jun 2015 17:46:20 +0000 (19:46 +0200)]
Add a bunch of " I missed in my previous patch.

Change-Id: Ia94034bdb2148bca641b7c9bc6ec3f900c7574d3
Reviewed-on: https://code.wireshark.org/review/9097
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
8 years agoRemove the last deprecated tvb_length calls
Evan Huus [Wed, 24 Jun 2015 04:35:46 +0000 (21:35 -0700)]
Remove the last deprecated tvb_length calls

And remove the shims themselves!

Change-Id: I511c06eb21eaf68d1dc36bbb9558408807472f9c
Reviewed-on: https://code.wireshark.org/review/9088
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoQt: Add x-capture-file-reload@2x.svg to Makefile.am
Alexis La Goutte [Wed, 24 Jun 2015 17:16:18 +0000 (19:16 +0200)]
Qt: Add x-capture-file-reload@2x.svg to Makefile.am

Change-Id: I497290eff821167a31468a10af23ab762eff32fe
Reviewed-on: https://code.wireshark.org/review/9095
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agoDon't export libnghttp2 routines outside libwireshark.
Guy Harris [Wed, 24 Jun 2015 04:33:09 +0000 (21:33 -0700)]
Don't export libnghttp2 routines outside libwireshark.

Hopefully this will fix build issues that popped up on Windows, as well
as making the library a bit cleaner.

Change-Id: I5b5266af4b41e10aba32abdb46bfe811ab11b45d
Reviewed-on: https://code.wireshark.org/review/9087
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoQt: Add Reload button on MainToolBar
Alexis La Goutte [Tue, 23 Jun 2015 18:26:30 +0000 (20:26 +0200)]
Qt: Add Reload button on MainToolBar

Add @2x versions of x-capture-file-reload as well.

Change-Id: I08819cf66903884e0344a4f9bcd891befb582e90
Reviewed-on: https://code.wireshark.org/review/9066
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agoCheck _MSC_VER is defined before we use it
Evan Huus [Wed, 24 Jun 2015 15:32:13 +0000 (08:32 -0700)]
Check _MSC_VER is defined before we use it

Otherwise it breaks a bunch of stuff on Linux machines because of the way gcc's
preprocessor works (buildbot decryption tests, extcap, etc).

Originally added in Ic5360089f96be620fbe99ba4e819e0caa5ca0215

Change-Id: Iad43fa1415aa331ae375771adac0818ea1b99060
Reviewed-on: https://code.wireshark.org/review/9091
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agolibnghttp2: readd remove check for CONFIG.H
Alexis La Goutte [Wed, 24 Jun 2015 15:29:15 +0000 (17:29 +0200)]
libnghttp2: readd remove check for CONFIG.H

i hope will be fixed Windows 32 buildbot

Change-Id: Ie4429193d354ff70b4802fa8a734cb35a69c090c
Reviewed-on: https://code.wireshark.org/review/9090
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agoRemove another batch of deprecated tvb_length calls
Evan Huus [Wed, 24 Jun 2015 04:30:15 +0000 (21:30 -0700)]
Remove another batch of deprecated tvb_length calls

Change-Id: Icfdde38e40cca05d0705a081153a4ea3e8782ee7
Reviewed-on: https://code.wireshark.org/review/9086
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoHTTP2: Update to libnghttp2 1.0.4
Alexis La Goutte [Tue, 23 Jun 2015 13:17:10 +0000 (15:17 +0200)]
HTTP2: Update to libnghttp2 1.0.4

Change-Id: Ia92d183b7e7b5a604d75eee13b64b827ad0af903
Reviewed-on: https://code.wireshark.org/review/9054
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoUpdate build instructions for cmake near the end a bit
Joerg Mayer [Wed, 24 Jun 2015 02:22:16 +0000 (04:22 +0200)]
Update build instructions for cmake near the end a bit

Change-Id: I7d5b8ab3479cc4268b6cc5ae7822066a69b740dc
Reviewed-on: https://code.wireshark.org/review/9085
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
8 years agoHandle downloading and installing CMake 3.x.
Guy Harris [Wed, 24 Jun 2015 02:08:14 +0000 (19:08 -0700)]
Handle downloading and installing CMake 3.x.

Change-Id: I2347e3e36008fee006e9f66997d45b562eacc7dc
Reviewed-on: https://code.wireshark.org/review/9084
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoRemove deprecated tvb_length calls
Evan Huus [Wed, 24 Jun 2015 00:30:22 +0000 (17:30 -0700)]
Remove deprecated tvb_length calls

Trust that the files in epan/ immediately (not dissectors) know what they're
doing so just blindly convert them to captured length.

Change-Id: I872f7d58b2e15ae82c75fd56f4873996fbc97be7
Reviewed-on: https://code.wireshark.org/review/9083
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoFill in the 802.11 pseudo-header and call the "802.11+radio" dissector.
Guy Harris [Wed, 24 Jun 2015 00:25:17 +0000 (17:25 -0700)]
Fill in the 802.11 pseudo-header and call the "802.11+radio" dissector.

Do with the Prism and AVS headers what we do with the radiotap, PPI,
etc. headers.

Change-Id: I4b2522a2b294f53f22c363cd43604c4af0304fc2
Reviewed-on: https://code.wireshark.org/review/9082
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoRemove a bunch more deprecated tvb_length calls
Evan Huus [Wed, 24 Jun 2015 00:22:18 +0000 (17:22 -0700)]
Remove a bunch more deprecated tvb_length calls

(getting really close!)

Change-Id: Ibf22a5f727c4dc0070b78144a4b0ab8e0c5e1bce
Reviewed-on: https://code.wireshark.org/review/9081
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoPut the frequency/channel and RSSI data into columns.
Guy Harris [Wed, 24 Jun 2015 00:21:17 +0000 (17:21 -0700)]
Put the frequency/channel and RSSI data into columns.

Change-Id: I039e727aff46c08b93908a216608e196ed4bd662
Reviewed-on: https://code.wireshark.org/review/9080
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoPass the signal and noise dBm values to the 802.11 radio dissector.
Guy Harris [Wed, 24 Jun 2015 00:18:45 +0000 (17:18 -0700)]
Pass the signal and noise dBm values to the 802.11 radio dissector.

Change-Id: Ia3fa6ba0b1d16315c77895f3e8ae96ed7e5e1e02
Reviewed-on: https://code.wireshark.org/review/9079
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoImproved prefix display and comments for IID copying
Robert Cragie [Thu, 11 Jun 2015 15:36:34 +0000 (16:36 +0100)]
Improved prefix display and comments for IID copying

Change-Id: I58f56dd5cfc212e53bd7e9d575d2cf9b4b4f2b27
Reviewed-on: https://code.wireshark.org/review/8886
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 agoopenwire: remove useless register_init_routine call
Peter Wu [Tue, 23 Jun 2015 22:46:56 +0000 (00:46 +0200)]
openwire: remove useless register_init_routine call

Change-Id: Ifc638e92d4b148a2efeb6c488ab4dc2a57a054e7
Reviewed-on: https://code.wireshark.org/review/9076
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoRemove more deprecated tvb_length calls
Evan Huus [Tue, 23 Jun 2015 22:17:27 +0000 (15:17 -0700)]
Remove more deprecated tvb_length calls

Change-Id: Ie137e6f4e20fe26b1a4d9510e267896219c1c631
Reviewed-on: https://code.wireshark.org/review/9075
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoISAKMP: fix Cisco fragmentation support.
Martin Mathieson [Tue, 23 Jun 2015 21:01:22 +0000 (14:01 -0700)]
ISAKMP: fix Cisco fragmentation support.

Last flag wasn't mapping to 'more fragments' properly, and reassembly
should only be attempted on the last frame.

Bug: 7940
Change-Id: I565f2b72b6eb68dc32e0f57a43a098a8f203a800
Reviewed-on: https://code.wireshark.org/review/9073
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
8 years agoreplace another bunch of deprecated tvb_length calls
Martin Kaiser [Tue, 23 Jun 2015 20:58:55 +0000 (13:58 -0700)]
replace another bunch of deprecated tvb_length calls

Change-Id: Ib7c50b55942220d48de025642154b4bf3f39c8a2
Reviewed-on: https://code.wireshark.org/review/9074
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years agonetflow: cope with multiple duration types in one flow.
Martin Mathieson [Tue, 23 Jun 2015 18:19:07 +0000 (11:19 -0700)]
netflow: cope with multiple duration types in one flow.

Bug: 11295
Change-Id: I71493e13989dbc29e3e3e7d518d3b6686fbec01a
Reviewed-on: https://code.wireshark.org/review/9063
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
8 years ago[Qt] switch screens only if we're acutally starting a capture
Martin Kaiser [Tue, 23 Jun 2015 20:21:02 +0000 (13:21 -0700)]
[Qt] switch screens only if we're acutally starting a capture

don't do the switch when the capture can't be started
(e.g. because we didn't select any interface from which to capture)

Change-Id: Ibabd703863d546c95b9fbe9bd2280d67a22dfc26
Reviewed-on: https://code.wireshark.org/review/9072
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years ago[Qt] if the capture is stopped before we received any packet...
Martin Kaiser [Tue, 23 Jun 2015 19:53:26 +0000 (12:53 -0700)]
[Qt] if the capture is stopped before we received any packet...

... we go back to the main welcome screen like we do in GTK

Change-Id: I64ef29665af61da55c1971ca59d1fab25d205874
Reviewed-on: https://code.wireshark.org/review/9071
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years agotshark: fix memleak from version lookup
Peter Wu [Tue, 23 Jun 2015 19:46:48 +0000 (21:46 +0200)]
tshark: fix memleak from version lookup

Immediately release memory after using it, fixes a direct memleak
warning from ASAN.

Change-Id: Icd3ff19c607da790a4a093966e1966cb0df6bb9d
Reviewed-on: https://code.wireshark.org/review/9069
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoproto_tree_add_item_ret_(u)int: do the NULL check at the start
Martin Kaiser [Tue, 23 Jun 2015 17:58:38 +0000 (10:58 -0700)]
proto_tree_add_item_ret_(u)int: do the NULL check at the start

before hfinfo is actually used (coverity 1293631)

Change-Id: I270c30c4699cd6f831a38986e6c8024c2e9ef47a
Reviewed-on: https://code.wireshark.org/review/9061
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoextend the RPL dissector with basic P2P RPL support
Cenk Gündoğan [Sun, 21 Jun 2015 20:42:00 +0000 (22:42 +0200)]
extend the RPL dissector with basic P2P RPL support

Bug: 11301
Change-Id: I5569322a05c770524e0f0e7892addd15c7f7dbab
Reviewed-on: https://code.wireshark.org/review/9053
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years ago[MSVC 2015] file_exists() fails on MSVC2105 as file_stat.st_ino gets reset
AndersBroman [Tue, 23 Jun 2015 20:03:20 +0000 (22:03 +0200)]
[MSVC 2015] file_exists() fails on MSVC2105 as file_stat.st_ino gets reset
to zero in the function call if the file does not exist. The general code
seems to work with MSVC2015 so use that.

Change-Id: Ic5360089f96be620fbe99ba4e819e0caa5ca0215
Reviewed-on: https://code.wireshark.org/review/9070
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoRemove the P1 dissector from the dirty dissectors list.
Guy Harris [Tue, 23 Jun 2015 18:29:46 +0000 (11:29 -0700)]
Remove the P1 dissector from the dirty dissectors list.

It was already added to the clean dissectors list, but wasn't removed
from the dirty dissectors list, so it was built twice and linked in
twice, and hilarity ensued.

Change-Id: Ic4636f17b61e619546dc21a04ebbaace0296d583
Reviewed-on: https://code.wireshark.org/review/9067
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoQt: change default behavior of 'Decode As' window
Pascal Quantin [Tue, 23 Jun 2015 17:31:58 +0000 (10:31 -0700)]
Qt: change default behavior of 'Decode As' window

Up to know Qt 'Decode As' window was saving manual configuration automatically, contrary to GTK UI.
This can be misleading when decoding protocols without a fixed identifier (port number, USB bus/device id, ...).
Opening a new trace might lead to previous and now irrelevant settings being applied.
Make this optional and add a Save button to permanently store the current configuration.

Change-Id: I077c560f9e71cab16a74247e2e9d87523c0ed85e
Reviewed-on: https://code.wireshark.org/review/9058
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agoReplace more deprecated tvb_length calls
Evan Huus [Tue, 23 Jun 2015 18:24:48 +0000 (11:24 -0700)]
Replace more deprecated tvb_length calls

The return values of new-style dissectors always use the captured length, so
replace those automagically with sed.

Change-Id: Ic43072ee4a80d433cd4264444583a0e670adc26a
Reviewed-on: https://code.wireshark.org/review/9065
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoQt: Be less aggressive about reselecting packets.
Gerald Combs [Tue, 23 Jun 2015 18:19:48 +0000 (11:19 -0700)]
Qt: Be less aggressive about reselecting packets.

Don't reselect the current row in redrawVisiblePackets. That routine is
called in quite a few places, including ones where we don't want to
automatically scroll to the current packet.

Change-Id: Ia29a832235c0e260d8b17f1ce76745047700537b
Reviewed-on: https://code.wireshark.org/review/9064
Reviewed-by: Gerald Combs <gerald@wireshark.org>
8 years agoRemove more deprecated tvb_length calls
Evan Huus [Tue, 23 Jun 2015 18:13:21 +0000 (11:13 -0700)]
Remove more deprecated tvb_length calls

Change-Id: Ie40a195db622ebfb096fa5088c5467a1385e69bf
Reviewed-on: https://code.wireshark.org/review/9062
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years ago[afp] improve the error handling for extended attributes
Martin Kaiser [Tue, 23 Jun 2015 16:26:34 +0000 (09:26 -0700)]
[afp] improve the error handling for extended attributes

distinguish between the length field in the packet and the current item's length
make sure that the length field fits into a gint variable
add a cast to the return value of tvb_strsize()
don't throw an exception manually

Change-Id: I2debab778be3e34d68b1be31963d2d9260a30e0e
Reviewed-on: https://code.wireshark.org/review/9056
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years agoRemove deprecated tvb_length from PIDL dissectors
Evan Huus [Tue, 23 Jun 2015 17:55:22 +0000 (10:55 -0700)]
Remove deprecated tvb_length from PIDL dissectors

Also regenerate all to pick up the usage of https in some comment links.

Change-Id: Ic17b6368d2118627178b0b560031450d98e5b5e5
Reviewed-on: https://code.wireshark.org/review/9060
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years ago[zvt] the TLV container starts with an overall length field
Martin Kaiser [Mon, 22 Jun 2015 17:23:36 +0000 (10:23 -0700)]
[zvt] the TLV container starts with an overall length field

new function dissect_zvt_tlv_len(), use it for the total length
and for each tlv entry's length field

Change-Id: I2b7ba6939ddf0326b014c565ffbe5d16e3a88282
Reviewed-on: https://code.wireshark.org/review/9059
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years agoP1: Remove from ASN1 DIRTY list
Alexis La Goutte [Mon, 8 Jun 2015 13:24:49 +0000 (15:24 +0200)]
P1: Remove from ASN1 DIRTY list

Change-Id: If44cdddea6709b824ae242d504d7469756c87b91
Reviewed-on: https://code.wireshark.org/review/8838
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoP1: fix 'dissect_p1_T_report_type' defined but not used [-Wunused-function]
Alexis La Goutte [Thu, 4 Jun 2015 11:17:53 +0000 (13:17 +0200)]
P1: fix 'dissect_p1_T_report_type' defined but not used [-Wunused-function]

Change-Id: Idee443cd35846bb197070cff5fb37e3904afb856
Reviewed-on: https://code.wireshark.org/review/8757
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoExit with the exit status of the command we ran.
Guy Harris [Tue, 23 Jun 2015 17:15:44 +0000 (10:15 -0700)]
Exit with the exit status of the command we ran.

Also, expand a comment.

Change-Id: Icbb8ead02f55087f3ac09747fe518f211d488172
Reviewed-on: https://code.wireshark.org/review/9057
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoRegenerate *-tap-register.c when associated Makefile.common is updated
Bill Meier [Tue, 23 Jun 2015 13:36:40 +0000 (09:36 -0400)]
Regenerate *-tap-register.c when associated Makefile.common is updated

Change-Id: Id9a83aeb285466f409a0e5ee651ef0c9f26ddda8
Reviewed-on: https://code.wireshark.org/review/9055
Reviewed-by: Bill Meier <wmeier@newsguy.com>
8 years agoUse RTD functionality for H.225
Michael Mann [Tue, 23 Jun 2015 00:51:20 +0000 (20:51 -0400)]
Use RTD functionality for H.225

This got missed in the initial refactoring.

Change-Id: I98dcc0816e065efab9b497f753c8d2d388349ff3
Reviewed-on: https://code.wireshark.org/review/9044
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoTry to catch TShark crashing and get a stack trace.
Guy Harris [Tue, 23 Jun 2015 07:21:20 +0000 (00:21 -0700)]
Try to catch TShark crashing and get a stack trace.

It's currently crashing in the Solaris buildbot when we do "tshark -v";
hopefully this will give us something more useful than

  test.sh: line 144: 21543 Abort                   (core dumped) $TSHARK -v

  "Version information" Failed!
  Failed to print version information
  Binary file ./core matches

as a diagnostic.

Change-Id: I278c8dd9f6acf5ddfa83bc0a7f3f7a3c48577ac2
Reviewed-on: https://code.wireshark.org/review/9052
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoTreat channel flags fields as just collections of bits, not as type fields.
Guy Harris [Tue, 23 Jun 2015 06:59:59 +0000 (23:59 -0700)]
Treat channel flags fields as just collections of bits, not as type fields.

The radiotap and PPI specs don't call them type fields, and don't list
them as having type values, they call them flags fields and list the
individual bits.

Listing them as type fields is especially confusing with radiotap, as
you can have multiple fields giving *different* channel types, as per,
for example

    https://ask.wireshark.org/questions/42888/multiple-channel-types-and-mcs-missing

where an 802.11ac packet has one "channel type" field claiming it's
802.11a and another one claiming it's 802.11n when it is, in fact,
*neither* 11a *nor* 11n.

If you want to know the channel type, look at the "802.11 radio
information" tree that comes before the 802.11 header tree; it gives a
reasonable summary of most of the radio metadata, giving the *correct*
channel type, and not showing any field multiple times.  Look at the
radiotap or PPI or... tree only if either 1) you're debugging a driver
that creates those headers or 2) there's some data in the header that
*doesn't* show up in any form in the 802.11 radio information tree (in
which case the code for radio information probably needs to be changed
to show it).

Change-Id: I545b81b08a993dbb219fa7a4f54daac3637ea071
Reviewed-on: https://code.wireshark.org/review/9051
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoMorph ProgressBar into CaptureProgressFrame.
Gerald Combs [Fri, 19 Jun 2015 23:56:44 +0000 (16:56 -0700)]
Morph ProgressBar into CaptureProgressFrame.

Switch from a plain QProgressBar to a QFrame with a QProgressBar and a
stop button.

Add a stop_flag boolean to the capture_file struct.

To do:
- Start adding the progress bar to dialogs.
- Don't complain so loudly when the user stops a capture.

Change-Id: Iedd1d7d79f2044f1a53e4fb22186d25930a3ef03
Reviewed-on: https://code.wireshark.org/review/9029
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
8 years agoprefs: fix memleak
Peter Wu [Mon, 22 Jun 2015 06:56:34 +0000 (08:56 +0200)]
prefs: fix memleak

Calling g_list_remove_link(link, llink) does not free the removed
last link llink. g_list_next or g_list_foreach+g_free followed by
g_list_free should be used instead such that the data is freed before
and then dropped from the list.

This fixes a memleak in tshark -r dns.pcap detected by ASAN (single
packet).

Set pref->default_val.list = NULL just in case, and with symmetry with
capture_columns handling.

Change-Id: I3cc52e275784037ab40c0b42c68d0dd83b73cd98
Reviewed-on: https://code.wireshark.org/review/9026
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agopacket: fix memleak
Peter Wu [Mon, 22 Jun 2015 23:30:13 +0000 (01:30 +0200)]
packet: fix memleak

It turns out that a heur_dissector_list_t structure was not released,
only the GSList inside it. Ensure that this list gets released as well.

Change-Id: If79deb5d011d306477d082368744addcee794ae1
Reviewed-on: https://code.wireshark.org/review/9040
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoIS-IS (LSP): Remove proto_tree_add_text call
Alexis La Goutte [Sun, 7 Jun 2015 19:23:47 +0000 (21:23 +0200)]
IS-IS (LSP): Remove proto_tree_add_text call

Part 2 !

Change-Id: Iaa46f3d785cbff6b397edf5bd54c0c3cf65a7264
Reviewed-on: https://code.wireshark.org/review/8822
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoRANAP: call nsap properly when bindingID is included in transport address
Martin Mathieson [Mon, 22 Jun 2015 23:46:57 +0000 (16:46 -0700)]
RANAP: call nsap properly when bindingID is included in transport address

Change-Id: I45fed890cc2f7f5d106bbb7b35038d8db141fa4e
Reviewed-on: https://code.wireshark.org/review/9036
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
8 years agoRemove more deprecated tvb_length calls
Evan Huus [Tue, 23 Jun 2015 03:53:46 +0000 (20:53 -0700)]
Remove more deprecated tvb_length calls

Change-Id: I56260a82b19001ab2f87f4be34a9510f127f841f
Reviewed-on: https://code.wireshark.org/review/9050
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoCFM: fix CFM Type Test signal (TST) without CRC dissection
JustinKu [Tue, 23 Jun 2015 03:47:23 +0000 (20:47 -0700)]
CFM: fix CFM Type Test signal (TST) without CRC dissection

Bug: 11286
Change-Id: I8efce21e2bab55f9fea50a234419082cdc288f4e
Reviewed-on: https://code.wireshark.org/review/9048
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agocoverity 1306905: integer overflowed argument
Martin Kaiser [Tue, 23 Jun 2015 03:31:23 +0000 (20:31 -0700)]
coverity 1306905: integer overflowed argument

tvb_strsize() returns guint
remove the if (tree) while we're at it

Change-Id: Icc24f166104a3e9b95fca2ef14a7bd8be2677cba
Reviewed-on: https://code.wireshark.org/review/9047
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years agowmem_tree_new_autoreset() never returns NULL
Martin Kaiser [Tue, 23 Jun 2015 00:48:54 +0000 (17:48 -0700)]
wmem_tree_new_autoreset() never returns NULL

Change-Id: I497b77dec1eb4617179d492838ecd7d267539ba4
Reviewed-on: https://code.wireshark.org/review/9043
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years agoRemove more deprecated tvb_length
Evan Huus [Tue, 23 Jun 2015 00:19:23 +0000 (17:19 -0700)]
Remove more deprecated tvb_length

Change-Id: Iac23a6c804ad3720d37186559477909b2ff33eb2
Reviewed-on: https://code.wireshark.org/review/9042
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoRemove more deprecated tvb_length
Evan Huus [Tue, 23 Jun 2015 00:05:37 +0000 (17:05 -0700)]
Remove more deprecated tvb_length

Change-Id: I36603453c2563406f82663683930088dedd5f39c
Reviewed-on: https://code.wireshark.org/review/9041
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agosrt_table.h: fix parameter 'opt_arg/filter' not found in the function declaration...
Alexis La Goutte [Sun, 21 Jun 2015 13:53:53 +0000 (15:53 +0200)]
srt_table.h: fix parameter 'opt_arg/filter' not found in the function declaration [-Wdocumentation]

Change-Id: I6edda434d02a4926a2ec7a2580a7f684b6e96ee6
Reviewed-on: https://code.wireshark.org/review/9008
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoSIP: add support for draft-ietf-insipid-session-id
Pascal Quantin [Mon, 22 Jun 2015 18:38:52 +0000 (11:38 -0700)]
SIP: add support for draft-ietf-insipid-session-id

Bug: 11294
Change-Id: I54f7e19d129cddb1f11525f6ee9931270cc41f40
Reviewed-on: https://code.wireshark.org/review/9028
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoDon't use the value of the Flags field if we didn't have it.
Guy Harris [Mon, 22 Jun 2015 23:16:23 +0000 (16:16 -0700)]
Don't use the value of the Flags field if we didn't have it.

Change-Id: Idd7771bd39ee823981b31b827645abd2ae516f66
Reviewed-on: https://code.wireshark.org/review/9039
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoFix handling of XChannel radiotap field.
Guy Harris [Mon, 22 Jun 2015 23:07:20 +0000 (16:07 -0700)]
Fix handling of XChannel radiotap field.

Fetch the flags before using them; thanks to Peter Wu for catching that
one.

Fetch and use the frequency and channel.

Have cflags be the variable for the flags in Channel and xcflags be the
variable for the flags in XChannel.

Change-Id: If82f7adb448eef04b769186a90a8722d03a702a3
Reviewed-on: https://code.wireshark.org/review/9038
Reviewed-by: Guy Harris <guy@alum.mit.edu>