Commit Graph

54109 Commits

Author SHA1 Message Date
Guy Harris 0734ac385f Rename buffer_ routines to ws_buffer_ to avoid name collisions.
In particular, epan/wslua/lrexlib.c has its own buffer_ routines,
causing some linker warnings on some platforms, as reported in bug
10332.

(Not to be backported to 1.12, as that would change the API and ABI of
libwsutil and libwiretap.  We should also make the buffer_ routines in
epan/wslua/lrexlib.c static, which should also address this problem, but
the name change avoids other potential namespace collisions.)

Change-Id: I1d42c7d1778c7e4c019deb2608d476c52001ce28
Reviewed-on: https://code.wireshark.org/review/3351
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-02 11:01:29 +00:00
Evan Huus 41e322594b Revert "Make Lua taps work in out-of-source-tree builds."
Breaks on windows...

This reverts commit 6b11cd97f2.

Change-Id: I1caf5500da993d7988e09fc0758950469f8252cf
Reviewed-on: https://code.wireshark.org/review/3346
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-02 02:14:17 +00:00
Evan Huus fade4b4d97 Fix another (valid) complaint from the mac buildbot
What mystical new compiler upgrade is this?

Change-Id: I89b3bfb53b9a19bbfb1cc8339d38cdc4a4652c62
Reviewed-on: https://code.wireshark.org/review/3347
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-02 02:14:12 +00:00
Evan Huus 005fd7eefd Rename variable to avoid -Wshadow on mac buildbots
Change-Id: I13d591248718fcc36cd300bf28f779e2d9e0265a
Reviewed-on: https://code.wireshark.org/review/3339
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-02 01:12:50 +00:00
Jeff Morriss edb7a91105 Make the nameres test suite work out of tree by looking for the global hosts
file in the build directory (rather than the source directory).

Change-Id: I365e573ee84e9a41aa76f4aa9a4a6efaf42fb60e
Reviewed-on: https://code.wireshark.org/review/3334
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-02 01:00:08 +00:00
Jeff Morriss 6b11cd97f2 Make Lua taps work in out-of-source-tree builds.
make-taps.pl needs to know where to find the source files otherwise none of
the tap data gets built correctly.

This makes the wslua test suite run in out-of-source-tree builds too.

Change-Id: I059474d90d59e87bd57dba18530a66a927a014cf
Reviewed-on: https://code.wireshark.org/review/3337
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-02 01:00:05 +00:00
Gerald Combs 69d0788875 CompiledFilterOutput dialog fixes and updates.
Apply a layout to the "Compiled Filter Output" dialog. Render the filter
as monospaced text.

Don't add an "expert OK" icon to the list. It doesn't seem to indicate
any sort of status.

Use a "Close" button instead of "OK". According to

http://uxmovement.com/buttons/why-the-ok-button-is-no-longer-okay/

"OK" implies we're going to perform some sort of action.

Add a "Copy" button while we're here.

Change-Id: Ia63f3032916e322fa9f4f2d465140b128b4f8078
Reviewed-on: https://code.wireshark.org/review/3338
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-02 00:50:41 +00:00
Matthieu Texier 45f3deed0b Fixing indentation with tabs in isis dissector
Change-Id: I4f6296f1cb988dca8c94ca5089ff6aa03439da32
Reviewed-on: https://code.wireshark.org/review/3333
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-01 22:55:59 +00:00
Sean O. Stalley 2fbd9e128b Fix variable-length managment packet dissection
Before, several managment packets were dissected incorrectly as
EPHandleDeleteReq's. Now they are dissected with the generic managment
packet dissector.

Change-Id: Id2f0951b91b99ba2340ff77c6285f382436788ef
Reviewed-on: https://code.wireshark.org/review/3328
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-01 19:37:07 +00:00
Gerald Combs e70251e8cb Fix comparison.
Change-Id: If2af35c8a49f405bee70eb144e26e539a7dc61f2
Reviewed-on: https://code.wireshark.org/review/3335
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-01 19:29:59 +00:00
Jeff Morriss c93297c750 Remove the old wireshark binary during RPM upgrades.
If we have a pre-alternatives wireshark binary out there (e.g., because
we're upgrading from wireshark-1.10 to wireshark-1.12), get rid of it
in the %pre script.  Otherwise the binary gets left there (because it's
listed as a %ghost in the new spec file).

Change-Id: I5828fcff486af3d269bad8dfe544c7659179bf5e
Reviewed-on: https://code.wireshark.org/review/3332
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-01 18:54:24 +00:00
Gerald Combs fb526204f8 Fix the CMake WinPcap library path check.
Look for wpcap.lib in WpdPack/Lib/x64 when our target platform is Win64.

Change-Id: I9a1bac22106bcb6a1f155ce83c02e344e6ec0d55
Reviewed-on: https://code.wireshark.org/review/3331
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-01 18:28:53 +00:00
Alexis La Goutte fbc1a9af14 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I847c7217b520a5f7ec581e6170fe3dc77c628e96
Reviewed-on: https://code.wireshark.org/review/3322
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-01 18:02:20 +00:00
Gerald Combs f6008e45e3 Update to match the current Windows Buildbot environment.
Update some OS X information as well.

Change-Id: I9a252ec83712848696dbb531e6da15b3c7644591
Reviewed-on: https://code.wireshark.org/review/3327
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-01 17:30:28 +00:00
Jeff Morriss e7df09b82f Add the easy_codec plugin to the source distribution.
It doesn't build on Linux but cmake looks for it (won't build without it) and
Windows users might want it.

Change-Id: I978f0de0a2895a82f4f3b8c1e9e0ecec6a93e6f4
Reviewed-on: https://code.wireshark.org/review/3325
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-01 16:17:38 +00:00
Jeff Morriss 44d30ece7e cmake: forget about plugins/asn1: it's not used any more.
(Don't load plugins/asn1/plugin.rc.in)

Change-Id: I621552a7e915396f61c5bb450a99d4e575ac30df
Reviewed-on: https://code.wireshark.org/review/3324
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-01 15:37:18 +00:00
Jeff Morriss 3c9556aef8 Add doxygen_global.cfg to the source distribution.
Change-Id: Ifc552ac74b84bce2a695189794440c905bf140a5
Reviewed-on: https://code.wireshark.org/review/3323
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-01 15:13:48 +00:00
Peter Wu 84e2abc927 tcp: detect invalid window scale shift value
According to RFC 1323, the window scale shift value must not exceed 14.
Detect this and cap at 14 to prevent undefined behavior (shifting by a
too large value).

Caught by `clang -fsanitize=undefined`.

Change-Id: I1acad252b86c7f23e497575b48d9496346327e00
Reviewed-on: https://code.wireshark.org/review/3312
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-01 14:28:44 +00:00
Jeff Morriss 7f9fdbb8c1 Add wireshark.pc.in to the source distribution (needed for cmake).
Bug: 10331
Change-Id: I81e0d224917cd4b38215e28ec146cd80efdb99d2
Reviewed-on: https://code.wireshark.org/review/3316
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-01 14:11:20 +00:00
Evan Huus a644744fb9 Use packet_scope instead of a stack local
As clang pointed out we end up storing a reference to it in a global and (more
relevantly) pushing that global to a tap which would run after the current frame
has returned.

Thanks to Alexis for bringing this to my attention.

Change-Id: I3aac43a806d217b0dc8a973f6bb2fa48cdd041bb
Reviewed-on: https://code.wireshark.org/review/3289
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-01 09:32:30 +00:00
Jeff Morriss dc9b44c5e2 Ignore RPM output directories.
Change-Id: I35cda66d512448317f3c7d6ed922f9dca2893690
Reviewed-on: https://code.wireshark.org/review/3304
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-01 01:55:40 +00:00
Guy Harris 435e7c6106 Move the AirPcap stuff into caputils.
Change-Id: I64b45dad36a3ec491aeb9de3439b4fe19b46f9d8
Reviewed-on: https://code.wireshark.org/review/3308
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-01 00:30:03 +00:00
Joerg Mayer f38c7d6bbd Copy over autofoo change: No more .h file.
Change-Id: I283ffccd0b3e1f10a9fbf85e033c5e07cd426bbe
Reviewed-on: https://code.wireshark.org/review/3305
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-07-31 21:59:03 +00:00
Guy Harris 1ebfb3fc91 Distinguish between wireshark *source files* and wireshark *dependencies*.
Only the former should be run through checkAPI.pl; Windows .rc files,
for example, shouldn't.

Change-Id: I948705b4020b413834c37a0d685eedcb747aa237
Reviewed-on: https://code.wireshark.org/review/3303
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 21:17:29 +00:00
Guy Harris cb960993d8 Lua - it's not just for breakfast^Wdissectors any more!
Change-Id: I7cefdec10a2fdd47f8a50ab5a45002662cc14f3c
Reviewed-on: https://code.wireshark.org/review/3302
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 21:00:59 +00:00
Martin Kaiser d05e6797d4 sync and behaviour are defined only for isochronous endpoints
Change-Id: Ic7755a7756589167b4fea5cf42a21419f59ecdae
Reviewed-on: https://code.wireshark.org/review/3301
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-31 21:00:02 +00:00
Martin Kaiser f3982ee183 defines for endpoint transfer types
Change-Id: Iffd5d81dde15eba12511dc89664d7ea06a70436f
Reviewed-on: https://code.wireshark.org/review/3300
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-31 20:59:46 +00:00
Martin Kaiser 9a032279ef this is the _URB_ transfer type - which is different from the
transfer type in the endpoint descriptor

Change-Id: I9e23d9825efb30311cd3e04d01548c03b163c276
Reviewed-on: https://code.wireshark.org/review/3299
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-31 20:59:31 +00:00
Guy Harris 43a81b6139 Add some information on running from the build directory.
Change-Id: I6c01141cd02af358152d007175ec0b51357e42b3
Reviewed-on: https://code.wireshark.org/review/3298
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 20:56:29 +00:00
Guy Harris 9505d3a7bc Need to make Windows installer packages as well.
Change-Id: I5e5483ead229ff74fb7bacba72459e324f9bd510
Reviewed-on: https://code.wireshark.org/review/3294
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 18:39:16 +00:00
Guy Harris b98537a4da We need to support building against an SDK on OS X.
Change-Id: I1fe9390e450dcb3669653a94d95339bce3182799
Reviewed-on: https://code.wireshark.org/review/3293
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 18:37:58 +00:00
Guy Harris 8531f88222 Include OS X installer dmgs as a package type we need to support.
Change-Id: I419fa4889d1fc2a9fd12ec19385543bd085e6b1e
Reviewed-on: https://code.wireshark.org/review/3292
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 18:36:29 +00:00
Jeff Morriss a91dbf7aa7 proto_add_subtree_format(): initialize tree_item to 'tree' rather than NULL.
... As would be the case if proto_tree_add_text() + proto_item_add_subtree()
were used.  (This initialization value is only used when TRY_TO_FAKE_THIS_ITEM()
shortcuts us out.)

As reported/discussed on -dev:

https://www.wireshark.org/lists/wireshark-dev/201407/msg00031.html

Change-Id: I4af63e3cf0a70607d58b4641597b2ce7907fbb8b
Reviewed-on: https://code.wireshark.org/review/3271
Reviewed-by: Michael Mann <mmann78@netscape.net>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-31 14:39:46 +00:00
Jeff Morriss 3762440ff1 cmake also needs to learn to build SVR4 packages.
Change-Id: I030e84b9247b273b01890a47d92109dd603e3247
Reviewed-on: https://code.wireshark.org/review/3288
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-07-31 13:21:32 +00:00
Peter Wu a69a63f5d1 ssl: fix SSL keylog file live-capture use case
Patch "ssl,dtls: simplify keyfile handling" did not account for the use
case where packets are captured and decrypted on the fly using
SSLKEYLOGFILE.

This patch restores that functionality by reading additional lines from
the keylog file when needed (to preserve the benefit of not having to
read the full file) and by watching the open file for deletions.

"Deletion" is detected by comparing st_dev and st_ino. Since these may
be useless on Windows, the size is also checked.

Change-Id: Ieadaef1426a9270587293db28f4dda33b3d17334
Reviewed-on: https://code.wireshark.org/review/3190
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-31 11:09:07 +00:00
Peter Wu 7939d32ce2 ssl,dtls: simplify keyfile handling
Previously, the keylog file would be fully parsed when an encrypted
pre-master secret is encountered or in the ChangeCipherSpec stage. There
was also a lot of duplication in the key logfile parsing.

This patch simplifies the key logfile parsing by using regular
expressions. Rather than scanning the key logfile for a specific key,
do this scan once at ssl init and save the results to a hashtable. The
map for session ID/tickets to master keys already existed, another one
for client random to master key and encrypted pre-master to pre-master
was added. This could later also be wired to the "Export SSL Keys"
menu item for improved reliability (when no session ID or tickets are
available, the client random could be used).

The ssl_{save,restore}_session{,_ticket} functions have been converted
to a single function that looks up a key (sid / client random / encr.
pre-master) to a (pre-)master secret.

Other minor changes: return booleans for some functions that can only
fail/pass. Remove some functions from the ssl-utils header that have
become private a few commits ago. Remove some outstanding issues
from the comments in packet-ssl as they are already done, add myself
to the ssl-utils header.

These changes pass the test suite and the sample Session Ticket-enabled
capture from https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5963

On-the-fly decryption are broken with this patch since keylog files are
read once at the start of a capture. This will be solved in a future
patch.

Change-Id: Idb343abe161950b5f3ff61bee093d0f4ef9655bd
Reviewed-on: https://code.wireshark.org/review/3057
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-31 11:08:18 +00:00
Michael Mann a1032fa62e Convert hf_packetbb_error filter (packetbb.error) to expert info.
Also make dissector "new style" using it's already built in basic heuristics.

Change-Id: I8b9b02d1f32cec96a1104c99647795d6fbda4804
Reviewed-on: https://code.wireshark.org/review/3275
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-31 11:06:01 +00:00
Guy Harris acea064009 Missing end-of-line backslash.
Change-Id: I99b72e4d38b12e0356f27d29f919484e40b7443b
Reviewed-on: https://code.wireshark.org/review/3287
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 08:57:28 +00:00
Guy Harris 3ac49be96c Add more files to the release tarball.
Change-Id: I02ce275154979ff56f8f8929e5909f3035f62c47
Reviewed-on: https://code.wireshark.org/review/3286
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 08:55:52 +00:00
Guy Harris 7f3d97c669 Include the gnm dissector.
Change-Id: Icc6090cdc8a6321677aaa82df7dd2bb408166c91
Reviewed-on: https://code.wireshark.org/review/3285
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 08:27:16 +00:00
Guy Harris 7e2dc50891 Nobody uses packet-t125.h, so don't bother building it, and delete it.
Change-Id: I10f8889a64024114106cd8058525cb21c6078279
Reviewed-on: https://code.wireshark.org/review/3284
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 07:53:08 +00:00
Guy Harris 067beb0210 Add a bunch of missing files to the distribution.
Files from the debian directory, documents from the doc directory,
graphics from the docbook/wsug_graphics directory, and the echld
Makefile.nmake.

Change-Id: Iccccc58811753581b0b180053defd937aea22f95
Reviewed-on: https://code.wireshark.org/review/3283
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 07:43:41 +00:00
Joerg Mayer 54c55bbdf6 Add a missed -template.h file
Change-Id: I83f4680b3b258daf0fdad9f896be5f854b8dc3de
Reviewed-on: https://code.wireshark.org/review/3282
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-07-31 05:56:28 +00:00
Guy Harris 5dd83af26d Add some missing CMake files to the distribution.
Change-Id: I67ca59bb77766f4625e64b9042cdcb5d03cd7994
Reviewed-on: https://code.wireshark.org/review/3281
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 04:45:49 +00:00
Bill Meier 278b76250f addr_resolution_dlg.c: "OK" button should *do* something: treat as cxl.
Also: remove vestigial line of commented-out code.

Change-Id: Ieb41a0e39a4e0ec14031b1dbd38fc0d7ad47a635
Reviewed-on: https://code.wireshark.org/review/3278
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-31 04:41:13 +00:00
Bill Meier 0a12f7d261 addr_resolution_dlg.c: Fix crash when 'Statistics ! Show address resolution' is invoked.
(Introduced when the ipv4_hash_table key format was changed in 5d98ab67)

Change-Id: Ie5d1314f7c7cc8bc71dca8a2db05e34a0a7776d7
Reviewed-on: https://code.wireshark.org/review/3277
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-31 04:40:10 +00:00
Guy Harris 791d93a259 Add more files to the distribution.
If it's checked into asn1 or a subdirectory thereof, put it into the
distribution.  (If it's not useful, why is it in Git?)

Change-Id: I4dac8a0d19a770db1513729cf71069a37f1d83fc
Reviewed-on: https://code.wireshark.org/review/3276
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 04:31:10 +00:00
Guy Harris 4d90d6e38d Add some files under asn1 to the distribution.
Include CMakeLists.txt files and the gnm subdirectory, along with the
top-level Makefile.inc and Makefile.preinc files.  Don't explicitly
include Custom.make, as automake does that automatically given that it's
included by asn1/Makefile.am.

Add some files to EXTRA_DIST lists.

Move some .asn files to EXTRA_DIST; they don't need to be in SRC_FILES,
as SRC_FILES always includes EXTRA_DIST, and they *do* need to be in
EXTRA_DIST so that they're in the distribution.

Change-Id: Id91df577260fa57028d40fe098be1d79c59398e6
Reviewed-on: https://code.wireshark.org/review/3273
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-30 23:42:55 +00:00
Gerald Combs 3f0430d1f5 Add libgpg-error6-0 to the GCRYPT_ERROR_LIBRARY search list.
(Does FIND_LIBRARY support wildcards?)

Change-Id: I240e93070091e445446478b082ad284267c977a6
Reviewed-on: https://code.wireshark.org/review/3272
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-30 23:08:37 +00:00
Gerald Combs e6a2fabf71 Fix dist.
Add ui/cli/tshark-tap.h and packaging/nsis/windeployqt-to-nsis.ps1.

Change-Id: I00465aed3f33595ad50be0ba5d0ed0eae54e1137
Reviewed-on: https://code.wireshark.org/review/3268
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-30 18:21:58 +00:00