Commit Graph

53967 Commits

Author SHA1 Message Date
Michael Tüxen 3e7ed3da2c Escape some characters like \n when appending text
This patch escapes some characters like \n when showing text
contained in a packet by appending it to a protocol item.

Change-Id: Ice0040040ec7ab573dd9a412f8c0c197a566a031
Reviewed-on: https://code.wireshark.org/review/3095
Petri-Dish: Michael Tüxen <tuexen@wireshark.org>
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2014-07-17 23:47:03 +00:00
Gerald Combs e05a884740 Try to make tap operations in the Qt UI more responsive.
Add single-shot timers to ramp up the tap update interval and update
taps when we finish reading the capture file.

Change-Id: Ia1694b47ffd2705b6a06aa50c21e675a64aefeac
Reviewed-on: https://code.wireshark.org/review/3099
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-17 22:18:34 +00:00
AndersBroman b744f0ea6b Add an Application Id.
Change-Id: I239560637fb61a22cd4ef4700aeb28c82659a805
Reviewed-on: https://code.wireshark.org/review/3093
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-17 16:12:10 +00:00
Graham Bloice ed043d753a When DNP3 heuristics are disabled, relax the conditions on
accepting a packet as DNP3.

Bug: 10287
Change-Id: I222ec885186447c8a72eaf11cebacff8b9b79fad
Reviewed-on: https://code.wireshark.org/review/3092
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-17 15:46:38 +00:00
Tatsuhiro Tsujikawa 1b8c4bae48 Fix assertion error when no header field was decompressed
bug: 10279
Change-Id: Ibf88b1622318692ccf3904aede5d964e6028bdc7
Reviewed-on: https://code.wireshark.org/review/3087
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-16 14:13:49 +00:00
Jim Young 09cb981b0e Fix regression related to OSPF related enum order definitions
bug: 10271
Change-Id: Id2de856104d7506583e94893501cff23de3ec212
Reviewed-on: https://code.wireshark.org/review/2976
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-16 11:32:29 +00:00
Alexis La Goutte 024c002016 TLS: Update to the final RFC (7301) for ALPN
Change-Id: I16b3f6ec7cc4d356a6cb6090866691ddd2e708b6
Reviewed-on: https://code.wireshark.org/review/3056
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-16 06:53:36 +00:00
Guy Harris 2dad30897b Reflect the move of the buffer_ routines to libwsutil.
We went with the whole WS_DLL_EXPORT thing so that we don't *have* to
maintain lists of exported symbols; is there truly no way to automate
the generation of *these* files?

Change-Id: I77f240c77782ed634e4620833f951c4a02fb4390
Reviewed-on: https://code.wireshark.org/review/3083
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-16 03:41:29 +00:00
Guy Harris 0e0d01d045 Allow the interface monitor routines to be called from C++.
Change-Id: I2ae60c1b015a432f5df36bd623f1a4c69b02bef1
Reviewed-on: https://code.wireshark.org/review/3081
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-16 02:28:39 +00:00
Evan Huus 4d71fb79ba Mark unused parameter as such
Change-Id: I6a7fa5943957712fbd9e4801702a57dbb2d21b81
Reviewed-on: https://code.wireshark.org/review/3079
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-16 02:01:08 +00:00
Evan Huus 1387f54c58 Check for __func__ in checkAPIs.pl
Change-Id: I649c69cbf545a8de32d9142c1156db6adb076b63
Reviewed-on: https://code.wireshark.org/review/3078
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-16 01:58:03 +00:00
Michael Mann d8cff57ef3 Allow expert info to show only items in the display filter.
This was started by Chris Maynard before Qt was announced and I just polished it off for inclusion in GTK version of Wireshark.

This also can be used as input into the Qt version of the Expert Info "dialog" since it hasn't been written yet.  Personally I like the "template" the Qt statistics dialog has with the display filter built it.  I think that would work well for the Expert Info dialog as well.

bug:1860
Change-Id: Icaada6e7900f22b0a3d97c2a5656edfd8d8c8b7f
Reviewed-on: https://code.wireshark.org/review/3035
Reviewed-by: Christopher Maynard <Christopher.Maynard@gtech.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-16 01:57:01 +00:00
Guy Harris fae3615ce0 Move the monitor-for-interface-list-changes stuff to the caputils library.
Change-Id: Ie0d4504688602c2aa8e9788643b079930ca7d305
Reviewed-on: https://code.wireshark.org/review/3076
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-16 01:27:21 +00:00
Guy Harris bd30abf870 The plural is "PDUs", not "PDU:s".
Change-Id: I4bef734ef17b02e254b742744e2debd3038e98a0
Reviewed-on: https://code.wireshark.org/review/3074
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-16 01:10:53 +00:00
Guy Harris f862eaa7c2 "Export PDUs to File" pops up a dialog, so put "..." after it.
Also, capitalize "File" in the GTK+ version (it's already capitalized in
the Qt version).

Change-Id: I27eb27022930b1c0e0321cd1a1446c3b9dc1bd17
Reviewed-on: https://code.wireshark.org/review/3072
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-16 00:56:59 +00:00
Guy Harris b720f08f36 Don't use __func__, use G_STRFUNC.
Not all compilers we use support __func__.

Change-Id: I61194e1073c87e67f821e14698ea21b73d63983c
Reviewed-on: https://code.wireshark.org/review/3071
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-16 00:23:51 +00:00
Guy Harris 28971b2851 Squelch a warning.
In at least some versions of GLib, g_array_free() warns if passed a null
pointer, rather than just silently returning.

Change-Id: I1bfc0a81faa1eeebe288f6e0cc58ebfb64784958
Reviewed-on: https://code.wireshark.org/review/3068
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-16 00:14:35 +00:00
Guy Harris d4dab16a3f Only one buffer.c, please.
Otherwise, if you link with both libwiretap and libfiletap, it's
anybody's guess which one you get.  That means you're wasting memory
with two copies of its routines if they're identical, and means
surprising behavior if they're not (which showed up when I was debugging
a double-free crash - fixing libwiretap's buffer_free() didn't fix the
problem, because Wireshark happened to be calling libfiletap' unfixed
buffer_free()).

There's nothing *tap-specific about Buffers, anyway, so it really
belongs in wsutil.

Change-Id: I91537e46917e91277981f8f3365a2c0873152870
Reviewed-on: https://code.wireshark.org/review/3066
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-15 23:43:32 +00:00
Guy Harris 61ac815681 No more README.irix.
Change-Id: I3c906451549d28040f1068356bf7e62bff9cd92a
Reviewed-on: https://code.wireshark.org/review/3065
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-15 23:28:38 +00:00
Guy Harris 7344cfc78f Have buffer_free() null out the buffer data pointer.
That prevents some double-free issues (I got one when doing non-"Update
list of packets in real time" captures, if I do one such capture and
then another one).

Change-Id: Ia08034d9d1640bad21b74960efade8926dbfc5de
Reviewed-on: https://code.wireshark.org/review/3063
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-15 23:23:05 +00:00
Peter Wu 2c772e3825 ssl: move decoder init from ClientKeyExchange to ChangeCipherSpec
My previous change removed master-key retrieval in the Server Hello.
This broke decryption when ClientKeyExchange is missing. That was done
because decryption is only needed after ChangeCipherSpec.

This patch moves the remaining initialization in ClientKeyExchange to
ChangeCipherSpec. In theory this could fix decryption of DTLS traffic
when an abbreviated handshake is used (and thus keyring material is
never generated in ClientKeyExchange since it is not called).

It also avoids saving a session ticket with an empty key which can
happen when no RSA key is present, but the NewSessionTicket message
is received. This could lead to garbage decryption.

Change-Id: If0f475232c270b1d7b006c1f9af0e8d8098c6b65
Reviewed-on: https://code.wireshark.org/review/3019
Reviewed-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 23:07:10 +00:00
Peter Wu aecbb98365 ssl: unify common Hello dissection to ssl-utils
Based on DTLS code with changes merged from SSL. Changes:

 - Ignore large Session IDs, this was not harmful though since the
   backing storage was 256 bytes in size.
 - {ssl,dtls}.handshake.random: fixed description, it is not used like
   a SSLv2 random challenge.
 - dtls: also debug print client/server for random
 - SSL: the common dissector now returns an offset rather than dissected
   length.
 - dtls: display actual Session ID bytes in the UI rather than the text
   "Session ID (32 bytes)". The length field is already visible in the
   preceding field.

Also changed is the handling of key material generation. The SSL
dissector previously generated key material based on the Session ID,
Session Ticket or a key logfile. (DTLS did not have this functionality.)
As decryption is needed only after ChangeCipherSpec, I have removed it
from the ServerHello handling. This will break decryption when a
ClientKeyExchange message is missing, but it will be restored proper in
a next patch.

(By the way, there was an inverted if-condition bug in DTLS that could
break decryption by not restoring the master key matching a SID. This
is gone in the refactoring because the faulty code is removed.)

Change-Id: Ida3de88adefe3f7691f85936c496977426c4d96e
Reviewed-on: https://code.wireshark.org/review/3018
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 23:07:05 +00:00
Joerg Mayer 8982e877c1 Looks like this file is completely outdated - at least the problems
it mentions are.

Change-Id: Idc8fd36bc605c9b79019285e1a259fa545cf72b5
Reviewed-on: https://code.wireshark.org/review/3026
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 22:58:34 +00:00
Alexis La Goutte 36548d7131 Fix Argument with 'nonnull' attribute passed null found by Clang
Change-Id: I48f488a75f53d077a213f7b9379960985ce3bf08
Reviewed-on: https://code.wireshark.org/review/3055
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 22:57:57 +00:00
Alexis La Goutte aebce0b6ec HTTP2: Fix double free
Found by Clang Analyzer

Backport from 62423f5949
Signed-off-by: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>

Change-Id: Ic70f74b55ab80ca0b8d5042f07a29c9d14af4fe2
Reviewed-on: https://code.wireshark.org/review/3058
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 22:56:49 +00:00
Sean O. Stalley 91f627b7e7 MAUSB dissection of control transfer responses
The MAUSB dissector can now dissect transfer responses for control
endpoints.

Change-Id: Ic488ccb308365d072bbbf0eaf128b198caf74eca
Reviewed-on: https://code.wireshark.org/review/2960
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 22:55:19 +00:00
Sean O. Stalley 9335faa6a2 Moved USB Setup Response Dissection into own function
USB Setup Responses are now dissected in their own function.
Before they were dissected inline in the usb_dissect_common()
function.
(just copied code).

Also replaced proto_tree_add_text() with proto_tree_add_item()
for generic setup response data.

Change-Id: Ia3943334cccc0a1813e0c906196307f99561ad21
Reviewed-on: https://code.wireshark.org/review/2959
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 22:54:22 +00:00
Alexis La Goutte b33f777350 Fix Dereference of null pointer found by Clang analyzer
Change-Id: I3e84e987ad26019d7536baf4d90d6b0c684f6ec1
Reviewed-on: https://code.wireshark.org/review/3054
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 22:54:03 +00:00
Alexis La Goutte 53f597d120 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I908e08e491bae6c7532e02269d8ed004ad0cee91
Reviewed-on: https://code.wireshark.org/review/3053
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 22:53:14 +00:00
Alexis La Goutte ef1b11f622 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I17dc2259e039586b9a06944bd1c2b552dd23855d
Reviewed-on: https://code.wireshark.org/review/3052
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 22:52:31 +00:00
Guy Harris f9f6fa74fd Get rid of cf_reset_state() - it's only called from one place.
Change-Id: I48521bbaa898c99286e6bb5e40281aba7701ed4d
Reviewed-on: https://code.wireshark.org/review/3062
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-15 22:48:53 +00:00
Guy Harris 9d436346c3 Make the state variable an enum, and add a case for the IN_SKIP value.
Also indicate what the states mean.

Change-Id: Ie1701bb2fb33334bcd66d325d1368c2a15cbb7e8
Reviewed-on: https://code.wireshark.org/review/3061
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-15 21:06:16 +00:00
Graham Bloice 9ba0a18d12 Fix up library names when using CMake on Windows
Change-Id: I3573e69eb54044bb915161756dbb8f18cc769061
Reviewed-on: https://code.wireshark.org/review/2957
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-15 20:37:44 +00:00
Guy Harris 4800894357 Cleanup the "export PDU" common code.
exp_pdu_file_open() isn't used outside ui/tap_export_pdu.c; make it
static.

do_export_pdu() isn't a tap routine, it's called *from* tap routines, so
its last argument doesn't need to be a generic pointer; its last
argument must be a pointer to an exp_pdu_t, so declare it as such.

Clean up comments while we're at it.

Change-Id: Iab51b54a0c272052d7876110a095f2fff66fa2c1
Reviewed-on: https://code.wireshark.org/review/3060
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-15 20:15:59 +00:00
Guy Harris 52a4f3d121 Add application/atom+xml as an XML document type.
Change-Id: I9fcf438f3cafcb3ab3a5b6dc0f72ed2561e5a94f
Reviewed-on: https://code.wireshark.org/review/3049
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-14 23:50:24 +00:00
Guy Harris 06e9b2022c Treat CR-LF at the end of a line like LF.
That way, if we're reading a Windows-format file on UN*X, we handle it
the same way we'd handle a UN*X-format file.

This handles bug 10272 for the cfilter and dfilter file; there are other
configuration files that may need code changes as well.

While we're at it, don't hand non-ASCII characters to isspace().

Change-Id: I4f5efeaa938bcb2d85737ab136c3ca19ea1ddb5b
Reviewed-on: https://code.wireshark.org/review/3045
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-14 19:16:59 +00:00
Guy Harris 338369ec2f Treat CR-LF at the end of a line like LF.
That way, if we're reading a Windows-format file on UN*X, we handle it
the same way we'd handle a UN*X-format file.

This handles bug 10272 for the preference file and the "recent" files;
there are other configuration files that may need code changes as well.

Change-Id: Iec15a8fac276929ce8b53ae16070e9f2855f574c
Reviewed-on: https://code.wireshark.org/review/3042
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-14 18:27:06 +00:00
Graham Bloice e11db2ea03 Rename parameter if_index to stop clang warning:
capture_opts.c:1017:61: error: declaration of 'index' shadows a global declaration [-Werror=shadow]

Change-Id: Ie409b4fa7abeb85e460bea398735cdc98d9034b1
Reviewed-on: https://code.wireshark.org/review/3041
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-14 14:25:36 +00:00
Graham Bloice 560762044d Fix buildbot issues with commit f8f3239bb0
from change 3016.

Change-Id: I67363462f1c4e1ca69695573892692c458c620c6
Reviewed-on: https://code.wireshark.org/review/3040
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-14 14:02:29 +00:00
Martin Mathieson f8f3239bb0 Add default ciphering and integrity algorithms to use for when control messages are not available, e.g. when handing in to a target cell.
Change-Id: I35830fe04df5e5778c15cdb782982b2fbcda67ea
Reviewed-on: https://code.wireshark.org/review/3016
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-07-14 12:30:47 +00:00
Gerald Combs 082b46f95a [Automatic manuf, services and enterprise-numbers update for 2014-07-13]
Change-Id: I2aa66d261040f9f3e86103c820c914c371a70d1f
Reviewed-on: https://code.wireshark.org/review/3031
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-13 15:05:30 +00:00
Роман Донченко f85b52b498 proto_register_zbee_zcl_appl_evtalt: correct formatting
The original formatting, besides looking silly, also prevents the function
from being picked up by make-dissector-reg.

Change-Id: I06e37b0e862064275b07976295eca8f0288a0974
Reviewed-on: https://code.wireshark.org/review/3025
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-12 19:09:23 +00:00
Joerg Mayer 87895d7d0e Remove some $Id$ lines
Change-Id: Idec3769750f5a433b184e6e9fb44cbad23a29c60
Reviewed-on: https://code.wireshark.org/review/3023
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-07-12 14:31:51 +00:00
Martin Kaiser 55733ea170 fix scan_local_interfaces()
when we delete an interface from all_ifaces, delete it from ifaces as well
remove its selected status if it was selected

at the moment, an interface that was used for capturing before will
never be removed from the list of interfaces even if it becomes
unavailable as it remains in ifaces and will be re-added to all_ifaces
in scan_local_interfaces()

new helper function capture_opts_del_iface() to delete an entry from ifaces and
free all its components

Change-Id: Ie3271a7ed086367e511d3a971f3b68cfc014115d
Reviewed-on: https://code.wireshark.org/review/2965
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-12 14:06:03 +00:00
Evan Huus 5fda232659 make unit-test suite work out-of-tree
Change-Id: I638015a9b55712bb6843d6756c9c55915e142372
Reviewed-on: https://code.wireshark.org/review/2893
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-12 12:08:13 +00:00
Peter Wu 9e5e43ba44 dtls: fix faulty offsets and tvbuff references
This could lead to problems for fragmented DTLS packets.

Change-Id: I602c7e181ea3799a4a2e7bcfed05bfbb129f7df4
Reviewed-on: https://code.wireshark.org/review/3017
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-12 12:06:50 +00:00
Petr Štetiar ea4b2f486d dissectors/llrp: Add support for Impinj's Hub extension
Based on Impinj extension schema v1.4.

Change-Id: Ica9493a4527ae800d6e5daaf2d86b8cfdf479ed1
Signed-off-by: Petr Štetiar <petr.stetiar@gaben.cz>
Reviewed-on: https://code.wireshark.org/review/2981
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-12 00:34:35 +00:00
Gerald Combs 6b898e6bbc Add back -Qunused-arguments for Clang++.
When used with ccache it can result in warnings as described at
http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html.

Change-Id: Ibca4fd262ec8d1f16a450b1698ead10f57d52b06
Reviewed-on: https://code.wireshark.org/review/3015
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-11 22:22:19 +00:00
Graham Bloice 8044097473 Fix the x64 builds after the commit:b3b1f7c3aa2233a147294bad833b748d38fba84d
From Change: 2803

Change-Id: Ic57fb0e3c1e0450561aebe48a873a3fdb2e8e105
Reviewed-on: https://code.wireshark.org/review/3014
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-11 21:37:51 +00:00
Gerald Combs e2038e0300 Add strlen casts.
Change-Id: Icaf80f060c476dd7259c04c4cce4123025ef1dab
Reviewed-on: https://code.wireshark.org/review/3012
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-11 21:11:17 +00:00