Commit Graph

58593 Commits

Author SHA1 Message Date
Michael Mann cf8eed97cb Dissect 802.3 Jumbo frames while capturing.
Following the code Olivier Montanuy's code suggestion from bug 5390.

Bug: 5390
Change-Id: Ie7425a76fd65fc9d50474c010b4a5beb1b3cf73e
Reviewed-on: https://code.wireshark.org/review/7588
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-24 22:33:17 +00:00
Alexis La Goutte f75e52ba71 file.c: fix Fix Branch condition evaluates to a garbage value found by Clang Analyzer
Change-Id: Ib7c9e114973f78775cf17889b6aeab217cb6d0ef
Reviewed-on: https://code.wireshark.org/review/9101
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-24 22:21:00 +00:00
Evan Huus 89cc85b5ef Disable "Refresh Interfaces" when capturing
It breaks restarts, and doesn't do anything useful at this point anyways.

Bug: 11176
Change-Id: I6a010becf851fea8690b445874b29b54546fb2e3
Reviewed-on: https://code.wireshark.org/review/9106
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 21:43:13 +00:00
Evan Huus 0d28caf880 qt: fix more button states
As in gcc614a9 we have to manually uncheck buttons if we decide not to action
them.

Change-Id: Ia5dc29a292bc6d75a1e8753da06a053cafa66866
Reviewed-on: https://code.wireshark.org/review/9107
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 21:42:35 +00:00
Evan Huus cc614a93d8 qt: fix button state when cancelling save
If the user decides not to capture after all, by hitting cancel when prompted
for their unsaved changes, we have to manually uncheck the button again because
Qt helpfully checks it for us.

Bug: 11145
Change-Id: I362d72787ddb138d382a899d091698c6652eebb2
Reviewed-on: https://code.wireshark.org/review/9102
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 21:26:39 +00:00
Pascal Quantin 1f0226cce9 dumpcap: fix files capture autostop condition
CND_CLASS_CAPTURESIZE condition type needs the tested parameter to be a guint64

Bug: 11305
Change-Id: I096d995e1e08ff3a81b2a95710185d272d849c86
Reviewed-on: https://code.wireshark.org/review/9104
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-24 21:24:41 +00:00
Evan Huus ec094b5cc1 Initialize default stats before using them
Quick hack fix for bug 11275.

The longer fix I am still thinking about, but it goes something like this: we
have a terribly confusing dependency graph in ordering our various preferences,
so it's fragile and needs refactoring.

1. We must call epan_init before we read the preferences files, since dissectors
register many preferences.
2. We must call pre_init_prefs before we call prefs_register_modules, since that
inits the default values of the "global" preferences structure. `init_prefs()`
handles this normally.
3. We must call epan_init before we call init_prefs since init_prefs depends on
UATs being initialized (which is something epan_init does).
4. We must call prefs_register_modules before we call epan_init since that
generates the `protocols` subtree which is needed for registering
dissector-specific preferences.

The above graph has a cycle, which I *think* can be solved by splitting
prefs_register_modules?

Bug: 11275
Change-Id: I08dae6a7ade178896e0de5e5091f7eeaca95846f
Reviewed-on: https://code.wireshark.org/review/9098
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 19:48:09 +00:00
Gerald Combs 137c495352 Run compress-pngs.sh.
Change-Id: If662cfbe6ad2ce80916d32750476e95f607fe902
Reviewed-on: https://code.wireshark.org/review/9100
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-24 19:26:46 +00:00
Joerg Mayer 58b03547f1 Add a bunch of " I missed in my previous patch.
Change-Id: Ia94034bdb2148bca641b7c9bc6ec3f900c7574d3
Reviewed-on: https://code.wireshark.org/review/9097
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-06-24 17:47:14 +00:00
Evan Huus 95ac3908d8 Remove the last deprecated tvb_length calls
And remove the shims themselves!

Change-Id: I511c06eb21eaf68d1dc36bbb9558408807472f9c
Reviewed-on: https://code.wireshark.org/review/9088
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 17:32:40 +00:00
Alexis La Goutte 86e562f27d Qt: Add x-capture-file-reload@2x.svg to Makefile.am
Change-Id: I497290eff821167a31468a10af23ab762eff32fe
Reviewed-on: https://code.wireshark.org/review/9095
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-24 17:17:35 +00:00
Guy Harris d406b28ebb Don't export libnghttp2 routines outside libwireshark.
Hopefully this will fix build issues that popped up on Windows, as well
as making the library a bit cleaner.

Change-Id: I5b5266af4b41e10aba32abdb46bfe811ab11b45d
Reviewed-on: https://code.wireshark.org/review/9087
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-24 17:13:09 +00:00
Alexis La Goutte 17c59f5090 Qt: Add Reload button on MainToolBar
Add @2x versions of x-capture-file-reload as well.

Change-Id: I08819cf66903884e0344a4f9bcd891befb582e90
Reviewed-on: https://code.wireshark.org/review/9066
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-24 17:10:01 +00:00
Evan Huus 5dcd207cc6 Check _MSC_VER is defined before we use it
Otherwise it breaks a bunch of stuff on Linux machines because of the way gcc's
preprocessor works (buildbot decryption tests, extcap, etc).

Originally added in Ic5360089f96be620fbe99ba4e819e0caa5ca0215

Change-Id: Iad43fa1415aa331ae375771adac0818ea1b99060
Reviewed-on: https://code.wireshark.org/review/9091
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 15:34:18 +00:00
Alexis La Goutte b7aacfdd46 libnghttp2: readd remove check for CONFIG.H
i hope will be fixed Windows 32 buildbot

Change-Id: Ie4429193d354ff70b4802fa8a734cb35a69c090c
Reviewed-on: https://code.wireshark.org/review/9090
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-24 15:31:07 +00:00
Evan Huus 69cdfe9410 Remove another batch of deprecated tvb_length calls
Change-Id: Icfdde38e40cca05d0705a081153a4ea3e8782ee7
Reviewed-on: https://code.wireshark.org/review/9086
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 04:30:35 +00:00
Alexis La Goutte d0faa9adf8 HTTP2: Update to libnghttp2 1.0.4
Change-Id: Ia92d183b7e7b5a604d75eee13b64b827ad0af903
Reviewed-on: https://code.wireshark.org/review/9054
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>
2015-06-24 03:27:49 +00:00
Joerg Mayer ae92a8347e Update build instructions for cmake near the end a bit
Change-Id: I7d5b8ab3479cc4268b6cc5ae7822066a69b740dc
Reviewed-on: https://code.wireshark.org/review/9085
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-06-24 02:31:15 +00:00
Guy Harris 14252551b2 Handle downloading and installing CMake 3.x.
Change-Id: I2347e3e36008fee006e9f66997d45b562eacc7dc
Reviewed-on: https://code.wireshark.org/review/9084
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-24 02:09:35 +00:00
Evan Huus 9b5b7c1a90 Remove deprecated tvb_length calls
Trust that the files in epan/ immediately (not dissectors) know what they're
doing so just blindly convert them to captured length.

Change-Id: I872f7d58b2e15ae82c75fd56f4873996fbc97be7
Reviewed-on: https://code.wireshark.org/review/9083
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 00:31:25 +00:00
Guy Harris 893e1e516a Fill in the 802.11 pseudo-header and call the "802.11+radio" dissector.
Do with the Prism and AVS headers what we do with the radiotap, PPI,
etc. headers.

Change-Id: I4b2522a2b294f53f22c363cd43604c4af0304fc2
Reviewed-on: https://code.wireshark.org/review/9082
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-24 00:25:39 +00:00
Evan Huus f92fab41a5 Remove a bunch more deprecated tvb_length calls
(getting really close!)

Change-Id: Ibf22a5f727c4dc0070b78144a4b0ab8e0c5e1bce
Reviewed-on: https://code.wireshark.org/review/9081
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 00:22:50 +00:00
Guy Harris ad784bc7ce Put the frequency/channel and RSSI data into columns.
Change-Id: I039e727aff46c08b93908a216608e196ed4bd662
Reviewed-on: https://code.wireshark.org/review/9080
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-24 00:21:51 +00:00
Guy Harris a8acb53e36 Pass the signal and noise dBm values to the 802.11 radio dissector.
Change-Id: Ia3fa6ba0b1d16315c77895f3e8ae96ed7e5e1e02
Reviewed-on: https://code.wireshark.org/review/9079
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-24 00:19:18 +00:00
Robert Cragie fa6ebae939 Improved prefix display and comments for IID copying
Change-Id: I58f56dd5cfc212e53bd7e9d575d2cf9b4b4f2b27
Reviewed-on: https://code.wireshark.org/review/8886
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>
2015-06-24 00:13:05 +00:00
Peter Wu 93592e4af7 openwire: remove useless register_init_routine call
Change-Id: Ifc638e92d4b148a2efeb6c488ab4dc2a57a054e7
Reviewed-on: https://code.wireshark.org/review/9076
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-23 22:48:11 +00:00
Evan Huus 0a9a2554a4 Remove more deprecated tvb_length calls
Change-Id: Ie137e6f4e20fe26b1a4d9510e267896219c1c631
Reviewed-on: https://code.wireshark.org/review/9075
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-23 22:17:56 +00:00
Martin Mathieson d4f6480253 ISAKMP: fix Cisco fragmentation support.
Last flag wasn't mapping to 'more fragments' properly, and reassembly
should only be attempted on the last frame.

Bug: 7940
Change-Id: I565f2b72b6eb68dc32e0f57a43a098a8f203a800
Reviewed-on: https://code.wireshark.org/review/9073
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 21:32:25 +00:00
Martin Kaiser e53337accf replace another bunch of deprecated tvb_length calls
Change-Id: Ib7c50b55942220d48de025642154b4bf3f39c8a2
Reviewed-on: https://code.wireshark.org/review/9074
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-23 21:04:41 +00:00
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
Martin Kaiser 633ba955b2 [Qt] switch screens only if we're acutally starting a capture
don't do the switch when the capture can't be started
(e.g. because we didn't select any interface from which to capture)

Change-Id: Ibabd703863d546c95b9fbe9bd2280d67a22dfc26
Reviewed-on: https://code.wireshark.org/review/9072
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-23 20:39:15 +00:00
Martin Kaiser 911b9347ff [Qt] if the capture is stopped before we received any packet...
... we go back to the main welcome screen like we do in GTK

Change-Id: I64ef29665af61da55c1971ca59d1fab25d205874
Reviewed-on: https://code.wireshark.org/review/9071
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-23 20:39:01 +00:00
Peter Wu 2b68a6f450 tshark: fix memleak from version lookup
Immediately release memory after using it, fixes a direct memleak
warning from ASAN.

Change-Id: Icd3ff19c607da790a4a093966e1966cb0df6bb9d
Reviewed-on: https://code.wireshark.org/review/9069
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-23 20:18:37 +00:00
Martin Kaiser d85a221cd3 proto_tree_add_item_ret_(u)int: do the NULL check at the start
before hfinfo is actually used (coverity 1293631)

Change-Id: I270c30c4699cd6f831a38986e6c8024c2e9ef47a
Reviewed-on: https://code.wireshark.org/review/9061
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-23 20:15:45 +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
AndersBroman 89fbf02ab5 [MSVC 2015] file_exists() fails on MSVC2105 as file_stat.st_ino gets reset
to zero in the function call if the file does not exist. The general code
seems to work with MSVC2015 so use that.

Change-Id: Ic5360089f96be620fbe99ba4e819e0caa5ca0215
Reviewed-on: https://code.wireshark.org/review/9070
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-23 20:12:39 +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
Pascal Quantin 0901e26505 Qt: change default behavior of 'Decode As' window
Up to know Qt 'Decode As' window was saving manual configuration automatically, contrary to GTK UI.
This can be misleading when decoding protocols without a fixed identifier (port number, USB bus/device id, ...).
Opening a new trace might lead to previous and now irrelevant settings being applied.
Make this optional and add a Save button to permanently store the current configuration.

Change-Id: I077c560f9e71cab16a74247e2e9d87523c0ed85e
Reviewed-on: https://code.wireshark.org/review/9058
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-23 18:27:44 +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
Gerald Combs d7b286c794 Qt: Be less aggressive about reselecting packets.
Don't reselect the current row in redrawVisiblePackets. That routine is
called in quite a few places, including ones where we don't want to
automatically scroll to the current packet.

Change-Id: Ia29a832235c0e260d8b17f1ce76745047700537b
Reviewed-on: https://code.wireshark.org/review/9064
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-23 18:23:12 +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
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