Commit Graph

58853 Commits

Author SHA1 Message Date
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
Guy Harris be67f53686 Exit with the exit status of the command we ran.
Also, expand a comment.

Change-Id: Icbb8ead02f55087f3ac09747fe518f211d488172
Reviewed-on: https://code.wireshark.org/review/9057
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-23 17:16:12 +00:00
Bill Meier b59e28dd24 Regenerate *-tap-register.c when associated Makefile.common is updated
Change-Id: Id9a83aeb285466f409a0e5ee651ef0c9f26ddda8
Reviewed-on: https://code.wireshark.org/review/9055
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-06-23 13:42:16 +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 7cdd22f422 Try to catch TShark crashing and get a stack trace.
It's currently crashing in the Solaris buildbot when we do "tshark -v";
hopefully this will give us something more useful than

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

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

as a diagnostic.

Change-Id: I278c8dd9f6acf5ddfa83bc0a7f3f7a3c48577ac2
Reviewed-on: https://code.wireshark.org/review/9052
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-23 07:21:49 +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
Gerald Combs 1dc608a05e Morph ProgressBar into CaptureProgressFrame.
Switch from a plain QProgressBar to a QFrame with a QProgressBar and a
stop button.

Add a stop_flag boolean to the capture_file struct.

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

Change-Id: Iedd1d7d79f2044f1a53e4fb22186d25930a3ef03
Reviewed-on: https://code.wireshark.org/review/9029
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-23 06:06:37 +00:00
Peter Wu 0c71b13b3e prefs: fix memleak
Calling g_list_remove_link(link, llink) does not free the removed
last link llink. g_list_next or g_list_foreach+g_free followed by
g_list_free should be used instead such that the data is freed before
and then dropped from the list.

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

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

Change-Id: I3cc52e275784037ab40c0b42c68d0dd83b73cd98
Reviewed-on: https://code.wireshark.org/review/9026
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-23 05:46:18 +00:00
Peter Wu 42c324d818 packet: fix memleak
It turns out that a heur_dissector_list_t structure was not released,
only the GSList inside it. Ensure that this list gets released as well.

Change-Id: If79deb5d011d306477d082368744addcee794ae1
Reviewed-on: https://code.wireshark.org/review/9040
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-23 05:46:07 +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
Alexis La Goutte a43682d4fd srt_table.h: fix parameter 'opt_arg/filter' not found in the function declaration [-Wdocumentation]
Change-Id: I6edda434d02a4926a2ec7a2580a7f684b6e96ee6
Reviewed-on: https://code.wireshark.org/review/9008
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-22 23:43:42 +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
Peter Wu 5ab45709d6 gtk,qt: Fix minor buffer underrun
Avoid accessing the first byte before an empty dirname. No idea why this
was not triggered before. Reproduced with an empty Wireshark profile and
wireshark and wireshark-qt.

Caught with ASAN.

Change-Id: I44f8fdab03ad0f24e663df63a1c54567996a3dfc
Reviewed-on: https://code.wireshark.org/review/9037
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-22 22:54:19 +00:00
Peter Wu 15045316f5 packet: write explicit type for destroy_heuristic_dissector_list
It is an implementation detail that the data pointer contains a GSList*.
Use the type that got inserted into function
register_heur_dissector_list.

Change-Id: I25b6414afa73818baa0c955a5c8aa7669f3058ee
Reviewed-on: https://code.wireshark.org/review/9035
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-22 22:50:26 +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
Peter Wu e34e6c6fc0 Fix "Unescaped left brace in regex is deprecated"
This got reported with Perl 5.22:

    Unescaped left brace in regex is deprecated, passed through in
    regex; marked by <-- HERE in m/^typedef enum { <-- HERE / at
    epan/wslua/make-init-lua.pl line 228.

The perldelta manual page says this about it:

    "[..] a future version of Perl (tentatively v5.26) will consider
    this to be a syntax error."

Change-Id: I7f23cc10dc3311a35d8c15faa4337e4d50d0bd61
Reviewed-on: https://code.wireshark.org/review/9034
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-22 22:44:36 +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
Gerald Combs df352c535f Use StockIcon to load toolbar icons.
StockIcon loads each available icon size.

Change-Id: Ia5604cc11ed8350e7f4f782312939cf30c94f548
Reviewed-on: https://code.wireshark.org/review/9030
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-22 21:05:53 +00:00
Alexis La Goutte f99e20e7e2 rtd_table.h: fix parameter 'srt/srt_array' not found in the function declaration [-Wdocumentation]
srt => rtd

Change-Id: I297258ebb22723f280588692fdbb5d062d08ced9
Reviewed-on: https://code.wireshark.org/review/9024
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-22 20:56:43 +00:00
Martin Kaiser 2e3629afea fix the interface list in the main welcome screen
when no interfaces are available at startup, the number of columns in
the interface tree is set to 1
when new interfaces become available later, the column number is not
reset to the default value and we end up with an interface list whose
entries are not visible
reset the number of columns each time the interface list is updated

Change-Id: I267c5b47da6d5ae9e7769b1036622f79da4d97f2
Reviewed-on: https://code.wireshark.org/review/8996
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-22 20:55:37 +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
Pascal Quantin 45872b9f7b checkAPIs.pl: proto_tree_add_bytes_item takes an encoding parameter
Change-Id: Iebe0e2483d9fd1661bf87ea5efaeb4ae14f6e105
Reviewed-on: https://code.wireshark.org/review/9027
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-22 18:41:03 +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 d23d53edcd ws80211_utils.h: fix empty paragraph passed to '@param' command [-Wdocumentation]
Change-Id: Iecd9f8820840959a2f226120cbc359977d20c757
Reviewed-on: https://code.wireshark.org/review/9009
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-22 17:02:38 +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
Gerald Combs 02b497743c Add a strlen cast.
Change-Id: I480e2e7436f0334f0dfd99352bd49304765fcee3
Reviewed-on: https://code.wireshark.org/review/9021
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-22 15:53:35 +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
Alexis La Goutte ce40ea35b0 service_response_time_table.h: fix parameter 'gui_data' not found in the function declaration [-Wdocumentation]
Change-Id: Ie214d654aa91b91da2a1435dce63a822e404669a
Reviewed-on: https://code.wireshark.org/review/9010
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-22 13:50:49 +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