metze/wireshark/wip.git
3 years agoFix appending the list of remote interfaces.
Guy Harris [Sat, 27 Feb 2016 01:14:52 +0000 (17:14 -0800)]
Fix appending the list of remote interfaces.

Don't assume if_list is non-null when append_remote_list() is called; it
won't be, if we didn't find any local interfaces.  Have
append_remote_list() return the final if_list value, and assign it to
if_list.

Change-Id: I05586d5b034f3d61aa38a20f6c6d2c69117b367e
Reviewed-on: https://code.wireshark.org/review/14191
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoReplace extcap_interface_list() with append_extcap_interface_list().
Guy Harris [Sat, 27 Feb 2016 01:04:05 +0000 (17:04 -0800)]
Replace extcap_interface_list() with append_extcap_interface_list().

Pull the "rebuild the list of extcap interfaces and, optionally, return
a list of if_infos for them" into a separate
extcap_reload_interface_list() routine, call it in the cases where we
don't want the if_infos list, and have append_extcap_interface_list()
call it, asking it for the if_infos list, and then append the interfaces
to that list.

Change-Id: I07478ab133859484b3e0916144971639f961224b
Reviewed-on: https://code.wireshark.org/review/14189
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoPut the extcap interfaces at the *end* of the interface list.
Guy Harris [Sat, 27 Feb 2016 00:35:17 +0000 (16:35 -0800)]
Put the extcap interfaces at the *end* of the interface list.

The list should start with the native local interfaces, as returned by
pcap, so that we default to the interface pcap gives first, rather than
to whatever extcap interface happens to be at the beginning.

This also means that, if we're only calling extcap_interface_list() to
regenerate our internal data structures, we don't bother allocating -
and leaking! - a list of if_info structures.

Change-Id: Ida651b5b081883f118a300b9f57403f2dc5c4363
Ping-Bug: 12183
Reviewed-on: https://code.wireshark.org/review/14187
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoEnsure we have a name resolution block when parsing its block type.
Michael Mann [Fri, 26 Feb 2016 21:19:56 +0000 (16:19 -0500)]
Ensure we have a name resolution block when parsing its block type.

Bug: 12174
Change-Id: I82eb0ac75f2e03f15c2f016e9b7ff72fdc7044f5
Reviewed-on: https://code.wireshark.org/review/14179
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agoClean up setting *err_str to NULL.
Guy Harris [Fri, 26 Feb 2016 23:18:18 +0000 (15:18 -0800)]
Clean up setting *err_str to NULL.

Just do it upfront.

Change-Id: I5305882b8efd080fcb3e8ea626e09f4682729702
Reviewed-on: https://code.wireshark.org/review/14185
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agopacket-nsh.c - Look for correct ethernet dissector name.
Michael Mann [Fri, 26 Feb 2016 23:26:32 +0000 (18:26 -0500)]
packet-nsh.c - Look for correct ethernet dissector name.

Bug: 12180
Change-Id: If089ad49a27de2a681490ef75aaa9a7b7e5ad922
Reviewed-on: https://code.wireshark.org/review/14184
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agoAdd free_address_wmem(), fix warnings [-Wcast-qual]
João Valverde [Thu, 26 Nov 2015 04:44:52 +0000 (04:44 +0000)]
Add free_address_wmem(), fix warnings [-Wcast-qual]

Try to improve address API and also fix some constness warnings
by not overloading the 'data' pointer to store malloc'ed buffers
(use private pointer for that instead).

Second try, now passing test suite.

Change-Id: Idc101cd866b6d4f13500c9d59da5c7a38847fb7f
Reviewed-on: https://code.wireshark.org/review/13946
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: 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>
3 years agoFix indentation.
Guy Harris [Fri, 26 Feb 2016 22:56:01 +0000 (14:56 -0800)]
Fix indentation.

Change-Id: I201c35e1f6dfdb67a68dbc0ee684e0231842f00b
Reviewed-on: https://code.wireshark.org/review/14182
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoFix nmake build for extcap apps.
Michael Mann [Fri, 26 Feb 2016 20:24:01 +0000 (15:24 -0500)]
Fix nmake build for extcap apps.

Change-Id: I09c4ae9a6b05f82b0fdc2271559d715148611e18
Reviewed-on: https://code.wireshark.org/review/14177
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agocmake: fix parallel docbook build
Peter Wu [Fri, 26 Feb 2016 00:03:45 +0000 (01:03 +0100)]
cmake: fix parallel docbook build

Let targets depend on the generate_developer-guide.xml target instead of
the developer-guide.xml output file.

Change-Id: I66106ad69c9baedbd58a008b4dbbbf93b787c2c2
Reviewed-on: https://code.wireshark.org/review/14156
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
3 years agoEmpty out InterfaceTree::updateGlobalDeviceSelections() if no pcap.
Guy Harris [Fri, 26 Feb 2016 19:35:06 +0000 (11:35 -0800)]
Empty out InterfaceTree::updateGlobalDeviceSelections() if no pcap.

It doesn't even need to bother checking the argument.

Change-Id: I2cdc9d7da24392ff3fae84e31442530c2e854734
Reviewed-on: https://code.wireshark.org/review/14174
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoMark a variable unused when we're not using it.
Gerald Combs [Fri, 26 Feb 2016 18:53:26 +0000 (10:53 -0800)]
Mark a variable unused when we're not using it.

Change-Id: I020447859114551e71810bf17ba05dc353a1ff08
Reviewed-on: https://code.wireshark.org/review/14171
Reviewed-by: Gerald Combs <gerald@wireshark.org>
3 years agotcp_stream_dialog: Integer overflow in Average Throughput
kkoizumi [Fri, 26 Feb 2016 15:47:30 +0000 (00:47 +0900)]
tcp_stream_dialog: Integer overflow in Average Throughput

Overflow occurs in the TCP Stream Graphs window when Average Throughput exceeds 20-30 Gbps.

* Screenshot examples
https://raw.githubusercontent.com/koizumi-k/pub/master/misc/stream1-current-win64.png
https://raw.githubusercontent.com/koizumi-k/pub/master/misc/stream2-current-win64.png

Change-Id: I4e557fdeae659ef27b986fca18c74cc8983fe4d3
Reviewed-on: https://code.wireshark.org/review/14163
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
3 years agoQt: Update selected interface filter behavior.
Gerald Combs [Tue, 23 Feb 2016 18:04:16 +0000 (10:04 -0800)]
Qt: Update selected interface filter behavior.

Change the selected interface behavior in the main window and the
capture interfaces dialog to better handle multiple selections. Attempt
to document this at the top of interface_tree.cpp.

Move the default capture filter code from CaptureFilterEdit to
MainWelcome. Add a "conflicting filter" check to CaptureEdit which
updates the placeholder text.

Handle conflicting filters in the main welcome screen and the capture
interfaces dialog. Propagate interface selections and filter updates in
the capture interfaces dialog to the main welcome screen.

Consolidate some of the interface handling code in InterfaceTree and
CaptureInterfacesDialog.

Make sure CaptureInterfacesDialog manages the global capture options by
device name instead numeric index.

Start deprecating prefs.capture_devices_filter and
capture_dev_user_cfilter_find.

Change some member function names so that they're hopefully more clear
and consistent.

Ping-Bug: 11886
Change-Id: I63b06dbae29c2c45ee9252092ad54bdcbacae6e6
Reviewed-on: https://code.wireshark.org/review/14129
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
3 years agoHTTP: Fix full_uri when using a Proxy
Uli Heilmeier [Thu, 25 Feb 2016 14:00:18 +0000 (15:00 +0100)]
HTTP: Fix full_uri when using a Proxy

When the HTTP request is transmitted to a Proxy the URI is already
a "full URI".

Bug was reported by Thomas Baudelet.

Bug: 12176
Change-Id: I83f6bdef6fa96233792c6bbe54caad38df0f5fb6
Reviewed-on: https://code.wireshark.org/review/14142
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agoUpdate README.plugins to remove deprecated nmake references
Graham Bloice [Thu, 25 Feb 2016 18:55:39 +0000 (18:55 +0000)]
Update README.plugins to remove deprecated nmake references

Change-Id: I259fe24e6dca7679f22492161b0c4cd97c7521de
Reviewed-on: https://code.wireshark.org/review/14145
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
3 years agoextcap: Fix noinst header
Roland Knall [Fri, 26 Feb 2016 12:24:15 +0000 (13:24 +0100)]
extcap: Fix noinst header

Change-Id: I2b4c6eda29a6a8198993f577c42741729ed39538
Reviewed-on: https://code.wireshark.org/review/14160
Reviewed-by: Roland Knall <rknall@gmail.com>
3 years agosnmp: Decode msgSecurityParameters ASN.1 header
Stig Bjørlykke [Fri, 26 Feb 2016 11:03:25 +0000 (12:03 +0100)]
snmp: Decode msgSecurityParameters ASN.1 header

Decode ASN.1 identifier and length to get correct offset to
msgSecurityParameters.

Bug: 12181
Change-Id: Icf83616ac0a63e1d48652738942fe339dd165cab
Reviewed-on: https://code.wireshark.org/review/14158
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
3 years agoextcap: move windows functions into extcap-base
Dario Lombardo [Mon, 22 Feb 2016 15:28:15 +0000 (16:28 +0100)]
extcap: move windows functions into extcap-base

Change-Id: Iec7fed027a24992afd673b09c32470af51739ae5
Reviewed-on: https://code.wireshark.org/review/14075
Reviewed-by: Roland Knall <rknall@gmail.com>
3 years agodebian: Override some lintian warnings
Balint Reczey [Thu, 25 Feb 2016 22:27:28 +0000 (23:27 +0100)]
debian: Override some lintian warnings

Change-Id: Id262cfa7577fe45b360399d5e4a9de0ea002bf67
Reviewed-on: https://code.wireshark.org/review/14155
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: Balint Reczey <balint@balintreczey.hu>
Tested-by: Balint Reczey <balint@balintreczey.hu>
3 years agoextcap: Fix make distcheck
João Valverde [Thu, 25 Feb 2016 20:20:59 +0000 (20:20 +0000)]
extcap: Fix make distcheck

Change-Id: I46ba924e4231ae0e59d9cd7870cde516df8f3c28
Reviewed-on: https://code.wireshark.org/review/14152
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoQt: Capture Interfaces dialog geometry updates.
Gerald Combs [Thu, 25 Feb 2016 20:29:38 +0000 (12:29 -0800)]
Qt: Capture Interfaces dialog geometry updates.

Widen CaptureInterfacesDialog. Manually set some column widths.

Change-Id: I84fd060d83b5f7bc186d79e22d5cc608dfdbd6c5
Reviewed-on: https://code.wireshark.org/review/14148
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
3 years agoClean up modelines and indentation.
Guy Harris [Thu, 25 Feb 2016 21:34:07 +0000 (13:34 -0800)]
Clean up modelines and indentation.

HT tab stops are set every 8 spaces on UN*X; UN*X tools that treat an HT
character as tabbing to 4-space tab stops, or that even are configurable
but *default* to 4-space tab stops (I'm looking at *you*, Xcode!) are
broken.  tab-width: 4, tabstop=4, and tabSize=4 are errors if you ever
expect anybody to look at your file with a UN*X tool, and every text
file will probably be looked at by a UN*X tool at some point, so Don't
Do That.

Adjust indentation to reflect the mode lines.

Change-Id: Icf0831717de10fc615971fa1cf75af2f1ea2d03d
Reviewed-on: https://code.wireshark.org/review/14150
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoAdd text2pcap-scanner_lex.h to the list of generated headers.
Guy Harris [Thu, 25 Feb 2016 21:11:16 +0000 (13:11 -0800)]
Add text2pcap-scanner_lex.h to the list of generated headers.

Change-Id: I874e86f5fd192eedb8f636ad208b2f7ad7f705fd
Reviewed-on: https://code.wireshark.org/review/14149
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoQt: Emit textEdited from CaptureFilterEdit in more places.
Gerald Combs [Thu, 25 Feb 2016 18:15:14 +0000 (10:15 -0800)]
Qt: Emit textEdited from CaptureFilterEdit in more places.

We should emit textEdited whenever the user changes the text
interactively. Do so when the user clicks the clear button or selects a
recent filter.

We might want to copy this to DisplayFilterEdit.

Change-Id: Icf02fead52947fcef6e7e617b0c49bfc9e1aec65
Reviewed-on: https://code.wireshark.org/review/14144
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
3 years agoPut extcap-base.h into the release tarball.
Guy Harris [Thu, 25 Feb 2016 19:35:12 +0000 (11:35 -0800)]
Put extcap-base.h into the release tarball.

Change-Id: I17213b20c26acfb9e5b3de251b3f90a8e23ce0a7
Reviewed-on: https://code.wireshark.org/review/14146
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agopre-commit: Use uname -a instead.
João Valverde [Thu, 25 Feb 2016 14:01:13 +0000 (14:01 +0000)]
pre-commit: Use uname -a instead.

Not all shells support uname -o.

Change-Id: Ia6f46f3580f6d7b421da672418dcbee38ad9e60b
Reviewed-on: https://code.wireshark.org/review/14143
Reviewed-by: João Valverde <j@v6e.pt>
3 years agoextcap: move includes into extcap-base.
Dario Lombardo [Mon, 22 Feb 2016 15:24:05 +0000 (16:24 +0100)]
extcap: move includes into extcap-base.

Change-Id: I802cc3a3bb3989411216ed070ecc018345e0d54f
Reviewed-on: https://code.wireshark.org/review/14073
Reviewed-by: Roland Knall <rknall@gmail.com>
3 years agoQt: Use UTF8_HORIZONTAL_ELLIPSIS for …
Stig Bjørlykke [Thu, 25 Feb 2016 09:15:32 +0000 (10:15 +0100)]
Qt: Use UTF8_HORIZONTAL_ELLIPSIS for …

Bug: 12172
Change-Id: Icbb3011ff18fc53c3e77c62692ed977178d1aace
Reviewed-on: https://code.wireshark.org/review/14138
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>
3 years agoextcap: move common code into extcap-base files
Dario Lombardo [Mon, 22 Feb 2016 15:12:44 +0000 (16:12 +0100)]
extcap: move common code into extcap-base files

Change-Id: Ia4a73c7df39426c8773fce04cac223bda3c6ef1c
Reviewed-on: https://code.wireshark.org/review/14071
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
3 years agoGRE: call ID not always decoded
Alexis La Goutte [Tue, 23 Feb 2016 08:38:39 +0000 (09:38 +0100)]
GRE: call ID not always decoded

Always decode Call ID (and payload length) when Version is Enhanced GRE (and no ACK flag)

Issue reported by Duncan Salerno

Bug:12149
Change-Id: I2f61dd6851e26cc93174f96e05c0055fc45be4e2
Reviewed-on: https://code.wireshark.org/review/14088
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>
3 years agopre-commit: Avoid launching python subprocesses.
João Valverde [Sat, 30 Jan 2016 03:49:41 +0000 (03:49 +0000)]
pre-commit: Avoid launching python subprocesses.

This makes Python required only for (portable) fnmatch().

Change the ignore script to work as a filter.

Multi-platform improvements.

Change-Id: I6ac757d48ba2ff965da5da3dc9c25047a0e37f92
Reviewed-on: https://code.wireshark.org/review/13693
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: João Valverde <j@v6e.pt>
3 years agoSort the pixel formats.
Guy Harris [Thu, 25 Feb 2016 08:18:13 +0000 (00:18 -0800)]
Sort the pixel formats.

(qsort() is your friend.)

Change-Id: I71ab5fea0c8c0f548d737f5d5d1b7523b8a668ea
Reviewed-on: https://code.wireshark.org/review/14137
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoFix build with CFLAGS="-g -Og" [-Werror=maybe-uninitialized]
João Valverde [Wed, 24 Feb 2016 21:52:52 +0000 (21:52 +0000)]
Fix build with CFLAGS="-g -Og" [-Werror=maybe-uninitialized]

packet-flexray.c: In function ‘dissect_flexray’:
packet-flexray.c:245:6: error: ‘flexray_frame_tree’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
      expert_add_info(pinfo, flexray_frame_tree, &ei_flexray_frame_payload);
      ^
cc1: all warnings being treated as errors

Change-Id: Iadcae49e7d958823ae7066906892f6c1ae85169b
Reviewed-on: https://code.wireshark.org/review/14124
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>
3 years agoCleanup CMakeLists.txt indentation and use lower case function names
João Valverde [Wed, 24 Feb 2016 16:55:27 +0000 (16:55 +0000)]
Cleanup CMakeLists.txt indentation and use lower case function names

Change-Id: Ie94d2e9b6b4975d7caec10c3ce472cafe1eefd62
Reviewed-on: https://code.wireshark.org/review/14120
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>
3 years agoAdd GResource message to configure script
João Valverde [Sun, 21 Feb 2016 17:10:03 +0000 (17:10 +0000)]
Add GResource message to configure script

Use more descriptive naming while at it.

Change-Id: Ic89562cb9fa2cd5e315992f12ad9e46f2361da0b
Reviewed-on: https://code.wireshark.org/review/14057
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>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
3 years agou3v: dissector for the USB3 Vision protocol
Thies Moeller [Fri, 19 Feb 2016 15:33:15 +0000 (15:33 +0000)]
u3v: dissector for the USB3 Vision protocol

Dissector for the USB3 Vision machine vision camera protocol.
 * Descriptors
 * Bootstrap registers
 * Control (GenCP)
 * Stream data

A sample capture (usb_u3v_sample.pcapng) has been uploaded to
https://wiki.wireshark.org/SampleCapture

USB3 Vision a standard developed under the sponsorship
of the AIA for the benefit of the machine vision industry.
U3V stands for USB3 Vision (TM) Protocol

Change-Id: If1206df7974c6a91cf18f59ddecf9d38b9827934
Reviewed-on: https://code.wireshark.org/review/14008
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>
3 years agoCIP: Improve error checking
D. Ulis [Tue, 23 Feb 2016 20:14:39 +0000 (15:14 -0500)]
CIP: Improve error checking

1. Expert info for cip_short_string,cip_string
2. Combine dissect_cip_multiple_service_packet_req/dissect_cip_multiple_service_packet_rsp. The formats are the same, and this ensures that all expert info checks are applied to both.
3. Remove some copy-paste in dissect_cip_generic_data

Change-Id: I433990bf4389bee78d414cab8547bd2bb39498c7
Reviewed-on: https://code.wireshark.org/review/14105
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>
3 years agodiameter: change GArray into wmem_array.
Dario Lombardo [Thu, 18 Feb 2016 10:30:41 +0000 (11:30 +0100)]
diameter: change GArray into wmem_array.

This change fixes a leak in packet-diameter that loads a dictionary
but doesn't free all the data. Found by valgrind.

==30481== 36,656 (960 direct, 35,696 indirect) bytes in 24 blocks are definitely lost in loss record 3,417 of 3,421
==30481==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30481==    by 0xA7FE610: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==30481==    by 0xA81422D: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==30481==    by 0xA7CDC44: g_array_sized_new (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==30481==    by 0x6863743: dictionary_load (packet-diameter.c:1980)
==30481==    by 0x6863743: proto_register_diameter (packet-diameter.c:2344)
==30481==    by 0x71C4BA4: register_all_protocols (register.c:323)
==30481==    by 0x65EEFA7: proto_init (proto.c:521)
==30481==    by 0x65CD621: epan_init (epan.c:126)
==30481==    by 0x115330: main (tshark.c:1220)

Change-Id: I3c0d19e1accab415355aa0f50c598f0c83356985
Reviewed-on: https://code.wireshark.org/review/13821
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
3 years agoUpdate README.plugins
Graham Bloice [Wed, 24 Feb 2016 17:20:42 +0000 (17:20 +0000)]
Update README.plugins

Update docs to include steps for CMake builds.

Change-Id: Iefbe038ab93311bb3b2e9fd21bcdc674290dba45
Reviewed-on: https://code.wireshark.org/review/14121
Reviewed-by: Anders Broman <a.broman58@gmail.com>
3 years agosFlow: Add lag_port_stats (format 7)
Alexis La Goutte [Wed, 24 Feb 2016 21:45:45 +0000 (22:45 +0100)]
sFlow: Add  lag_port_stats (format 7)

Bug:10501
Change-Id: I8d77c41537f1bfed9b5fbc585119496ec73c06eb
Reviewed-on: https://code.wireshark.org/review/14123
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agoTry putting the output directly into the error message.
Guy Harris [Thu, 25 Feb 2016 03:23:44 +0000 (19:23 -0800)]
Try putting the output directly into the error message.

When the tests are run in the buildbot, messages such as

Error during test execution: see {pathname}

aren't very useful.

Change-Id: I4509ea58c162c264c316358019a1cbc01cd93e31
Reviewed-on: https://code.wireshark.org/review/14135
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoAn SHB with a magic of 0x1A2B3C4D isn't necessarily little-endian.
Guy Harris [Thu, 25 Feb 2016 03:10:25 +0000 (19:10 -0800)]
An SHB with a magic of 0x1A2B3C4D isn't necessarily little-endian.

If it's 0x1A2B3C4D, that means it has the same byte order as the
instruction set for which Wireshark was built[*]; if it's 0x4D3C2B1A, it
means it has the opposite byte order. (We assume no "middle-endian"
machines here; it's extremely unlikely that any of this code will ever
work on a PDP-11.)

Wireshark *does* work on big-endian machines (if there are any places
where it doesn't, those are bugs that must be fixed), so we can't assume
that "same byte order as our instruction set" means "little-endian".

[*]If, for example, you run a PowerPC binary under Rosetta, it'll act as
if big-endian is the native byte order, even though it's running on a
little-endian machine.

Change-Id: Ic438bd85c034f1fba276408ba30214d7078121d1
Reviewed-on: https://code.wireshark.org/review/14133
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoFor SHBs, always use the byte order from the byte-order magic.
Guy Harris [Thu, 25 Feb 2016 02:50:09 +0000 (18:50 -0800)]
For SHBs, always use the byte order from the byte-order magic.

Don't use the byte order from any previously-seen SHB, as it might be
different.

Bug: 12167
Change-Id: I19a81f81f2e8115938387487e2682b8b11a100fe
Reviewed-on: https://code.wireshark.org/review/14131
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoFix allocation of option bocks in pcapng_read().
Guy Harris [Thu, 25 Feb 2016 02:03:50 +0000 (18:03 -0800)]
Fix allocation of option bocks in pcapng_read().

We don't need to allocate an WTAP_OPTION_BLOCK_IF_DESCR option block;
don't use the value we allocated.

We must not allocate an WTAP_OPTION_BLOCK_IF_STATS option block until we
need it, as we may have to allocate *more than one* of them here!  The
old code would reuse the same block, adding it more than once, causing a
"freeing already freed data"/"freeing non-allocated data" error on some
platforms.

Change-Id: I8582627c1f5deecfd4f6490dcdf8c31ee3809d12
Reviewed-on: https://code.wireshark.org/review/14130
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoFix another heap-based bufffer overflow.
Guy Harris [Wed, 24 Feb 2016 23:39:39 +0000 (15:39 -0800)]
Fix another heap-based bufffer overflow.

The S1 code works similarly to the S2/S3 code, and has the same issue.

Change-Id: I288e30ccdf67d8a6daec8c8428c0f703e18ecc89
Reviewed-on: https://code.wireshark.org/review/14127
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoAdd 1 byte and 16 byte as separate values.
Guy Harris [Wed, 24 Feb 2016 23:21:40 +0000 (15:21 -0800)]
Add 1 byte and 16 byte as separate values.

The 1 is for the byte written with vht_ndp_flag; the 16 is for the PLCP
header.  Separate them out; no change to the actual code (as any
compiler worth its salt would do constant folding).

Change-Id: I5e081c67e605203153270ed9a3f9e30b9e9b968c
Reviewed-on: https://code.wireshark.org/review/14125
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoImprove epan/Makefile.am readability
João Valverde [Wed, 24 Feb 2016 14:06:18 +0000 (14:06 +0000)]
Improve epan/Makefile.am readability

Change-Id: I317f788a6301df1db63ba6b82806849c61af9a05
Reviewed-on: https://code.wireshark.org/review/14118
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>
3 years agoCheck for clang before trying to add -Q flag
João Valverde [Tue, 23 Feb 2016 19:29:22 +0000 (19:29 +0000)]
Check for clang before trying to add -Q flag

Change-Id: I91a9d8fd4ae6623b3719a3927da1d1b714f08b04
Reviewed-on: https://code.wireshark.org/review/14106
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: Peter Wu <peter@lekensteyn.nl>
3 years agopacket-nfs: do not call g_hash_table_remove before g_hash_table_insert
Tigran Mkrtchyan [Wed, 24 Feb 2016 07:59:07 +0000 (08:59 +0100)]
packet-nfs: do not call g_hash_table_remove before g_hash_table_insert

The g_hash_table_insert will remove and deallocate existing entry, so we
don't need to do it at all.

Change-Id: I661cadd8beea9585885e48c03a8b52561d1df778
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Reviewed-on: https://code.wireshark.org/review/14113
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
3 years agopacket-nfs: fix double-free
Tigran Mkrtchyan [Tue, 23 Feb 2016 16:13:12 +0000 (17:13 +0100)]
packet-nfs: fix double-free

fixes regression introduced by f5340b2

g_hash_table_remove will call free on object, thus there is no need for explicit g_free,
as is causes a double-free:

*** Error in `/usr/sbin/wireshark-gtk': double free or corruption (fasttop): 0x0000555556e6bf50 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x77da5)[0x7fffef80ada5]
/lib64/libc.so.6(+0x804fa)[0x7fffef8134fa]
/lib64/libc.so.6(cfree+0x4c)[0x7fffef816cac]
/lib64/libglib-2.0.so.0(g_free+0xe)[0x7ffff09665ee]
/lib64/libglib-2.0.so.0(+0x388ba)[0x7ffff094f8ba]
/lib64/libwireshark.so.6(+0x1cfb46b)[0x7ffff49d646b]
/lib64/libwireshark.so.6(+0x1d03d99)[0x7ffff49ded99]
/lib64/libwireshark.so.6(+0x173b11f)[0x7ffff441611f]
/lib64/libwireshark.so.6(+0x173bba5)[0x7ffff4416ba5]
/lib64/libwireshark.so.6(call_dissector_with_data+0x26)[0x7ffff4419ad6]

.....

The g_hash_table_insert will remove and deallocate existing entry, so we
don't need to do it at all.

Change-Id: Ide47d1f9deb3e1b0d8adefd31fc6f3bf5cbaa010
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Reviewed-on: https://code.wireshark.org/review/14096
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
3 years agoqt: show marker when capture file comment has changed
Peter Wu [Fri, 19 Feb 2016 17:27:44 +0000 (18:27 +0100)]
qt: show marker when capture file comment has changed

Fixes a missing "*" marker in the title and this warning when the
capture file comment is modified:

    QWidget::setWindowModified: The window title does not contain a '[*]' placeholder

Change-Id: Iea0a63cf8c8f9abd577397c8881f0399d2e798ba
Reviewed-on: https://code.wireshark.org/review/14010
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
3 years agoExtend reassembly documentation
Peter Wu [Sun, 21 Feb 2016 23:54:50 +0000 (00:54 +0100)]
Extend reassembly documentation

Documentation changes only (comments and docbook).

Update WSDG with the fragment_add_seq_check API that was introduced in
Wireshark 1.10.

Fix typos and clarify the many functions we have for adding reassembling
fragments.

Change-Id: I38715a8f58e9cf1fe3e34ee4b1a4ae339630282b
Reviewed-on: https://code.wireshark.org/review/14066
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
3 years agober: avoid deep recursion for constructed strings
Peter Wu [Wed, 24 Feb 2016 02:06:46 +0000 (03:06 +0100)]
ber: avoid deep recursion for constructed strings

Bound the recursion depth to avoid a stack overflow while parsing a
deeply nested constructed string.

Call chain before this patch:

 - dissect_ber_octet_string
   - dissect_ber_constrained_octet_string
     - reassemble_octet_string (called for constructed types)
       - dissect_ber_octet_string *recursion*

After this patch, the reassemble_octet_string will throw if the maximum
recursion depth is reached.

Bug: 11822
Change-Id: I6753e3c9f5dcbfab0e4c174418b2c7eb784d64d2
Reviewed-on: https://code.wireshark.org/review/14108
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>
3 years agovwr: fix heap-based buffer overflow
Peter Wu [Tue, 23 Feb 2016 23:35:44 +0000 (00:35 +0100)]
vwr: fix heap-based buffer overflow

Commit v1.99.10rc0-316-gf28e23f added some additional room for the 16
byte PLCP header and 1 byte L1P. These are however not part of the
remaining data, only the header.

Bug: 11795
Change-Id: Ia6935d27366a07f818f147c9094a801429b049e2
Reviewed-on: https://code.wireshark.org/review/12240
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
3 years agoDe-canonicalize paths for file and directory path preferences.
Guy Harris [Wed, 24 Feb 2016 05:09:04 +0000 (21:09 -0800)]
De-canonicalize paths for file and directory path preferences.

Undo Qt's "helpful" canonicalization of paths returned by the file
dialogs to use / as the pathname component separator rather than using
the native pathname component separator.

Bug: 12117
Change-Id: I6077191a2204574ca50f53b5424f7f421db33db3
Reviewed-on: https://code.wireshark.org/review/14109
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agocmake: fix docbook dependency
Peter Wu [Sun, 21 Feb 2016 23:44:48 +0000 (00:44 +0100)]
cmake: fix docbook dependency

After changing an asciidoc source file, the html files were not rebuilt
via 'ninja developer_guides'. It turns out that the
developer_guide_docbook target has an order-only dependency on
developer-guide.xml (and not the developer-guide.xml dependencies).

Fix this by adding an explicit dependency on the generated .xml file.

Change-Id: I4bdc0ebca8909caaab9cc0797cc35cc6260bfe43
Reviewed-on: https://code.wireshark.org/review/14065
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
3 years agoWhen installing RPMs for development, use dnf if the OS has it.
Jeff Morriss [Fri, 12 Feb 2016 02:46:33 +0000 (21:46 -0500)]
When installing RPMs for development, use dnf if the OS has it.

Also install the Qt5-devel packages (in addition to plain old "Qt").

Change-Id: I86f6a779dc9d0b359c69f0627106d1cce3120f83
Reviewed-on: https://code.wireshark.org/review/13916
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
3 years agofix exists multiple times with NOT compatible types: IPv4/IPv6/Bytes
Alexis La Goutte [Tue, 23 Feb 2016 13:05:28 +0000 (14:05 +0100)]
fix exists multiple times with NOT compatible types: IPv4/IPv6/Bytes

'rsip.parameter.address' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'sap.originating_source' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'sflow_245.nexthop' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4

Change-Id: Idabe9adafac2e11f2e90a494e5fac1a341edca33
Reviewed-on: https://code.wireshark.org/review/14091
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>
3 years agoGet rid of trailing white space.
Guy Harris [Tue, 23 Feb 2016 20:09:25 +0000 (12:09 -0800)]
Get rid of trailing white space.

Change-Id: I8a42826ae5aa864ee21e1a96a5826642d66a7e63
Reviewed-on: https://code.wireshark.org/review/14104
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoDissect the frame data.
Guy Harris [Tue, 23 Feb 2016 20:07:38 +0000 (12:07 -0800)]
Dissect the frame data.

We just dissect it as raw bytes for now; ultimately, we need to process
it the same way we process data for other forms of USB capture.

This also catches the case where the frame length is bogusly large
(including so large that rounding it up to a multiple of 4 overflows).

Bug: 12153
Change-Id: I537974d548fdcda917d9fce8189eb2134bc17bb9
Reviewed-on: https://code.wireshark.org/review/14103
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoQt: Add tooltips to the welcome screen interfaces.
Gerald Combs [Sat, 13 Feb 2016 01:13:40 +0000 (17:13 -0800)]
Qt: Add tooltips to the welcome screen interfaces.

Show the interface address and saved capture filter.

Change-Id: I8403f97ea584783abdbe2d89b8c9061a00ececdf
Reviewed-on: https://code.wireshark.org/review/14100
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
3 years agoQt: Select matching tree item and bytes in Find Packet
Stig Bjørlykke [Tue, 23 Feb 2016 08:30:48 +0000 (09:30 +0100)]
Qt: Select matching tree item and bytes in Find Packet

Highlight the matching tree item and matching packet bytes when
doing a Find Packet.  Added cf->search_len to correctly highlight
the matching bytes when doing a regex search.

Bug: 12157
Change-Id: I84fbdb9b43be4355e24aff3cf5f8850f1119e2bf
Reviewed-on: https://code.wireshark.org/review/14086
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>
3 years agoQt: Optimize Show Packet Bytes
Stig Bjørlykke [Tue, 23 Feb 2016 08:37:20 +0000 (09:37 +0100)]
Qt: Optimize Show Packet Bytes

Change-Id: Ia81f501d5495125d3633af729051e185609353e0
Reviewed-on: https://code.wireshark.org/review/14087
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>
3 years agoQt: add OS interface description to 'Manage Local Interfaces' window
Pascal Quantin [Tue, 23 Feb 2016 16:01:16 +0000 (18:01 +0200)]
Qt: add OS interface description to 'Manage Local Interfaces' window

In case the user did not provide a custom name for the interface, display the
OS description in the 'Comment' column as how it is done in GTK UI.

Bug: 12156
Change-Id: If9da58980169df3eaf25f74e7b81676cbc4f6ebd
Reviewed-on: https://code.wireshark.org/review/14095
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
3 years agoQt: Capture and display filter fixups.
Gerald Combs [Mon, 22 Feb 2016 21:39:49 +0000 (13:39 -0800)]
Qt: Capture and display filter fixups.

In SyntaxLineEdit make sure we emit textEdited when we complete a
previously used filter. In CaptureInterfacesDialog, connect
captureFilterComboBox::activated to filterEdited. These enusre that we
fill in the capture filter column in CaptureInterfacesDialog.

Change-Id: Ibbf7ab223e37f8f73d8ec0289f8c32692a7e17d4
Reviewed-on: https://code.wireshark.org/review/14081
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
3 years agoautotools: Display build flags in configure summary
João Valverde [Sun, 21 Feb 2016 20:31:00 +0000 (20:31 +0000)]
autotools: Display build flags in configure summary

Add more AX_APPEND_FLAGS to handle whitespace better too.

Change-Id: I679fc76076c2d800e3524fe7bf22d0af8e58b284
Reviewed-on: https://code.wireshark.org/review/14062
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>
3 years agoBGP-LS: Protocol-ID aware Prefix/Adj Flags dissection
Francesco Fondelli [Tue, 16 Feb 2016 15:12:21 +0000 (16:12 +0100)]
BGP-LS: Protocol-ID aware Prefix/Adj Flags dissection

BGP-LS is just a collector of IGP link state information. Some
fields are encoded "as-is" from the IGP, hence in order to dissect
them properly we must be aware of their origin, e.g. IS-IS or OSPF.
So, *before* dissecting LINK_STATE attributes we must get the
'Protocol-ID' field that is present in the MP_[UN]REACH_NLRI
attribute. The tricky thing is that there is no strict order for path
attributes on the wire, hence we have to keep track of 1) the
'Protocol-ID' from the MP_[UN]REACH_NLRI and 2) the offset/len of
the LINK_STATE attribute. We store them in per-packet proto_data and
once we got both we are ready for the LINK_STATE attribute dissection.

Change-Id: Ibe2b7f5c9039ad63a72f3f9fb8a9c33c0be44ed0
Signed-off-by: Francesco Fondelli <francesco.fondelli@gmail.com>
Reviewed-on: https://code.wireshark.org/review/13970
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>
3 years agoHave "make maintainer-clean" remove extcap/Makefile.in.
Guy Harris [Tue, 23 Feb 2016 03:06:16 +0000 (19:06 -0800)]
Have "make maintainer-clean" remove extcap/Makefile.in.

(Is there some reason why automake doesn't make this happen by default?)

Change-Id: I1a4fff32696012d0fd83faf86a2f40df4ea5fa80
Reviewed-on: https://code.wireshark.org/review/14085
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoExplicitly require autoconf 2.64.
Guy Harris [Tue, 23 Feb 2016 02:45:30 +0000 (18:45 -0800)]
Explicitly require autoconf 2.64.

AX_APPEND_FLAG requires it, and we use AX_APPEND_FLAG, so explicitly
require it up front.

Change-Id: Ieff378e63eba245fdf1454bc388b6be7fc94a10c
Reviewed-on: https://code.wireshark.org/review/14084
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoMaking wiretap option blocks more generic.
Michael Mann [Tue, 26 Jan 2016 01:17:21 +0000 (20:17 -0500)]
Making wiretap option blocks more generic.

This was inspired by https://code.wireshark.org/review/9729/, but takes it in a different direction where all options are put into an array, regardless of whether they are "standard" or "custom".  It should be easier to add "custom" options in this design. Some, but not all blocks have been converted.
Descriptions of some of the block options have been moved from wtap.h to pcapng.h as it seems to be the one that implements the description of the blocks.

Also what could be added/refactored is registering block behavior.

Change-Id: I3dffa38f0bb088f98749a4f97a3b7655baa4aa6a
Reviewed-on: https://code.wireshark.org/review/13667
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agowmem: add null-terminator support.
Dario Lombardo [Thu, 18 Feb 2016 10:32:07 +0000 (11:32 +0100)]
wmem: add null-terminator support.

This change makes wmem_array more similar to GArray by adding
two functions that mimic the first two params of g_array_new().

Change-Id: Iaec999cd2e44f79f44d766be5d39741b73602e5a
Reviewed-on: https://code.wireshark.org/review/13989
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
3 years agocaputils: fix crash when calling 'dumpcap -i' without having WinPcap installed
Pascal Quantin [Mon, 22 Feb 2016 15:53:13 +0000 (17:53 +0200)]
caputils: fix crash when calling 'dumpcap -i' without having WinPcap installed

Add a test on err_str buffer presence before trying to use it,
like what is done in other code paths.

Bug: 12143
Change-Id: I30ae49a33224dc190c202637767df9d7de2c0f2b
Reviewed-on: https://code.wireshark.org/review/14074
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
3 years agoLTE RRC: add a unit to gnss-TOD-msec field
Pascal Quantin [Mon, 22 Feb 2016 15:11:41 +0000 (17:11 +0200)]
LTE RRC: add a unit to gnss-TOD-msec field

Change-Id: I48b15d47d9bdf1bb4078a03ee7183f05bb57fa04
Reviewed-on: https://code.wireshark.org/review/14072
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
3 years agoHTTP2: Reduce resource usage.
Tatsuhiro Tsujikawa [Fri, 5 Feb 2016 14:41:57 +0000 (23:41 +0900)]
HTTP2: Reduce resource usage.

Cache decoded header fields in order to conserve memory.

If we try to decompress more than 256 KB or find 200 or more headers
stop decompressing and add an expert item. Note that we might want to
make the maximum values configurable via preferences.

Bug:12077
Change-Id: Idf7cb1046c96cf87e1b53af6c56e19b4abad1dfb
Reviewed-on: https://code.wireshark.org/review/13746
Reviewed-by: Gerald Combs <gerald@wireshark.org>
3 years agoCisco Marker: Fix endian type for some field
Peter Membrey [Mon, 22 Feb 2016 03:21:30 +0000 (11:21 +0800)]
Cisco Marker: Fix endian type for some field

Fixed several decoded fields that were poorly described in the original documentation

Change-Id: I688c5fd7e011d0dd49fb201ca294348d177bb4fa
Reviewed-on: https://code.wireshark.org/review/14067
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
3 years agoFix some hf_ field datatype conflicts.
Michael Mann [Mon, 22 Feb 2016 01:19:02 +0000 (20:19 -0500)]
Fix some hf_ field datatype conflicts.

'ieee17221.clock_source_id' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64
'ieee17221.stream_format' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64
'afp.unknown' exists multiple times with NOT compatible types: FT_UINT16 and FT_BYTES
'afp.toc_offset' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64
'bootp.client_id.iaid' exists multiple times with NOT compatible types: FT_UINT32 and FT_STRING
'bthfp.chld.mode' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8
'canopen.pdo.data' exists multiple times with NOT compatible types: FT_STRINGZ and FT_BYTES
'canopen.sdo.data' exists multiple times with NOT compatible types: FT_UINT32 and FT_BYTES
'ceph.msg.' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'ceph.version' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64
'cip.linkaddress' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8
'dnp3.al.ana' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32
'dnp3.al.anaout' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32
'dtls.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16
'ssl.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16
'dvb-s2_gse.label' exists multiple times with NOT compatible types: FT_UINT24 and FT_ETHER
'fcdns.rply.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8
'fcdns.req.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8
'icmp.int_info.name' exists multiple times with NOT compatible types: FT_STRING and FT_BOOLEAN
'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT8
'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'mausb.clear_transfers.status' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE
'mikey.v' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE
'mswsp.rangeboundry.ultype' exists multiple times with NOT compatible types: FT_STRING and FT_UINT32
'mswsp.arrayvector.address64' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'nlm.lock.l_offset' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'nlm.lock.l_len' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'pflog.saddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pflog.daddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pflog.saddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6
'pflog.daddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6
'pgm.spm.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.nak.src' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.nak.grp' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.poll.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv4 and FT_IPv6
'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.opts.redirect.dlr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4

Change-Id: Iaf694699d108a12db172da8dd9fbab211adb329d
Reviewed-on: https://code.wireshark.org/review/14070
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agopacket-cigi.c: Fix conflicting datatypes for hf_ fields.
Michael Mann [Sun, 21 Feb 2016 23:46:36 +0000 (18:46 -0500)]
packet-cigi.c: Fix conflicting datatypes for hf_ fields.

'cigi.entity_control' exists multiple times with NOT compatible types: FT_FLOAT and FT_STRINGZ
'cigi.entity_control' exists multiple times with NOT compatible types: FT_STRINGZ and FT_FLOAT
'cigi.art_part_control.yaw_enable' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT8
'cigi.rate_control.part_id' exists multiple times with NOT compatible types: FT_UINT8 and FT_INT8
'cigi.view_control.yoff_enable' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT8
'cigi.view_control.zoff_enable' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT8
'cigi.view_control.roll_enable' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT8
'cigi.view_control.pitch_enable' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT8
'cigi.view_control.yaw_enable' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT8
'cigi.short_symbol_control.value1' exists multiple times with NOT compatible types: FT_FLOAT and FT_UINT32
'cigi.short_symbol_control.value2' exists multiple times with NOT compatible types: FT_FLOAT and FT_UINT32

Also replace some homemade true_false_string with some from tfs.h

Change-Id: Ied8dfb320abb6f3218304fd06c5481167f1169ec
Reviewed-on: https://code.wireshark.org/review/14069
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agoSeparate hf_ fields that share filter names with FT_UINT32 and FT_UINT64 datatypes.
Michael Mann [Sun, 21 Feb 2016 18:22:41 +0000 (13:22 -0500)]
Separate hf_ fields that share filter names with FT_UINT32 and FT_UINT64 datatypes.

'bitcoin.addr.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.inv.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.getdata.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.notfound.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.getblocks.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.getheaders.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.tx.input_count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.tx.in.script_length' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.tx.output_count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.tx.out.script_length' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.block.num_transactions' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.headers.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.merkleblock.flags.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.merkleblock.hashes.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.string.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.data.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'dcerpc.referent_id' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'dmp.body.id' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'edonkey.start_offset' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'edonkey.end_offset' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.entry' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.phoff' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.shoff' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.p_offset' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.p_vaddr' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.p_paddr' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.p_filesz' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.p_memsz' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.p_align' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.sh_addr' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.sh_offset' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.sh_size' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.sh_addralign' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.sh_entsize' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.symbol_table.value' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.symbol_table.size' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.dynamic.tag' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.dynamic.value' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.dynamic.pointer' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.dynamic.ignored' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.dynamic.unspecified' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'h248.contextId' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'hcrt.data32' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'wlan_mgt.fixed.psmp.stainfo.reserved' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'isakmp.tf.attr.life_duration' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'isakmp.ike.attr.life_duration' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'jxta.message.element.content.length' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'rmt-lct.tsi' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'rmt-lct.toi' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'smb.alloc_size' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'trmac.response_code' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32

Change-Id: I903933e6448bac3d3374eef1a6a0bc4771c1a9f4
Reviewed-on: https://code.wireshark.org/review/14060
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agoResolve hf_ field name conflicts with protocol strings.
Michael Mann [Sun, 21 Feb 2016 19:24:11 +0000 (14:24 -0500)]
Resolve hf_ field name conflicts with protocol strings.

Change-Id: Ie719e2f14c6eaf536035ab30dcb40e91c431c6e4
Reviewed-on: https://code.wireshark.org/review/14061
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agopvfs2: read a 64bit value in one go
Martin Kaiser [Fri, 19 Feb 2016 18:48:08 +0000 (19:48 +0100)]
pvfs2: read a 64bit value in one go

Change-Id: If630e03f82add403cb978969a8ebbb6f0bbcbad0
Reviewed-on: https://code.wireshark.org/review/14064
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>
3 years agosigcomp: don't THROW() an exception from a dissector
Martin Kaiser [Fri, 19 Feb 2016 18:37:15 +0000 (19:37 +0100)]
sigcomp: don't THROW() an exception from a dissector

when there's a decompression failure, we already flag up an expert info and exit
we can just delete the exception

in dissect_udvm_reference_operand_memory(), we return 0 on error and
let the caller do a check

Change-Id: I2cd301896794260457f57209e5efc0939b27b339
Reviewed-on: https://code.wireshark.org/review/14063
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
3 years agotshark: load decode_as_entries file
Michael Mann [Sun, 21 Feb 2016 14:40:18 +0000 (09:40 -0500)]
tshark: load decode_as_entries file

With Wireshark 2.0, some dissector preferences were removed in favor of 'Decode As' functionality.
But the settings saved in the GUI are not loaded in tshark, preventing their use without an explicit call to '-d' option.
Let's load decode_as_entries file by default and have it overridden by the '-d' option if required.

Ping-Bug: 12124
Change-Id: I134a424cb6cf8fc89b7096a659ef1605314a70a2
Reviewed-on: https://code.wireshark.org/review/13956
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agoautotools: Add GLib/GTK configuration definitions to package cflags
João Valverde [Sun, 21 Feb 2016 10:58:30 +0000 (10:58 +0000)]
autotools: Add GLib/GTK configuration definitions to package cflags

Change-Id: I67e1d41ded89114db80dd33b966840fca6175eb0
Reviewed-on: https://code.wireshark.org/review/14048
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>
3 years agoautotools: Improve libnl configuration and dependency
João Valverde [Fri, 19 Feb 2016 05:05:00 +0000 (05:05 +0000)]
autotools: Improve libnl configuration and dependency

Change-Id: I3de7c2a6292a2f3fc57fdb849c23c3b31f6e4a13
Reviewed-on: https://code.wireshark.org/review/14052
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
3 years ago[Automatic update for 2016-02-21]
Gerald Combs [Sun, 21 Feb 2016 16:10:40 +0000 (08:10 -0800)]
[Automatic update for 2016-02-21]

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

Change-Id: I80f7d5b45ef26dc4fb1ca34d549acfb2c0a54bcf
Reviewed-on: https://code.wireshark.org/review/14054
Reviewed-by: Gerald Combs <gerald@wireshark.org>
3 years ago[SPICE] Prevent really long loop in dissect_spice_link_capabilities.
Michael Mann [Sun, 21 Feb 2016 13:46:22 +0000 (08:46 -0500)]
[SPICE] Prevent really long loop in dissect_spice_link_capabilities.

Not all paths will access the tvb to have it throw a bounds error for large loop values.

Bug: 12151
Change-Id: I74a6d0d8ddece0f95027493a7d408cc54d94d25a
Reviewed-on: https://code.wireshark.org/review/14051
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agoFix typo in PTP / Follow_Up Message / Follow Up information TLV.
Michael Mann [Sun, 21 Feb 2016 13:25:40 +0000 (08:25 -0500)]
Fix typo in PTP / Follow_Up Message / Follow Up information TLV.

scaledLastGMPhaseChange -> scaledLastGmFreqChange

Bug: 12150
Change-Id: I7b3d58c7d59364acb029e87f42da464c8840b95a
Reviewed-on: https://code.wireshark.org/review/14050
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agoautotools: Use pkg-config autoconf macros for GLib/GTK
João Valverde [Fri, 19 Feb 2016 08:20:35 +0000 (08:20 +0000)]
autotools: Use pkg-config autoconf macros for GLib/GTK

Remove mostly obsolete aclocal macros. Make GTK build flags a strict superset
of GLib flags. Use GTK build variables for GTK GUI and GLib elsewhere. Add
dependency flags explicitly instead of using WS_CPPFLAGS.

Some minor improvements and fixes for missing/unnecessary variables (no impact
on our test builds).

Change-Id: I3e1f067a875f79d6516c1fa7af986f17a7a6b671
Reviewed-on: https://code.wireshark.org/review/14005
Reviewed-by: João Valverde <j@v6e.pt>
3 years agoautotools: Cleanup some installation directory stuff
João Valverde [Sat, 20 Feb 2016 13:13:35 +0000 (13:13 +0000)]
autotools: Cleanup some installation directory stuff

Replace hacky code to set install dirs in config.h and use path definitions
only where required.

Change-Id: I78735f730725382c1b3aca876705e5e6e1872d78
Reviewed-on: https://code.wireshark.org/review/14033
Reviewed-by: João Valverde <j@v6e.pt>
3 years agoautotools: Fix multiple repetitions of -L build flags
João Valverde [Sat, 20 Feb 2016 16:18:59 +0000 (16:18 +0000)]
autotools: Fix multiple repetitions of -L build flags

Before:

  WS_LDFLAGS=' -Wl,--as-needed -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib'

After:

  WS_LDFLAGS=' -Wl,--as-needed -L/usr/local/lib'

Bumps autoconf required version to 2.64.

Change-Id: Idac0e0382481ddd954b07d9ac729f33c9d11639a
Reviewed-on: https://code.wireshark.org/review/14041
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>
3 years agoNo need to export the 48-byte-header Linux USB dissector.
Guy Harris [Sun, 21 Feb 2016 02:01:35 +0000 (18:01 -0800)]
No need to export the 48-byte-header Linux USB dissector.

Nobody looks it up, so just register it in the wtap_encap table, as we
do with the 64-byte-header Linux USB dissector, the USBPCAP dissector,
and the FreeBSD USB dissector.

Change-Id: I5da098d799a63449f17a26924b3ba2de36536896
Reviewed-on: https://code.wireshark.org/review/14046
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoDisssect the flags fields in the FreeBSD USB headers.
Guy Harris [Sun, 21 Feb 2016 00:55:52 +0000 (16:55 -0800)]
Disssect the flags fields in the FreeBSD USB headers.

Change-Id: I6f59028b1134378762691c35897cfcdc04e6dbfe
Reviewed-on: https://code.wireshark.org/review/14045
Reviewed-by: Guy Harris <guy@alum.mit.edu>
3 years agoieee80211: handle reserved grouping value
Peter Wu [Sat, 20 Feb 2016 15:51:15 +0000 (16:51 +0100)]
ieee80211: handle reserved grouping value

Prevents a buffer overrun (read). Show expert info such that it can be
detected (in case the value is non-reserved in the future).

Bug: 11818
Change-Id: I6cd2f4c9deb5cb515a53743aa83193521b2331e8
Reviewed-on: https://code.wireshark.org/review/14040
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agoMIP6: fix mip6.lri.reserved exists multiple times with NOT compatible types: FT_BOOLE...
Alexis La Goutte [Sat, 20 Feb 2016 15:32:07 +0000 (16:32 +0100)]
MIP6: fix mip6.lri.reserved exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT16

It is a typo on display field and fix also wrong comment...

Change-Id: Idb93641d6e4197b59e453e4ad629af4c0454c8d3
Reviewed-on: https://code.wireshark.org/review/14038
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agoDLM3: Remove macro for declare header field (hf)
Alexis La Goutte [Fri, 19 Feb 2016 20:08:08 +0000 (21:08 +0100)]
DLM3: Remove macro for declare header field (hf)

checkhf don't like macro and for avoid warning/error, remove macro for declare hf

Change-Id: I5521b3176027ddc673e8f6c793ab4eb0d01cd8fd
Reviewed-on: https://code.wireshark.org/review/14018
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agoMIH: fix exists multiple times with NOT compatible types
Alexis La Goutte [Sat, 20 Feb 2016 12:57:21 +0000 (13:57 +0100)]
MIH: fix exists multiple times with NOT compatible types

'mih.tlv_length' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT8
'mih.mihf_id' exists multiple times with NOT compatible types: FT_ETHER and FT_STRING
'mih.mihf_id' exists multiple times with NOT compatible types: FT_IPv4 and FT_ETHER
'mih.mihf_id' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4

Change-Id: Ib4be551920c7389100ece668e1af288a7d712725
Reviewed-on: https://code.wireshark.org/review/14027
Reviewed-by: Michael Mann <mmann78@netscape.net>
3 years agoFix various off-by-one in buffer sizes
Peter Wu [Sat, 20 Feb 2016 15:02:54 +0000 (16:02 +0100)]
Fix various off-by-one in buffer sizes

Some only allow buffer overruns (read), others also buffer overflows
(write).

Found by looking for '\[ *N *\]' where N is 255, 0xff, 15 and 0xf (case
insensitive).

Change-Id: I250687e2fdeb8fbd5eaf0bbb8251c3dab9640760
Reviewed-on: https://code.wireshark.org/review/14034
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
3 years agober: fix buffer overrun when handling empty sets
Peter Wu [Sat, 20 Feb 2016 14:06:50 +0000 (15:06 +0100)]
ber: fix buffer overrun when handling empty sets

When a set is empty, only a terminator (ber_sequence_t with NULL func)
is present. In that case, do not try to find more values as that will
never succeed.

Bug: 12106
Change-Id: I26cd4ba84a9580e92d5921592a27c2af17c0bebf
Reviewed-on: https://code.wireshark.org/review/14028
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
3 years agogsm_abis_oml: fix buffer overrun
Peter Wu [Sat, 20 Feb 2016 14:27:40 +0000 (15:27 +0100)]
gsm_abis_oml: fix buffer overrun

Do not read outside boundaries when tag is exactly 0xff.

    tag = tvb_get_guint8(tvb, offset);
    tdef = find_tlv_tag(tag);
        ...
        return &nm_att_tlvdef_base.def[tag];

Bug: 11825
Change-Id: I42e624185abb2166aa0f8d0dbd71a2a86fc0b18e
Reviewed-on: https://code.wireshark.org/review/14030
Reviewed-by: Peter Wu <peter@lekensteyn.nl>