metze/wireshark/wip.git
7 years ago[SIP] Start dissecting generic parameters.
AndersBroman [Tue, 7 Mar 2017 15:57:12 +0000 (16:57 +0100)]
[SIP] Start dissecting generic parameters.

Change-Id: I5d5c2f8cfc78c4557a9fcd61a47b39e7c8b50cad
Reviewed-on: https://code.wireshark.org/review/20437
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoDon't close the pcap_t in get_data_link_types().
Guy Harris [Tue, 7 Mar 2017 22:08:53 +0000 (14:08 -0800)]
Don't close the pcap_t in get_data_link_types().

1) Its caller closes it, and closing a closed pcap_t can cause Bad
Things to happen.

2) We're trying to get an error string from it after we're closing it,
which won't work well, either.

While we're at it, don't use pcap_statustostr() if we don't have it (we
have it iff we have pcap_create()).

Change-Id: Ieded1e3ae78aea4e0970cf582e780c2846fe9dd5
Reviewed-on: https://code.wireshark.org/review/20443
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoftypes: create a set_value union
Martin Kaiser [Sat, 4 Mar 2017 15:15:54 +0000 (16:15 +0100)]
ftypes: create a set_value union

struct _ftype_t contains a number of pointers to set_value_...()
functions. For each pre-defined ftype_t, only one of these pointers
is != NULL.

As the comment already says, we should move these functions into a
union. ftenum_t ftype will be used for selecting the correct function
pointer from the union.

Create a set_value union and move the FvalueSetByteArrayFunc pointer
into the union. Update fvalue_set_byte_array() accordingly. Check
that the fvalue_t parameter is of the correct type.

Change-Id: I6568d8f47108311289c0cd425f28ea8b38046141
Reviewed-on: https://code.wireshark.org/review/20433
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years agonsh: add protocol dissection over ethernet
Gabriel Ganne [Fri, 8 Jul 2016 12:11:21 +0000 (14:11 +0200)]
nsh: add protocol dissection over ethernet

Change-Id: I4cbfb5d4371fa4401f591d5e52a603ae1256c23c
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Reviewed-on: https://code.wireshark.org/review/20435
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years ago[SIP] Handle P-Access-Network-Info Headers parameter without '='.
AndersBroman [Tue, 7 Mar 2017 13:30:06 +0000 (14:30 +0100)]
[SIP] Handle P-Access-Network-Info Headers parameter without '='.

Change-Id: I6cb5bc6c3cd612b4770d578edaf1c9a877659d8e
Reviewed-on: https://code.wireshark.org/review/20436
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agortpproxy: fix this statement may fall through [-Werror=implicit-fallthrough=] found...
Alexis La Goutte [Sun, 5 Mar 2017 16:31:59 +0000 (17:31 +0100)]
rtpproxy: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: Ide19cb51d5ce0a9d0a0634ad492c9e81cbc2c810
Reviewed-on: https://code.wireshark.org/review/20411
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
7 years agoandroiddump: Fix a type
Stig Bjørlykke [Tue, 7 Mar 2017 06:35:33 +0000 (07:35 +0100)]
androiddump: Fix a type

Change-Id: I839e7e7300af9b90e91548fa29157143ae00adee
Reviewed-on: https://code.wireshark.org/review/20434
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
7 years agolua: improve FileHandler:[seek_]read behavior and documentation
Peter Wu [Wed, 21 Dec 2016 01:31:35 +0000 (02:31 +0100)]
lua: improve FileHandler:[seek_]read behavior and documentation

WSLUA documents FileHandler:read as returning a boolean or integer.
Ignore strings, do not treat strings as number even if it is possible.

Remove undocumented feature of FileHandler:seek_read that used returned
strings as the frame data. Use FrameInfo:read_data instead. This avoids
interpreting numbers as data which caused surprising behavior when
combining with FileHandler:read.

Documentation has been improved to document the return value, this is
consistent with the documentation in the WSLUA tests.

Change-Id: I31f74ec33ff0e43c90d83c1904af43801886cfa1
Reviewed-on: https://code.wireshark.org/review/19366
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoandroiddump: Add ignore log-buffer and custom-options for logcat-text
Michal Labedzki [Sat, 28 Jan 2017 18:16:15 +0000 (19:16 +0100)]
androiddump: Add ignore log-buffer and custom-options for logcat-text

Logcat Text interfaces have now two new options:
1. Ignore log-buffer - this means you start capturing immediately
   and there will no logs from buffer
2. Custom-options - pass command line parameters to logcat, like tags
For example:
adb logcat -v threadtime -b main #now custom parameters starts# -T 20 -s Ads Wireshark

Please note that some custom options are banned to avoid unexpected
behaviour (like "not working")

Change-Id: I015d1aeae35cfed712de59138288d82d3a491c38
Reviewed-on: https://code.wireshark.org/review/20358
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoRadioTap TimeStamp field added.
Boazi [Thu, 23 Feb 2017 16:52:52 +0000 (18:52 +0200)]
RadioTap TimeStamp field added.

Timestamp was added according to radiotap spec.
Original changes provided by Johannes Berg from Intel

Change-Id: I72cb315626787d85b2bfb676c8ea7c73130f5a69
Reviewed-on: https://code.wireshark.org/review/20282
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>
7 years agoopa: fix this statement may fall through [-Werror=implicit-fallthrough=] found by...
Alexis La Goutte [Sun, 5 Mar 2017 16:22:37 +0000 (17:22 +0100)]
opa: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I1edb5a3f7c9ac94c2a922058ca54d4b3e9218b0e
Reviewed-on: https://code.wireshark.org/review/20408
Reviewed-by: Adam Goldman <adam.goldman@intel.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
7 years agoSwitch conversations to use wmem_tree_t instead of (sorted) GSList.
Michael Mann [Tue, 7 Feb 2017 22:05:17 +0000 (17:05 -0500)]
Switch conversations to use wmem_tree_t instead of (sorted) GSList.

Change-Id: Ifaf25ca5a7974f1d398ceebbb4c6733d4d3e001a
Reviewed-on: https://code.wireshark.org/review/20006
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>
7 years agogsm_rr_csn_flag -> proto_tree_add_bits_item when not using return value (CID-281350).
Michael Mann [Sun, 5 Mar 2017 18:10:16 +0000 (13:10 -0500)]
gsm_rr_csn_flag -> proto_tree_add_bits_item when not using return value (CID-281350).

When flags aren't used in flow control decisions, the function is
effectively proto_tree_add_bits_item, so make it so.

Change-Id: Ic82e734ddd24d41fe7c36e435cc941ed872c3b03
Reviewed-on: https://code.wireshark.org/review/14773
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>
7 years agoFix issue with dissecting multiple DT1 packets in the frame
Rustam Safargalin [Wed, 2 Nov 2016 08:36:09 +0000 (11:36 +0300)]
Fix issue with dissecting multiple DT1 packets in the frame

When parameter 'Reassemble SCCP messages' enabled in case there
are more than one complete DT1 in the frame they had not been
dissected.

Bug: 11130
Bug: 3360
Change-Id: Iba9093105fcd95dc398607c950129ed1db866c85
Reviewed-on: https://code.wireshark.org/review/18615
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>
7 years agobluetooth: fix this statement may fall through [-Werror=implicit-fallthrough=] found...
Alexis La Goutte [Sun, 5 Mar 2017 15:20:15 +0000 (16:20 +0100)]
bluetooth: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I4d8e6f32b08991f49ee22b320f02c1f65e22b6a0
Reviewed-on: https://code.wireshark.org/review/20400
Reviewed-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
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>
7 years agoClean up indentation.
Guy Harris [Mon, 6 Mar 2017 02:30:43 +0000 (18:30 -0800)]
Clean up indentation.

Consistently use 4-space indentation.

Change-Id: I8418241924a5b77a9e223869ff707335b8a52b75
Reviewed-on: https://code.wireshark.org/review/20419
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoRename a data structure to reflect what it represents.
Guy Harris [Mon, 6 Mar 2017 02:11:22 +0000 (18:11 -0800)]
Rename a data structure to reflect what it represents.

The structure called a pcap_options structure doesn't (only) hold
options for a packet capture; it holds all information about a
particular device, pipe, or socket from which we're capturing.  Rename
it capture_src - and rename all the pointer variables that point to
something of that type to pcap_src from pcap_opts.

Change-Id: I8476146f174c82f331227528381defcc2828d822
Reviewed-on: https://code.wireshark.org/review/20416
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agovrrp: fix this statement may fall through [-Werror=implicit-fallthrough=] found by...
Alexis La Goutte [Sun, 5 Mar 2017 16:56:35 +0000 (17:56 +0100)]
vrrp: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I45748459e4024d918ef9b146e8a62f54e2d91b65
Reviewed-on: https://code.wireshark.org/review/20413
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoieee80211: fix this statement may fall through [-Werror=implicit-fallthrough=] found...
Alexis La Goutte [Sun, 5 Mar 2017 15:35:02 +0000 (16:35 +0100)]
ieee80211: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I294e0f426d760d0ccb59ebd8ea509245af1293a5
Reviewed-on: https://code.wireshark.org/review/20405
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoBGP: fix this statement may fall through [-Werror=implicit-fallthrough=] found by...
Alexis La Goutte [Sun, 5 Mar 2017 15:13:45 +0000 (16:13 +0100)]
BGP: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I7cb6f73efb1e37eba977dc6912041d5969989696
Reviewed-on: https://code.wireshark.org/review/20399
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoenip: fix this statement may fall through [-Werror=implicit-fallthrough=] found by...
Alexis La Goutte [Sun, 5 Mar 2017 15:32:19 +0000 (16:32 +0100)]
enip: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I134262482c259a9f30bfeec7bf28441d0d37d499
Reviewed-on: https://code.wireshark.org/review/20404
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agodissectors: fix this statement may fall through [-Werror=implicit-fallthrough=] found...
Alexis La Goutte [Sun, 5 Mar 2017 18:38:59 +0000 (19:38 +0100)]
dissectors: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: Iba6238988ded675cba328ab512232d1919d93b4a
Reviewed-on: https://code.wireshark.org/review/20415
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agodumpcap: fix this statement may fall through [-Werror=implicit-fallthrough=] found...
Alexis La Goutte [Sun, 5 Mar 2017 18:38:07 +0000 (19:38 +0100)]
dumpcap: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I46bf9ae4150d9bd7efe5387919091ac49143232d
Reviewed-on: https://code.wireshark.org/review/20414
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agorsvp: fix this statement may fall through [-Werror=implicit-fallthrough=] found by...
Alexis La Goutte [Sun, 5 Mar 2017 16:28:37 +0000 (17:28 +0100)]
rsvp: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I6e9d15ef9306433b982d6aff670c38ca8a0b4e85
Reviewed-on: https://code.wireshark.org/review/20410
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agopacketbb: fix this statement may fall through [-Werror=implicit-fallthrough=] found...
Alexis La Goutte [Sun, 5 Mar 2017 16:23:33 +0000 (17:23 +0100)]
packetbb: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: Id1fb00f95608e7ad09f9eb48f1d98f5849ae575b
Reviewed-on: https://code.wireshark.org/review/20409
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agonstrace: fix this statement may fall through [-Werror=implicit-fallthrough=] found...
Alexis La Goutte [Sun, 5 Mar 2017 16:15:51 +0000 (17:15 +0100)]
nstrace: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I1943798d8dc7449e962856fef6286b9d74be0d34
Reviewed-on: https://code.wireshark.org/review/20407
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agonasdap-itch: fix this statement may fall through [-Werror=implicit-fallthrough=]...
Alexis La Goutte [Sun, 5 Mar 2017 16:13:33 +0000 (17:13 +0100)]
nasdap-itch: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I1a0038219271c9346c0c66738b75ab087b78be82
Reviewed-on: https://code.wireshark.org/review/20406
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoerf: fix this statement may fall through [-Werror=implicit-fallthrough=] found by...
Alexis La Goutte [Sun, 5 Mar 2017 15:31:22 +0000 (16:31 +0100)]
erf: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I377a62a2702b89242a0abfb51f5617f265f698f3
Reviewed-on: https://code.wireshark.org/review/20403
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agogsm_a_bssmap: fix this statement may fall through [-Werror=implicit-fallthrough=...
Alexis La Goutte [Sun, 5 Mar 2017 15:27:13 +0000 (16:27 +0100)]
gsm_a_bssmap: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: Ic45f7e7bbeb73e0a222d4837694bb781157ae042
Reviewed-on: https://code.wireshark.org/review/20402
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agocsn1: fix this statement may fall through [-Werror=implicit-fallthrough=] found by...
Alexis La Goutte [Sun, 5 Mar 2017 15:21:44 +0000 (16:21 +0100)]
csn1: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I11b943736a4f0835e8432db95b7d471244b08a16
Reviewed-on: https://code.wireshark.org/review/20401
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agobacapp: fix this statement may fall through [-Werror=implicit-fallthrough=] found...
Alexis La Goutte [Sun, 5 Mar 2017 15:08:21 +0000 (16:08 +0100)]
bacapp: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I35174c0a94f4fc36435541b136f4f899e24e6867
Reviewed-on: https://code.wireshark.org/review/20398
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoieee802154: add modelines info
Alexis La Goutte [Sun, 5 Mar 2017 15:46:07 +0000 (15:46 +0000)]
ieee802154: add modelines info

Change-Id: Ieaa9b9db97cd1753e3c395f19ae005c4df1bee3a
Reviewed-on: https://code.wireshark.org/review/20394
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoieee80211: fix indent (missing spaces)
Alexis La Goutte [Sun, 5 Mar 2017 15:42:48 +0000 (15:42 +0000)]
ieee80211: fix indent (missing spaces)

Change-Id: Ic10c9aff5058f75d31029f5d4ac7b0ce38dcc8c7
Reviewed-on: https://code.wireshark.org/review/20393
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years ago[Automatic update for 2017-03-05]
Gerald Combs [Sun, 5 Mar 2017 17:02:43 +0000 (09:02 -0800)]
[Automatic update for 2017-03-05]

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

Change-Id: I074b964d75082adc6ab216514c36abf3d54c6a0a
Reviewed-on: https://code.wireshark.org/review/20395
Reviewed-by: Gerald Combs <gerald@wireshark.org>
7 years agolemon: fix this statement may fall through [-Werror=implicit-fallthrough=] found...
Alexis La Goutte [Sun, 5 Mar 2017 14:34:39 +0000 (15:34 +0100)]
lemon: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: If52bc0092f1baa833e35a9f4c107faf72c3b64d1
Reviewed-on: https://code.wireshark.org/review/20392
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agotools: add more entries to valgrind suppression file (libc).
Dario Lombardo [Wed, 22 Feb 2017 09:41:38 +0000 (10:41 +0100)]
tools: add more entries to valgrind suppression file (libc).

Remove leak from dl_init.

Change-Id: Iaefc20bd0c71157d604f8f0b2538dc2481fc56db
Reviewed-on: https://code.wireshark.org/review/20248
Reviewed-by: Evan Huus <eapache@gmail.com>
7 years agotools: add more entries to valgrind suppression file (glib).
Dario Lombardo [Wed, 22 Feb 2017 09:40:29 +0000 (10:40 +0100)]
tools: add more entries to valgrind suppression file (glib).

Remove leaks coming from glib.

Change-Id: I05fc6b1143e2d20c953a2c602989cec0cc786f27
Reviewed-on: https://code.wireshark.org/review/20247
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoDOF: ensure to return a value different from 0 when asking for more data
Pascal Quantin [Sun, 5 Mar 2017 11:11:37 +0000 (12:11 +0100)]
DOF: ensure to return a value different from 0 when asking for more data

Bug: 13453
Change-Id: I331fb5f662f152c9c16b0d8ccbe228cded8ca85d
Reviewed-on: https://code.wireshark.org/review/20389
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
7 years agoDOF: fix an infinite loop in sid_buffer_hash_fn()
Pascal Quantin [Sun, 5 Mar 2017 10:29:04 +0000 (11:29 +0100)]
DOF: fix an infinite loop in sid_buffer_hash_fn()

The sid buffer can contain up to 255 bytes of data, so the loop counter must
be a guint16 at least.

Bug: 13453
Change-Id: I997ce1a737532d94796586d7e109d89b2dc1911b
Reviewed-on: https://code.wireshark.org/review/20388
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
7 years agowmem: Ensure callbacks are initialized and not accidentally unregistered
Michael Mann [Sat, 4 Mar 2017 23:33:33 +0000 (18:33 -0500)]
wmem: Ensure callbacks are initialized and not accidentally unregistered

Start the "callback register ID" at 1, so that zeroed out callback IDs
are not found during unregister.

Change-Id: I1d7d70f53d89c40e07d1637e1e195dd027855ed3
Reviewed-on: https://code.wireshark.org/review/20385
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
7 years agoAdd wmem_tree_destroy
Michael Mann [Sat, 4 Mar 2017 13:26:22 +0000 (08:26 -0500)]
Add wmem_tree_destroy

Allows the cleanup of NULL scoped wmem trees

Change-Id: I7c49a224ca7e2f7ddfe0e38d3ea0e79aa2cb057c
Reviewed-on: https://code.wireshark.org/review/20382
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: Evan Huus <eapache@gmail.com>
7 years agoAdd wmem_tree_count.
Michael Mann [Tue, 7 Feb 2017 21:52:42 +0000 (16:52 -0500)]
Add wmem_tree_count.

There are cases where wmem_tree needs to know its number of nodes.

Change-Id: I6411cf4275fd4d85a1d76382e1922d236be3b176
Reviewed-on: https://code.wireshark.org/review/20005
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agopacket-hp-erm.c: Add is_tagged flag
Gene Cumm [Sun, 26 Feb 2017 18:06:39 +0000 (13:06 -0500)]
packet-hp-erm.c: Add is_tagged flag

Remove the high bit from hp_erm.unknown3 for hp_erm.is_tagged flag.
This value was found by observation.

Also realign the static value declarations and some other cleanup

Change-Id: I8ca701cad0456c1af561fe4238e4686dc9c83c40
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
Reviewed-on: https://code.wireshark.org/review/20288
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoLogcat-text: use GRegex optimizations
Michal Labedzki [Sun, 29 Jan 2017 18:03:51 +0000 (19:03 +0100)]
Logcat-text: use GRegex optimizations

"G_REGEX_OPTIMIZE - Optimize the regular expression. If the pattern
will be used many times, then it may be worth the effort to optimize
it to improve the speed of matches." - Glib documentation.

It is possible to capture a lot of Logcat logs or these log may
flooding us. Optimizations are welcome.

Change-Id: If753e795efe30b014a5fad11c8ebbcd4da3824a6
Reviewed-on: https://code.wireshark.org/review/20357
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoRPKI-RTR: Add new error code
Alexis La Goutte [Sat, 4 Mar 2017 14:29:39 +0000 (15:29 +0100)]
RPKI-RTR: Add new error code

From RFC-ietf-sidr-rpki-rtr-rfc6810-bis-09

Change-Id: Ice24416515448c633eb436f5f08320561c2a6a6a
Reviewed-on: https://code.wireshark.org/review/20384
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoextcap: Minor improvements
Roland Knall [Fri, 3 Mar 2017 21:04:18 +0000 (22:04 +0100)]
extcap: Minor improvements

Add method for searching for tools by ifname and minor improvements
in the interface callback to save time and space

Change-Id: I0073c96fbee846cc5ff6304823fa14564ff36c22
Reviewed-on: https://code.wireshark.org/review/20376
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
7 years agoFix the calculation of the number of levels in the radix tree.
Guy Harris [Sat, 4 Mar 2017 04:34:59 +0000 (20:34 -0800)]
Fix the calculation of the number of levels in the radix tree.

The algorithm being used calculated the number of levels in a
1024-leaf-node tree as being 2, but it's 1 - 0 elements means 0 levels,
1 through 1024 elements means 1 level, 1025 through 1024^2 elements
means 2 levels, etc..  With a count of 1024, the loop would bump the
level count from 0 to 1, and divide the element count by 1024, yielding
1, so the loop would not terminate, and the level count would them go
from 1 to 2 and the element count would go to 0.

This could cause problems if exactly 1024 packets were seen.

Just use an if chain, similar to the one used when adding elements to
the tree.

Bug: 13433
Change-Id: I3eaeaf374bb65b37b38a59e95f77cac6690614ed
Reviewed-on: https://code.wireshark.org/review/20379
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoBluetooth: HCI: A few minor improvements
Michal Labedzki [Wed, 23 Nov 2016 12:26:17 +0000 (13:26 +0100)]
Bluetooth: HCI: A few minor improvements

1. According to ESR05 there is no event called "Bluetooth Logo Testing".
2. According to ESR09 error code 0x23 is also "LL Procedure Collision"
3. Add some HCI status for event for HCI Summary

bthci_evt is now up-to-date with Bluetooth Core 4 + CSA4 + CSS6 and ERS09
- nothing to implementing...

Change-Id: Ief9e2de61be91942ab2211de6bc44a8f15d12426
Reviewed-on: https://code.wireshark.org/review/20355
Petri-Dish: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoQt: Apply selected bookmark display filter
Stig Bjørlykke [Wed, 1 Mar 2017 09:11:27 +0000 (10:11 +0100)]
Qt: Apply selected bookmark display filter

When selecting a display filter from the bookmark list this filter
should be applied, because that's the most common action for a user.

Holding down the the Alt key will only prepare the filter.

Change-Id: I567ee8a2a70a3de07fea33fa5763d9efba591de3
Reviewed-on: https://code.wireshark.org/review/20317
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
7 years agopluginIF: Allow en-/disable of elements
Roland Knall [Fri, 3 Mar 2017 19:55:13 +0000 (20:55 +0100)]
pluginIF: Allow en-/disable of elements

Allow the enable/disable of an element

Change-Id: I9652e8d74b261ba259cebfba53e7bc7ef560d347
Reviewed-on: https://code.wireshark.org/review/20370
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
7 years agoCheck profile directory before personal directory for services and subnets file
Michael Mann [Mon, 23 Jan 2017 03:51:54 +0000 (22:51 -0500)]
Check profile directory before personal directory for services and subnets file

Bug: 11228
Change-Id: Id8bcc51ff694ef9f2019bc7509e440021d049d22
Reviewed-on: https://code.wireshark.org/review/19735
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: Peter Wu <peter@lekensteyn.nl>
7 years agoFix compile error about missing intializer.
Joerg Mayer [Fri, 3 Mar 2017 20:58:48 +0000 (21:58 +0100)]
Fix compile error about missing intializer.

Change-Id: I5ff757c199df5cf78d9c625bf2f69e9c62dc3f61
Reviewed-on: https://code.wireshark.org/review/20375
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
7 years agoBluetooth: HCI_EVT: Implement all remaining events/commands
Michal Labedzki [Tue, 22 Nov 2016 12:35:21 +0000 (13:35 +0100)]
Bluetooth: HCI_EVT: Implement all remaining events/commands

Event:
  Authenticated Payload Timeout Expired
Commands:
  Set Connectionless Slave Broadcast
  Set Connectionless Slave Broadcast Receive
  Set MWS Signaling
  Read Synchronization Train Parameters
  Write Synchronization Train Parameters
  Read Secure Connections Host Support
  Read Authenticated Payload Timeout
  Read Local OOB Extended Data
  Read Extended Page Timeout
  Read Extended Inquiry Length
  LE Read Suggested Default Data Length
  LE Write Suggested Default Data Length
  LE Read Resolving List Size
  LE Read Peer Resolvable Address
  LE Read Local Resolvable Address
  LE Read Maximum Data Length

Change-Id: Id57693b284151b054b7e06237744629a6af98057
Reviewed-on: https://code.wireshark.org/review/20354
Petri-Dish: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoQt: Fix goto next/prev packet toolbar buttons
Stig Bjørlykke [Fri, 3 Mar 2017 07:52:29 +0000 (08:52 +0100)]
Qt: Fix goto next/prev packet toolbar buttons

Use bitwise AND to check if a modifier bit is set.

Also changed from MetaModifier to AltModifier to match the comment
and the modifier key used in "Next/Previous Packet in History".

Change-Id: I89072a1dfdd14a2beb7344a672cbc18a3ace8924
Reviewed-on: https://code.wireshark.org/review/20359
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
7 years agoUpdate documentation with reference to $XDG_CONFIG_HOME
Peter Wu [Fri, 3 Mar 2017 11:31:14 +0000 (12:31 +0100)]
Update documentation with reference to $XDG_CONFIG_HOME

Since v2.1.0rc0-184-gb0b53fa593, $XDG_CONFIG_HOME/wireshark (instead of
$HOME/.wireshark) is used, clarify this in the WSUG and manuals.

Change-Id: I74a6f9b86bd8d54ee326ca83d7536e091d6da08a
Reviewed-on: https://code.wireshark.org/review/20364
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>
7 years agoSIP: Add digest verification functionality
erikdejong [Tue, 28 Feb 2017 19:24:41 +0000 (20:24 +0100)]
SIP: Add digest verification functionality

Added functionality to verify SIP authorization lines. With this functionality
it's possible to find faulty passwords that were added to configuration by
automatic processes (eg having unescaped '&' characters in XML config
files) resulting in authorization failures that cannot be diagnosed
otherwise.
Other uses include bug hunting in SIP stacks.

Bug: 13444
Change-Id: I5abecd048480c8f5130a5112c531587c5993f12f
Reviewed-on: https://code.wireshark.org/review/20314
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoIAX2: Add a timestamp check.
Gerald Combs [Fri, 3 Mar 2017 18:04:58 +0000 (10:04 -0800)]
IAX2: Add a timestamp check.

Don't try to process timestamps that are more than 60 seconds apart.
Avoids the infinite loop in bug 13432.

Bug: 13432
Change-Id: I05aea4c733c94cbfe832f03ba826c74a41e6bb2f
Reviewed-on: https://code.wireshark.org/review/20366
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
7 years agoQt: reduce minimum window size requirement
Peter Wu [Thu, 2 Mar 2017 21:19:19 +0000 (22:19 +0100)]
Qt: reduce minimum window size requirement

Strip some padding from the main welcome screen and lower the minimum
width to allow the window to be shrinked. Even when a capture file was
open, the minimum dimensions from the main welcome screen would apply.

The minimum dimensions on Arch Linux with Qt 5.8.0-5 and Plasma 5.9.2
(with the default Breeze theme) for a window have changes as follows:
 - main screen/pcap loaded: 746x626 -> 702x590
 - with search bar opened:  826x658 -> 826x622
(These numbers exclude 35x10 window decoration.)

Change-Id: Iccc43ee55803abb8105c0d9664368aab09e8cfcf
Reviewed-on: https://code.wireshark.org/review/20343
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agopluginIf: Add/Remove single entries from selector
Roland Knall [Fri, 3 Mar 2017 10:53:39 +0000 (11:53 +0100)]
pluginIf: Add/Remove single entries from selector

Allow to add and remove single items from a selector list and also
fixing the selection of items in a selector list

Change-Id: I0c69ea97db6ca1a6932939f0df9049c6fb720f77
Reviewed-on: https://code.wireshark.org/review/20363
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
7 years agoWSDG: update for $XDG_CONFIG_HOME
Peter Wu [Fri, 3 Mar 2017 11:39:14 +0000 (12:39 +0100)]
WSDG: update for $XDG_CONFIG_HOME

Since v2.1.0rc0-184-gb0b53fa593, the config directory has changed.

Change-Id: Idbeb62f2393d1a4ec192da2d85e6bfb76782aeb8
Reviewed-on: https://code.wireshark.org/review/20365
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
7 years agoieee80211: fix minimum TCLAS length
Marcin Rokicki [Fri, 3 Mar 2017 10:08:08 +0000 (11:08 +0100)]
ieee80211: fix minimum TCLAS length

TCLAS IE contains a set of parameters to identify incoming
frames with a TS.
During verification with various types of classifier types
Wireshark prints Error/Malformed message for type 2 (IEEE802.1Q)

IEEE802.11e defines that for classifier type 2 frame length is
5 not 6.

Change-Id: Icf61f7fb65e5b119aedbb664b4adaee1f1e9fde8
Signed-off-by: Marcin Rokicki <marcin.rokicki@gmail.com>
Reviewed-on: https://code.wireshark.org/review/20361
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>
7 years agoHaving business-as-usually unused words for specific "users" in TIPC not shown
Martin Peylo [Thu, 2 Mar 2017 16:07:40 +0000 (18:07 +0200)]
Having business-as-usually unused words for specific "users" in TIPC not shown
as needlessly highlighted expert info but as normal text in the protocol tree.

Change-Id: I41028b00c6c5cdb85e399c959df721d768f674e1
Reviewed-on: https://code.wireshark.org/review/20360
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>
7 years agoDiameter 3GPP: update Rx Feature-List AVP
Pascal Quantin [Fri, 3 Mar 2017 10:13:44 +0000 (11:13 +0100)]
Diameter 3GPP: update Rx Feature-List AVP

Change-Id: Ia4fa3687173f8642f80e650df3e713a26e9a17b5
Reviewed-on: https://code.wireshark.org/review/20362
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoBluetooth: HCI_EVT: Implement "Read Local Supported Codecs"
Michal Labedzki [Tue, 22 Nov 2016 12:30:18 +0000 (13:30 +0100)]
Bluetooth: HCI_EVT: Implement "Read Local Supported Codecs"

Implement event reponse for command "Read Local Supported Codecs".

Change-Id: I38946f4744b2d2d586384125700e937db698038c
Reviewed-on: https://code.wireshark.org/review/20353
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>
7 years agoBluetooth: HCI_EVT: Add missing unit for generated field
Michal Labedzki [Thu, 2 Mar 2017 15:04:48 +0000 (16:04 +0100)]
Bluetooth: HCI_EVT: Add missing unit for generated field

Add missing unit [ms] for "Command-Response Delta"

Change-Id: I7ba31fc6bf3baae161608432ea5fcd1015414604
Reviewed-on: https://code.wireshark.org/review/20356
Petri-Dish: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoQt: Add selection history navigation.
Gerald Combs [Wed, 1 Mar 2017 16:03:17 +0000 (10:03 -0600)]
Qt: Add selection history navigation.

Add the ability to move back and forth in the packet selection history
similar to GTK+. Update the documentation accordingly.

Change-Id: If1fdc1e59b240c0588c292dc0f7f0a5f083c30e1
Reviewed-on: https://code.wireshark.org/review/20320
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>
7 years agoBT-DHT: add IPv6 support for find_node responses
Florian Adamsky [Tue, 28 Feb 2017 20:19:48 +0000 (21:19 +0100)]
BT-DHT: add IPv6 support for find_node responses

Change-Id: I4ce38892b6c287c2dc51f438a12a5be5920197b6
Reviewed-on: https://code.wireshark.org/review/20323
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoQt: allow Packet Bytes view to be shrinked
Peter Wu [Thu, 2 Mar 2017 21:10:36 +0000 (22:10 +0100)]
Qt: allow Packet Bytes view to be shrinked

Even if a packet has only one or two lines for the byte view, Qt
autoresizing insists to require a minimum of 5.5 lines (or 7.5 lines for
packets without multiple data sources). Remove this artificial
requirement and allow the packet bytes view to be resized to show
nothing (except for possible data sources tabs).

This makes it easier to fit more packets and details for screenshots.

Change-Id: I3ea997b9effa8292b396dc2ceb2ab1c35cead410
Reviewed-on: https://code.wireshark.org/review/20342
Reviewed-by: Gerald Combs <gerald@wireshark.org>
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>
7 years agoSquelch a warning from VS Code Analysis.
Guy Harris [Fri, 3 Mar 2017 02:54:26 +0000 (18:54 -0800)]
Squelch a warning from VS Code Analysis.

It warns that a 32-bit value is being shifted left and then converted to
a 64-bit type; presumably it means "this might overflow and not give you
the result you expect".  That's unlikely to be the case here, as few
UN*X file systems have a recommended I/O block size > 2^30, but we might
as well throw in a cast so the convert-to-a-64-bit-type is done first.

Change-Id: Id6ab11d750d5cf4cc03d060d63edc01b66cd179d
Reviewed-on: https://code.wireshark.org/review/20352
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoFix compilation with old libcrypt versions.
Guy Harris [Fri, 3 Mar 2017 02:04:41 +0000 (18:04 -0800)]
Fix compilation with old libcrypt versions.

Change-Id: If9c0631435e5380d3f158ebe6578adaf65a429bb
Reviewed-on: https://code.wireshark.org/review/20351
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>
7 years agoerf: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Thu, 2 Mar 2017 21:37:48 +0000 (22:37 +0100)]
erf: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I7214adc58362902790c006e1e22f77104be5df2e
Reviewed-on: https://code.wireshark.org/review/20341
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>
7 years agoRewrite dissectors to use Libgcrypt functions.
Erik de Jong [Mon, 13 Feb 2017 18:31:26 +0000 (19:31 +0100)]
Rewrite dissectors to use Libgcrypt functions.

As discussed on the mailinglist, rewriting dissectors to use Libgcrypt
functions as Libgcrypt will be mandatory after change 20030.
Removal of following functions:
- crypt_md4
- crypt_rc4*
- aes_cmac_encrypt_*
- md5_*
- sha1_*
- sha256_*

Further candidates:
- aes_*
- rijndael_*
- ...

Added functions:
- ws_hmac_buffer

Added const macros:
- HASH_MD5_LENGTH
- HASH_SHA1_LENGTH

Changes on epan/crypt/* verified with captures from
https://wiki.wireshark.org/HowToDecrypt802.11
Changes on packet-snmp.c and packet-radius.c verified with captures from
https://wiki.wireshark.org/SampleCapture
Changes on packet-tacacs.c verified with capture from
http://ccie-in-3-months.blogspot.nl/2009/04/decoding-login-credentials-regardless.html

Change-Id: Iea6ba2bf207cf0f1bf2117068fb1abcfeaafaa46
Link: https://www.wireshark.org/lists/wireshark-dev/201702/msg00011.html
Reviewed-on: https://code.wireshark.org/review/20095
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agoRemove a cast that now causes rather than squelching warnings.
Guy Harris [Thu, 2 Mar 2017 23:02:14 +0000 (15:02 -0800)]
Remove a cast that now causes rather than squelching warnings.

We're now comparing an unsigned with an expression made mostly of
unsigned, so there's no need to cast the expression to long to squelch
signed vs. unsigned warnings.

Change-Id: I3b8c6f6faf26a9c252eb55d9e69fb298a3ad4c3b
Reviewed-on: https://code.wireshark.org/review/20347
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoMake sure nspr_getv20recordsize() returns an unsigned value.
Guy Harris [Thu, 2 Mar 2017 22:51:43 +0000 (14:51 -0800)]
Make sure nspr_getv20recordsize() returns an unsigned value.

The record size fields are guint8, but NSPR_V20RECORDSIZE_2BYTES was
0x80, which has type int, promoting the result to int.  Make it 0x80U,
which means everything is unsigned.

This squelches a compiler warning.

Change-Id: I1c63e485352a90c7f675ab0dacaaeba794235b35
Reviewed-on: https://code.wireshark.org/review/20344
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoAdd more sanity checks.
Guy Harris [Thu, 2 Mar 2017 21:03:09 +0000 (13:03 -0800)]
Add more sanity checks.

Bug: 13431
Change-Id: I330cb087c6e89277120057019cb5155f005ed269
Reviewed-on: https://code.wireshark.org/review/20337
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoUse glib-compat
AndersBroman [Thu, 2 Mar 2017 15:17:56 +0000 (16:17 +0100)]
Use glib-compat

Change-Id: I510af18d433c4db360243dda72260e59eb84355f
Reviewed-on: https://code.wireshark.org/review/20336
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years ago[packet snort] Fix build on SuSE 11.4
AndersBroman [Thu, 2 Mar 2017 13:01:21 +0000 (14:01 +0100)]
[packet snort] Fix build on SuSE 11.4
packet-snort.c: In function snort_dissector:
packet-snort.c:882: error: converted_content_length may be used
uninitialized in this function
packet-snort.c:882: note: converted_content_length was declared here
packet-snort.c:880: error: content_offset may be used uninitialized in
this function
packet-snort.c:880: note: content_offset was declared here

Change-Id: I8fb990492f31fc4ce942244005f547f3b3c9bba3
Reviewed-on: https://code.wireshark.org/review/20335
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoDocbook: Replace "OS X" with "macOS".
Gerald Combs [Wed, 1 Mar 2017 21:58:16 +0000 (15:58 -0600)]
Docbook: Replace "OS X" with "macOS".

Change-Id: Ic2ab4f9050c9c76349d8d872b8fc2bf9feb7827d
Reviewed-on: https://code.wireshark.org/review/20325
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: 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>
7 years agoinclude <wsutil/glib-compat.h> to allow use of g_list_free_full() with
AndersBroman [Thu, 2 Mar 2017 11:34:35 +0000 (12:34 +0100)]
include <wsutil/glib-compat.h> to allow use of g_list_free_full() with
older glibs.

Change-Id: I3eb7e178dcb844ddbac47f53f221a98e2d32f413
Reviewed-on: https://code.wireshark.org/review/20334
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoDo more record length checks.
Guy Harris [Thu, 2 Mar 2017 09:00:25 +0000 (01:00 -0800)]
Do more record length checks.

Do the check early in the process of processing the record, and do it
for all record types.

Bug: 13429
Change-Id: Id7f4d12415c6740241850d8f873cff52909e7110
Reviewed-on: https://code.wireshark.org/review/20330
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoDon't go past the end of a page in a NetScaler file.
Guy Harris [Thu, 2 Mar 2017 03:53:29 +0000 (19:53 -0800)]
Don't go past the end of a page in a NetScaler file.

Records in a properly formatted NetScaler file shouldn't go past the end
of a page, but nothing guarantees that a NetScaler file will be properly
formatted.

NetScaler 3.x files allow record bodies to go past the end of a page,
but 1.x and 2.x files don't, so treat record headers that go past the
end of a page, and record bodies in 1.x and 2.x files that go past the
end of a page, as errors.

Clean up some stuff while we're at it.

Bug: 13430
Change-Id: I3b1d56086e3bb14b246406f306e3d730df337561
Reviewed-on: https://code.wireshark.org/review/20326
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoudpdump: fix recvfrom error on windows.
Dario Lombardo [Wed, 1 Mar 2017 10:32:24 +0000 (11:32 +0100)]
udpdump: fix recvfrom error on windows.

Change-Id: Ia88d00593163b1c1e9a0e120aeff5e36f0135474
Reviewed-on: https://code.wireshark.org/review/20319
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>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
7 years agoFix spelling mistake
Rémy Léone [Wed, 1 Mar 2017 16:04:14 +0000 (17:04 +0100)]
Fix spelling mistake

Change-Id: I21ef4e5b19299f843a6f2a644bfa7068abd90fc4
Reviewed-on: https://code.wireshark.org/review/20321
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoextcap: Create callback structure
Roland Knall [Wed, 1 Mar 2017 09:04:59 +0000 (10:04 +0100)]
extcap: Create callback structure

To ease development of callbacks and new parameters,
move all parameters for the callback methods to a
struct

Change-Id: I160277acf4d0473897172124f7c7aa744718da9c
Reviewed-on: https://code.wireshark.org/review/20316
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
7 years agoradius: remove unused rule, add clarifying comment
Peter Wu [Tue, 28 Feb 2017 16:19:55 +0000 (17:19 +0100)]
radius: remove unused rule, add clarifying comment

Since commit fdb5257f7cc8e19e6f8bcd35edee225cf44438a2 the ATTR_W_VENDOR
symbol was never matched, so remove it.

Change-Id: I5a56f48ce1995c23f9eca518308d3543a15ad049
Reviewed-on: https://code.wireshark.org/review/20313
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>
7 years agoExpand a comment.
Guy Harris [Tue, 28 Feb 2017 19:34:50 +0000 (11:34 -0800)]
Expand a comment.

Change-Id: I4b040665582ec1fd3f97b915b3819ff2d8850a6f
Reviewed-on: https://code.wireshark.org/review/20315
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoradius: fix use-after-free after recent memleak fixes
Peter Wu [Mon, 27 Feb 2017 22:47:11 +0000 (23:47 +0100)]
radius: fix use-after-free after recent memleak fixes

The same data is referenced by the ID-to-name and name-to-ID mapping, so
be make sure that the ID mapping is responsible (as the name mapping is
just used for duplicate detection and while parsing dictionary files).

Still to be done is fixing duplicate attribute numbers (by adding
support for OIDs and changing TLV attribute type IDs to OIDs) and fixing
duplicate attribute names (by prefixing the Vendor Names to them).
Also not handled is fixing Value memleaks.

Reproducers of the crash under ASAN:

    tshark -G fields >/dev/null
    tshark -r radius-ms-mppe-etrl-bug.cap   (from bug 796)

Change-Id: Ifa4055901072bc830e19fe06937af67ce524a3be
Fixes: v2.3.0rc0-2536-gd4cf57100c ("Free radius dissector memory on shutdown")
Reviewed-on: https://code.wireshark.org/review/20307
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>
7 years agoradius: fix memleaks of value_string
Peter Wu [Tue, 28 Feb 2017 16:05:10 +0000 (17:05 +0100)]
radius: fix memleaks of value_string

The value_string was taken from the GArray and added to
radius_attr_info_t, but these were not properly freed.

Change-Id: I8de2b84760887c41229a57881ff46cedcef1d22f
Reviewed-on: https://code.wireshark.org/review/20311
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoradius: fix final memleak due to malformed dictionary
Peter Wu [Tue, 28 Feb 2017 16:16:54 +0000 (17:16 +0100)]
radius: fix final memleak due to malformed dictionary

The VENDOR line did not have a proper ID, so scanning the full line
failed and the "yyextra->vendor_name" was not freed. Import the current
version from FreeRadius to fix this problem.

(Since the attributes are now grouped by the vendor, the conflict
comment no longer applies.)

Change-Id: Id6020c0a5f34c624aedbb0acebe70dc643402e41
Reviewed-on: https://code.wireshark.org/review/20312
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agotext2pcap: free memory on exit.
Dario Lombardo [Tue, 21 Feb 2017 13:28:57 +0000 (14:28 +0100)]
text2pcap: free memory on exit.

Make also text2pcap_lex_destroy() public to be called from main.

Change-Id: I360c3dd3991d027afe6e4542ea5f9680e92f92cf
Reviewed-on: https://code.wireshark.org/review/20226
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: Dario Lombardo <lomato@gmail.com>
7 years agoQt: Fix -Wshorten-64-to-32 warnings
Stig Bjørlykke [Tue, 28 Feb 2017 09:19:28 +0000 (10:19 +0100)]
Qt: Fix -Wshorten-64-to-32 warnings

Fix some warnings when building with -Wshorten-64-to-32 flag for
C++ code.

Fixes for warnings from QList, QTimer and QVector has been pushed
upstream, so some time we may be able to enable this flag for C++.

Change-Id: Iae7457f9afc469c63f3edbe23dbf272b5c6c9e5e
Reviewed-on: https://code.wireshark.org/review/20310
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>
7 years agoIEEE 802.11: Handle Atheros padding
Jaap Keuter [Wed, 15 Feb 2017 21:25:58 +0000 (22:25 +0100)]
IEEE 802.11: Handle Atheros padding

For some unknown reason between 802.11 protocol fields end and LLC
protocol field start two octets of padding may appear. These octets
(value 0x00) were observed on the OLPC laptop, heuristically detected
and marked as OLPC mysterious stuff.

It seems that Atheros chipset drivers also show this behaviour,
although the padding is not 0x0000, but seem to be a duplicate of the
sequence control field. This is now also heuristically detected and
marked more generically as payload padding.

Bug: 13411
Change-Id: I1e817e07dc19be8b3917ff302ede3328ca6a4938
Reviewed-on: https://code.wireshark.org/review/20284
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
7 years agosharkd: support for rtp tap.
Jakub Zawadzki [Sat, 25 Feb 2017 11:45:33 +0000 (12:45 +0100)]
sharkd: support for rtp tap.

Change-Id: I84b542f8ace1e53f41be0b73a24aeb720c3c904a
Reviewed-on: https://code.wireshark.org/review/20271
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
7 years agoandroiddump: Use only non-blocking connect() instead of the socket
Michal Labedzki [Mon, 27 Feb 2017 06:44:39 +0000 (07:44 +0100)]
androiddump: Use only non-blocking connect() instead of the socket

Architecture of androiddump based on "blocking" sockets,
however for start-up it is better to use non-bloking connect()
to avoid long waiting time then fail.

Change-Id: I2bb8ea51e24db4dd1f5a6b97e1d2bc0156342d97
Reviewed-on: https://code.wireshark.org/review/20293
Petri-Dish: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
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>
7 years agoRSVDv2 support - 2nd stage
Volodymyr Khomenko [Mon, 27 Feb 2017 13:06:23 +0000 (15:06 +0200)]
RSVDv2 support - 2nd stage

Improved META_OPERATION_START (CreateSnapshot, ApplySnapshot)
Added VHDSET_QUERY_INFORMATION (SnapshotEntry)
Added DELETE_SNAPSHOT

Minor fixes:
RSVD Status field of RSVD header shown as NT_STATUS
Using more structural names for RSVDv2 hf_

Change-Id: I0199527a2de819796c7b34b663df73547f32d2fd
Ping-Bug: 11232
Reviewed-on: https://code.wireshark.org/review/20300
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: Anders Broman <a.broman58@gmail.com>
7 years agoSome ERF pseudo-headers have color instead of lctr value
sfd [Mon, 27 Feb 2017 21:13:42 +0000 (10:13 +1300)]
Some ERF pseudo-headers have color instead of lctr value

Don't report expert-info warnings for lctr when it is actually color.

Change-Id: I689ec84dd8f1cafa1ec7e8740f9bc4091339929a
Reviewed-on: https://code.wireshark.org/review/20306
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>
7 years agowiretap (nettl/pppdump): fix this statement may fall through [-Werror=implicit-fallth...
Alexis La Goutte [Mon, 27 Feb 2017 20:10:33 +0000 (21:10 +0100)]
wiretap (nettl/pppdump): fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: I8c339e7484d410460d499dd2923641630b482ebe
Reviewed-on: https://code.wireshark.org/review/20303
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>
7 years agoReturn correct filter for get_hostlist_filter()
Jakub Zawadzki [Sun, 26 Feb 2017 10:49:32 +0000 (11:49 +0100)]
Return correct filter for get_hostlist_filter()

It was returning (ip.src == ... && <protocol>.port == ...).

Now, I think correctly returns (ip.addr == ... && <protocol>.port == ...)

Change-Id: I242e13c0c79c2222e2b27fc2f9ee348b89d21ec1
Reviewed-on: https://code.wireshark.org/review/20281
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoQt: Avoid null pointer dereference (CID 1401573)
Stig Bjørlykke [Mon, 27 Feb 2017 18:25:20 +0000 (19:25 +0100)]
Qt: Avoid null pointer dereference (CID 1401573)

Change-Id: I638174a05c6275baf54e000d941f47f8ba572169
Reviewed-on: https://code.wireshark.org/review/20302
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
7 years agoextcap: remove leak in interface lists.
Dario Lombardo [Mon, 27 Feb 2017 11:32:16 +0000 (12:32 +0100)]
extcap: remove leak in interface lists.

Change-Id: Ib57292afc88cd32736b78a901385cfdde84c46c9
Reviewed-on: https://code.wireshark.org/review/20297
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>