Commit Graph

23318 Commits

Author SHA1 Message Date
Martin Mathieson 99ab5c9d38 netflow: cope with multiple duration types in one flow.
Bug: 11295
Change-Id: I71493e13989dbc29e3e3e7d518d3b6686fbec01a
Reviewed-on: https://code.wireshark.org/review/9063
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-06-23 20:44:19 +00:00
Cenk Gündoğan b216d266fc extend the RPL dissector with basic P2P RPL support
Bug: 11301
Change-Id: I5569322a05c770524e0f0e7892addd15c7f7dbab
Reviewed-on: https://code.wireshark.org/review/9053
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-23 20:14:16 +00:00
Guy Harris 65bac2d1db Remove the P1 dissector from the dirty dissectors list.
It was already added to the clean dissectors list, but wasn't removed
from the dirty dissectors list, so it was built twice and linked in
twice, and hilarity ensued.

Change-Id: Ic4636f17b61e619546dc21a04ebbaace0296d583
Reviewed-on: https://code.wireshark.org/review/9067
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-23 18:30:30 +00:00
Evan Huus 8bc294c0d1 Replace more deprecated tvb_length calls
The return values of new-style dissectors always use the captured length, so
replace those automagically with sed.

Change-Id: Ic43072ee4a80d433cd4264444583a0e670adc26a
Reviewed-on: https://code.wireshark.org/review/9065
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-23 18:25:52 +00:00
Evan Huus 9723c7a2f8 Remove more deprecated tvb_length calls
Change-Id: Ie40a195db622ebfb096fa5088c5467a1385e69bf
Reviewed-on: https://code.wireshark.org/review/9062
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-23 18:13:41 +00:00
Martin Kaiser bc1472502f [afp] improve the error handling for extended attributes
distinguish between the length field in the packet and the current item's length
make sure that the length field fits into a gint variable
add a cast to the return value of tvb_strsize()
don't throw an exception manually

Change-Id: I2debab778be3e34d68b1be31963d2d9260a30e0e
Reviewed-on: https://code.wireshark.org/review/9056
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-23 18:02:10 +00:00
Evan Huus eb321f8710 Remove deprecated tvb_length from PIDL dissectors
Also regenerate all to pick up the usage of https in some comment links.

Change-Id: Ic17b6368d2118627178b0b560031450d98e5b5e5
Reviewed-on: https://code.wireshark.org/review/9060
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-23 17:56:11 +00:00
Martin Kaiser 17ac3831d6 [zvt] the TLV container starts with an overall length field
new function dissect_zvt_tlv_len(), use it for the total length
and for each tlv entry's length field

Change-Id: I2b7ba6939ddf0326b014c565ffbe5d16e3a88282
Reviewed-on: https://code.wireshark.org/review/9059
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-23 17:44:09 +00:00
Alexis La Goutte ed8ad06ccc P1: Remove from ASN1 DIRTY list
Change-Id: If44cdddea6709b824ae242d504d7469756c87b91
Reviewed-on: https://code.wireshark.org/review/8838
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-23 17:37:06 +00:00
Alexis La Goutte 3f6af3b4a0 P1: fix 'dissect_p1_T_report_type' defined but not used [-Wunused-function]
Change-Id: Idee443cd35846bb197070cff5fb37e3904afb856
Reviewed-on: https://code.wireshark.org/review/8757
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-23 17:36:33 +00:00
Michael Mann 6fe3f2c693 Use RTD functionality for H.225
This got missed in the initial refactoring.

Change-Id: I98dcc0816e065efab9b497f753c8d2d388349ff3
Reviewed-on: https://code.wireshark.org/review/9044
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-23 13:08:57 +00:00
Guy Harris 74c5ab0ff2 Treat channel flags fields as just collections of bits, not as type fields.
The radiotap and PPI specs don't call them type fields, and don't list
them as having type values, they call them flags fields and list the
individual bits.

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

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

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

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

Change-Id: I545b81b08a993dbb219fa7a4f54daac3637ea071
Reviewed-on: https://code.wireshark.org/review/9051
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-23 07:00:39 +00:00
Alexis La Goutte 167f9b7aab IS-IS (LSP): Remove proto_tree_add_text call
Part 2 !

Change-Id: Iaa46f3d785cbff6b397edf5bd54c0c3cf65a7264
Reviewed-on: https://code.wireshark.org/review/8822
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-23 04:59:42 +00:00
Martin Mathieson 61e127a8ca RANAP: call nsap properly when bindingID is included in transport address
Change-Id: I45fed890cc2f7f5d106bbb7b35038d8db141fa4e
Reviewed-on: https://code.wireshark.org/review/9036
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-06-23 04:52:08 +00:00
Evan Huus 6fd7e5ba33 Remove more deprecated tvb_length calls
Change-Id: I56260a82b19001ab2f87f4be34a9510f127f841f
Reviewed-on: https://code.wireshark.org/review/9050
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-23 03:54:13 +00:00
JustinKu 46e5fd833e CFM: fix CFM Type Test signal (TST) without CRC dissection
Bug: 11286
Change-Id: I8efce21e2bab55f9fea50a234419082cdc288f4e
Reviewed-on: https://code.wireshark.org/review/9048
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-23 03:52:14 +00:00
Martin Kaiser ce9c1dfd07 coverity 1306905: integer overflowed argument
tvb_strsize() returns guint
remove the if (tree) while we're at it

Change-Id: Icc24f166104a3e9b95fca2ef14a7bd8be2677cba
Reviewed-on: https://code.wireshark.org/review/9047
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-23 03:36:46 +00:00
Martin Kaiser db72eb4e3b wmem_tree_new_autoreset() never returns NULL
Change-Id: I497b77dec1eb4617179d492838ecd7d267539ba4
Reviewed-on: https://code.wireshark.org/review/9043
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-23 00:50:05 +00:00
Evan Huus 958cef5d68 Remove more deprecated tvb_length
Change-Id: Iac23a6c804ad3720d37186559477909b2ff33eb2
Reviewed-on: https://code.wireshark.org/review/9042
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-23 00:19:41 +00:00
Evan Huus 67ab8a059c Remove more deprecated tvb_length
Change-Id: I36603453c2563406f82663683930088dedd5f39c
Reviewed-on: https://code.wireshark.org/review/9041
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-23 00:06:19 +00:00
Pascal Quantin a7f5e1805b SIP: add support for draft-ietf-insipid-session-id
Bug: 11294
Change-Id: I54f7e19d129cddb1f11525f6ee9931270cc41f40
Reviewed-on: https://code.wireshark.org/review/9028
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-22 23:27:55 +00:00
Guy Harris 79c384d1d1 Don't use the value of the Flags field if we didn't have it.
Change-Id: Idd7771bd39ee823981b31b827645abd2ae516f66
Reviewed-on: https://code.wireshark.org/review/9039
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-22 23:16:43 +00:00
Guy Harris eaf62bbf86 Fix handling of XChannel radiotap field.
Fetch the flags before using them; thanks to Peter Wu for catching that
one.

Fetch and use the frequency and channel.

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

Change-Id: If82f7adb448eef04b769186a90a8722d03a702a3
Reviewed-on: https://code.wireshark.org/review/9038
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-22 23:07:50 +00:00
Pascal Quantin 7db3021f59 IEEE 802.11: add an expert info when tag length value is bigger than remaining payload
Bug: 11298
Change-Id: I18082a15fbeaa843099741511292eec19acf94b9
Reviewed-on: https://code.wireshark.org/review/9033
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-22 22:45:41 +00:00
Guy Harris 8aa91b31b9 Provide PHY type and band information in the 802.11 pseudo-header.
Provide that information so that the "802.11 radio information" protocol
can indicate whether a packet was 802.11 legacy/11b/11a/11g/11n/11ac,
and possibly whether it's 2.4 GHz or 5 GHz 11n.  (Sometimes the center
frequency might not be supplied, so the band information can be useful.)

Also, provide some 11ac information, now that we can distinguish between
11n and 11ac.  Don't calculate the data rate from the MCS index unless
it's 11n; we don't yet have code to calculate it for 11ac.

For radiotap, only provide guard interval information for 11n and 11ac,
not for earlier standards.

Handle the 11ac flag in the Peek remote protocol.

For Peek tagged files, the "extension flags" are 11n/11ac flags, so we
don't have to check for the "MCS used" bit in order to decide that the
packet is 11n or 11ac or to decide whether to provide the "bandwidth" or
"short GI" information.

Change-Id: Ia8a1a9b11a35243ed84eb4e72c384cc77512b098
Reviewed-on: https://code.wireshark.org/review/9032
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-22 22:05:17 +00:00
Peter Wu 8abe108a3c ieee80211: fix memleak
parse_key_string reads from rec->string and rec->key (without
modifying those parameters), then returns a newly allocated
decryption_key_t struct which is not used except for reading the
type field. Release memory after copying that single field!

Change-Id: Iac19bea23dedb73cab9dd1ea09f98cc83556e96c
Reviewed-on: https://code.wireshark.org/review/9025
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-22 21:48:10 +00:00
Evan Huus 11803d422f Remove more tvb_length
Change-Id: I940704e927001b2a051a59fd0738e7a02328472b
Reviewed-on: https://code.wireshark.org/review/9031
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-22 21:40:50 +00:00
Evan Huus be6fb60691 Remove a bunch of deprecated tvb_length calls
Change-Id: I9362e0fdc4519ba5f3d656152966e7030f478839
Reviewed-on: https://code.wireshark.org/review/9022
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-22 20:43:34 +00:00
Alexis La Goutte a94b4434cc NCP: fix comma at end of enumerator list [-Wpedantic]
Change-Id: I47795fb9e1044f4319721c3bf1208c269a4b9c34
Reviewed-on: https://code.wireshark.org/review/9023
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-22 17:48:01 +00:00
Alexis La Goutte c079420cfc PKCS12: Remove from ASN1 DIRTY list
Change-Id: I454c48d5342ebe5682217667e4cafd6164e58d41
Reviewed-on: https://code.wireshark.org/review/9004
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: Evan Huus <eapache@gmail.com>
2015-06-22 17:02:11 +00:00
Alexis La Goutte 475a232a5b PKCS12: fix unused function 'dissect_AuthenticatedSafe_PDU' [-Wunused-function]
Change-Id: Iaaaaffc8a271ac844b745d1b9265eb06df2efe9c
Reviewed-on: https://code.wireshark.org/review/9003
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-22 17:01:52 +00:00
Michael Mann 8f390d4975 Refactor RTD stats.
Very similar to the refactoring of SRT stats, it provides more commonality of the stats for all GUI interfaces.  Currently implemented for TShark and GTK.  Affected dissectors: MEGACO, MGCP, Radius

Change-Id: Icb73a7e603dc3502b39bf696227fcaae37d4ed21
Reviewed-on: https://code.wireshark.org/review/8998
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>
2015-06-22 15:13:39 +00:00
Alexis La Goutte 8b230eabdd Fix make distcheck buildbot
packet-dnp.c:2735:28: error: variable 'al_filename' set but not used [-Werror=unused-but-set-variable]
packet-dnp.c:1843:32: error: variable 'al_filename_offs' set but not used [-Werror=unused-but-set-variable]

Change-Id: Ia84b270aa8f56fb4104fb875339dc3d39c6105c6
Reviewed-on: https://code.wireshark.org/review/9020
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-22 14:53:20 +00:00
Bill Meier c0f5b2396a [pcep] (benign) Use ENC_BIG_ENDIAN (not ENC_NA) for certain multibyte fields.
Change-Id: Idc31728ce1b327ff86a58541ba01275107c7598b
Reviewed-on: https://code.wireshark.org/review/9019
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-06-22 14:26:46 +00:00
Bill Meier cb7fd6fb39 [rfid-pn532] (benign) Use ENC_BIG_ENDIAN (not ENC_NA) for several 3-byte fields.
Change-Id: If70a45d59fdce105b429d00fbbc4a8b2784262a2
Reviewed-on: https://code.wireshark.org/review/9018
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-06-22 14:26:18 +00:00
Michal Labedzki c52dc98563 Fix typo caused assertion
Invalid character ')' in filter name 'gsm_abis_rsl.llsdu.sacch)'
**
ERROR:wireshark/epan/wmem/wmem_core.c:50:wmem_alloc: assertion failed: (allocator->in_scope)
Aborted

Change-Id: Ie22035cf9a9d1d29354a64cd5b085f1c2e18b1d3
Reviewed-on: https://code.wireshark.org/review/9017
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-06-22 07:50:10 +00:00
Vasil Velichckov eb2dffa56c GSM MAP: Fix decoding of IPv6 addresses
From 3GPP 23.003

The GSN Address is composed of the following elements:
1) The Address Type, which is a fixed length code (of 2 bits) identifying the type of address that is used in the
Address field.
2) The Address Length, which is a fixed length code (of 6 bits) identifying the length of the Address field.
3) The Address, which is a variable length field which contains either an IPv4 address or an IPv6 address.
Address Type 0 and Address Length 4 are used when Address is an IPv4 address.
Address Type 1 and Address Length 16 are used when Address is an IPv6 address.
The IP v4 address structure is defined in RFC 791 [14].
The IP v6 address structure is defined in RFC 2373 [15].

Currently the Wireshark decodes IPv6 addresses as IPv4

This commit reverts parts of commit 1cdef1d98a

Change-Id: I4905d4cf559abcb42b9dfe3652667d2ff96dd444
Reviewed-on: https://code.wireshark.org/review/8984
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-22 06:00:14 +00:00
Michael Mann e8a238fce2 Eliminate proto_tree_add_text from some dissectors.
Change-Id: I979990e9385182870ce4809a7e6fa16e598cb2be
Reviewed-on: https://code.wireshark.org/review/9016
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-22 05:42:42 +00:00
Michael Mann d729d8055b Convert "macro checks" to use expert info in line with dissectors with comparable checks.
Change-Id: I30affba4941ba150c34541bfba67ff8da5b52a17
Reviewed-on: https://code.wireshark.org/review/9015
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-22 05:35:50 +00:00
Bill Meier 1223ba5250 [bmp] minor cleanup
- Simplify some code;
- Remove unneeded initializers;
- Remove some unused code;

Change-Id: I30b6a7751845670b732eae8ec143cd23e57fc54c
Reviewed-on: https://code.wireshark.org/review/9014
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-06-22 02:14:21 +00:00
Alexis La Goutte 31f54593dc PKCS12: fix warning about unused parameter when don't build with LIBGCRYPT
Change-Id: I7cc47f811d6c090aa2be54d3d92361966d011ccd
Reviewed-on: https://code.wireshark.org/review/9002
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-21 22:43:16 +00:00
Evan Huus ebc8ec83fd Remove deprecated tvb_length from a bunch of dissectors
Change-Id: I5c777806cb1403062a9d85261149d722df57b239
Reviewed-on: https://code.wireshark.org/review/9005
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-21 22:38:59 +00:00
Alexis La Goutte 27fc2b7985 ERM (Aruba): Fix Assigned value is garbage or undefined found by Clang Analyzer
Fix also trailing whitespace

Change-Id: I9e9e09f6855f41609581ea1b7cd1bd16b15f85f4
Reviewed-on: https://code.wireshark.org/review/9006
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-21 16:26:03 +00:00
Michael Mann 6de6f7f0f8 Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs.   Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.

SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.

Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-21 03:35:13 +00:00
Guy Harris 2895d58dc3 Call the "802.11 radio information" dissector for radio headers.
Have dissectors of various forms of radio information headers in the
packets fill in a struct ieee_802_11_phdr with radio information as
appropriate, and call the "802.11 radio information" dissector rather
than the raw 802.11 dissector.

This means that the radio information can be found in a
protocol-independent and encapsulation-independent form when you're
looking at the packet; that information can be presented in a form
somewhat easier to read than the raw metadata header format.

It also enables having a single "radio information" tap that allows
statistics to handle all different sorts of radio information
encapsulation.

In addition, it lets us clean up some of the arguments passed to the
common 802.11 dissector routine, by having it pull that information from
the struct ieee_802_11_phdr.

Ensure that the right structure gets passed to that routine, and that
all the appropriate parts of that structure are filled in.

Rename the 802.11 radio protocol to "wlan_radio", rather than just
"radio", as it's 802.11-specific.  Give all its fields "wlan_radio."
names rather than "wlan." names.

Change-Id: I78d79afece0ce0cf5fc17293c1e29596413b31c8
Reviewed-on: https://code.wireshark.org/review/8992
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-20 23:02:21 +00:00
Martin Kaiser 02537f8c86 [mifare] make the payload of the write command filterable
use an FT_BYTES variable instead of passing it to the data dissector

Change-Id: Ia52cba24dedec13c9842109d45b3a277ee627f42
Reviewed-on: https://code.wireshark.org/review/8994
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-20 23:01:41 +00:00
Martin Kaiser bc9e141f83 [mifare] minor cleanup
remove the if(tree) so that we fill the info column regardless of the tree
clear the info column first, then append our data
remove an unnecessary initializer

Change-Id: I0e9e9582f360dd929e422f994c3d4a644c602642
Reviewed-on: https://code.wireshark.org/review/8993
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-20 23:01:21 +00:00
Guy Harris debb81119c Use "Present"/"Absent" for presence bits.
That's clearer than "True"/"False".

Change-Id: I300c040f347eff8477a87f639bea8402772314b9
Reviewed-on: https://code.wireshark.org/review/8991
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-20 22:42:15 +00:00
Guy Harris bffabc706b Support the "number of extension spatial streams" information.
Change-Id: If69088aac0848d6ec8d239e3a9acc140ad376d6f
Reviewed-on: https://code.wireshark.org/review/8990
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-20 22:24:19 +00:00
Bill Meier a8ddf90e12 [rpcrdma] Do some minor bug-fixes and cleanup
Change-Id: I9d440cba281945672767642967d955351fa67b90
Reviewed-on: https://code.wireshark.org/review/8985
Petri-Dish: Bill Meier <wmeier@newsguy.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-06-19 19:47:53 +00:00