Commit Graph

52724 Commits

Author SHA1 Message Date
Pascal Quantin 45f381daa6 IPsec: fix compilation when building without libgcrypt
Change-Id: If525fb27ec607201efceb3ab9207305c3a4953dc
Reviewed-on: https://code.wireshark.org/review/1439
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-30 14:51:51 +00:00
Evan Huus abe7f7da54 Cleanup libz streams in SPDY dissector
Fixes major memory leak.

Bug:10062
Change-Id: Ife70f12b8697a7873860c702ee0c740f98d98821
Reviewed-on: https://code.wireshark.org/review/1435
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-30 11:59:39 +00:00
Alexis La Goutte 9cdba46251 Fix indent (Use Tab)
Change-Id: I811fb3db41a31d2334eb80f1821beea109bfa0d9
Reviewed-on: https://code.wireshark.org/review/1437
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-30 11:36:12 +00:00
Pascal Quantin 3116cf4add MBIM: use hash map instead of red/black tree for UUID extension table
Change-Id: Iaab9ff66e94bfe38fc875ad312b8e795b80814f4
Reviewed-on: https://code.wireshark.org/review/1438
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-30 10:15:12 +00:00
Alexis La Goutte 035f6f2fdc Try to make Mac OS X Buildbot Happy
packet-ipsec.c:1905: warning: implicit conversion shortens 64-bit value into a 32-bit value

Change-Id: Ic293e6b297f8f52aef7a102ab5ca0e0e98b9d7a7
Reviewed-on: https://code.wireshark.org/review/1436
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-30 08:54:46 +00:00
Martin Mathieson 266e0a9275 Add an API for programmatically adding ESP SAs (most likely from a private
dissector).

Also, speed up ESP decryption in several ways:
- store gcrypt_cipher_hd in the SA struct, rather than continually
open, setkey and close for each PDU
- don't convert the key string from ascii to hex each time - do it upon
during update callback and keep
- do the decryption in-place, avoiding the need to allocate, memcpy and
free a separate buffer for encrypted data
- when matching addresses, avoid doing a strlen until after we check
whether or not we're matching against "*"

Change-Id: Ibb66663ec21326351abc761be78a0d57f7797fa5
Reviewed-on: https://code.wireshark.org/review/1421
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-30 05:01:12 +00:00
Bill Meier faec7514cf SVN --> GIT in a few places. Fixes Bug #10060.
Change-Id: I5dcf7699e295dcdbd1e870af5ec68b010a63bf6f
Reviewed-on: https://code.wireshark.org/review/1434
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-04-30 03:28:33 +00:00
Gerald Combs 133d4deb7e Fix cast for older versions of GLib.
The version of GLib on the 32-bit OS X builder defines

Unfortunately this results in a cast warning when u is a guint16. Newer
versions of GLib cast to gulong so do that.

Change-Id: I2d7e56ef9e5164789ee3a59115cb0f4a76155880
Reviewed-on: https://code.wireshark.org/review/1433
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-04-29 19:54:00 +00:00
Peter Wu dfb92dfd67 Fix crash when switching profiles
rescan_packets() starts a new dissection session by free'ing the
previous state and creating a new one. A reference to the old session
was not updated though.

This is the only place where epan is overwritten. After init, col_init
will at some point initialize cf->cinfo.epan with a cf->epan.

Bug: 9463
Change-Id: I8cf4e0823328f44a0dccfeeec1594f9929829d2d
Reviewed-on: https://code.wireshark.org/review/1430
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-29 17:06:02 +00:00
Gerald Combs b60ccf6dae Fix an extraneous parentheses warning.
"if (G_UNLIKELY(...))" triggers an extraneous parentheses warning when
compiling with XCode's clang-500.2.75. From looking at the macro
definition we *should* be able to get rid of the outer parentheses
everywhere.

Change-Id: I710e1cc391e1167c1243c4ddb032f2831f0a9498
Reviewed-on: https://code.wireshark.org/review/1432
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-04-29 15:35:29 +00:00
Evan Huus e185ad6ac9 Add casts to satisfy buildbot
I'm really not sure why it's complaining about a cast *up* from a guint16 to a
guint...

Change-Id: Ie24ae0ea2361b54ed255773a0fc86250a240b55a
Reviewed-on: https://code.wireshark.org/review/1431
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-29 15:32:30 +00:00
AndersBroman 371b17e857 Make id a guint to try to please OSX buildbot.
Change-Id: Ia97aa45ff0fc52fb21d2e864d1ca328646de547b
Reviewed-on: https://code.wireshark.org/review/1429
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 10:51:27 +00:00
Pascal Quantin b2af5b066a Convert a few dissectors with simple request/response tracking from red/black tree to hash map
Update the readme file accordingly

Change-Id: I056d1ab1f77df641b83fa9b3618b6c25d66e1a83
Reviewed-on: https://code.wireshark.org/review/1420
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 10:23:32 +00:00
Anish Bhatt 8f2e234add Add support for Congestion Notification TLVs (802.1Qau)
I don't have sample captures for this, but the TLV layout is pretty simple and only contains two 1 octet bitmaps

Change-Id: Ibd7db7f40187904bbbf348c2cb89a5494cd46aab
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/1427
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 06:01:00 +00:00
Graham Bloice 14017dc6f1 Set CMake defaults for Windows build to:
Use GTK2 as per nmake.
  Not to build the dumpabi executables.

Change-Id: Ia28cf1a80b81e10595f4af5bbd46da3b3675faf5
Reviewed-on: https://code.wireshark.org/review/1376
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 04:25:26 +00:00
Mike Gerschefske 8d4db3e40b Updated items in dissect_ospf_v2_lsa to use filterable item fields
Change-Id: I226c6fd3d5aef9d3881416fba9c6259e6170357c
Reviewed-on: https://code.wireshark.org/review/1426
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 04:19:59 +00:00
Peter Wu 8dc7d164dc prefs: prevent double-free on changing prefs
Prevent double-free when changing profiles. After switching from the
default profile to a profile without a preferences file,
saved_at_version will be freed, but a new version will not be inserted
(because the prefs file is empty). On a subsequent switch to another
profile, the saved_at_version field is freed again leading to a crash.

Bug: 9463
Change-Id: Ia9e0936e32603b4676a37dc428bda40c264a6eaa
Reviewed-on: https://code.wireshark.org/review/1425
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 04:17:54 +00:00
Peter Wu e8cb623166 prefs: spelling fix, simplify code
Found spelling error "a another". All those dynamic allocations and
magic numbers are horrible and unnecessary. Simplify the gtk code
rewording the message and merging strings.

Simplify the version code by using fscanf to take care of matching
the first line of a preference file.

Change-Id: I1e75803aacaa494ba5005791bcbd023e0807aaaa
Reviewed-on: https://code.wireshark.org/review/1424
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 04:16:23 +00:00
Peter Wu b086b783c2 gtk: fix glib assert for dialogs without cancel
Dialogs with only "Save" and "Don't save" buttons do not have a default
cancel action. Check for the existence of an OK button before
registering one.

This fixes three warnings when trying to trying to overwrite preferences
with unknown keys.

Change-Id: Ie583c40d3db8405d94b8d77710a7fb6556eac89d
Reviewed-on: https://code.wireshark.org/review/1423
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 04:11:57 +00:00
Michael Mann 65700bd2e0 Make a dissector table out of IPv6 Next header.
This cleans up the implementation of the extension header, but also allows Decode As functionality for Next Header fields. This allows "old" SHIM6 IP protocol number (not IANA registered) to still be dissected.

bug:9995
Change-Id: I6f29a1f7db144478c5b6416d27da2c9c5a7a1de1
Reviewed-on: https://code.wireshark.org/review/1378
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-28 23:50:15 +00:00
Anish Bhatt ec205458b1 Fix checkAPIs warnings in packet-lldp.c. repoted_length() used instead of captured_length() as is seems more logical
Change-Id: I02860d5c45e3fd794d9f99e2d382bc02ae886b36
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/1422
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-28 22:23:01 +00:00
Anish Bhatt eadaa0c50f This block of defines was always changed when I was retabbing my additions, this change fixes the tabs
Change-Id: I10e260a68cadf18d1aca10c7f037d45d311b6477
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/1418
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-28 22:15:44 +00:00
Alexis La Goutte e9d4f82ab7 HTTP2: with HTTP2 draft-1x, now upgrade use h2-XX or h2c-XX for upgrade HTTP1 Protocol (with XX number of draft)
Change-Id: I7b6394e1a84db34e34b4a05245414b81a62292af
Partial-Bug:10054
Reviewed-on: https://code.wireshark.org/review/1409
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-28 22:15:10 +00:00
Martin Mathieson 0708e0923e Update SR and DRX tracking when see UL CRC error'd frame, and add an
option to add generated items corresponding to the middle of
BSR ranges (suitable for plotting/stats).

Change-Id: I73b4e82ea5fb869d93d9666b9f8c9a10562db365
Reviewed-on: https://code.wireshark.org/review/1419
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-04-28 21:15:19 +00:00
Evan Huus 72fc075e9a Fix potential invalid-reads in catapult files
As caught by CppCheck, the conditions checking that n is in bounds should
occur *before* the conditions using n as an index so that if n is out of bounds
we don't try and use it anyways.

Change-Id: I107c983153aa12203f8c88b14e1addd3807d6b6e
Reviewed-on: https://code.wireshark.org/review/1415
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-28 21:02:54 +00:00
Anish Bhatt 3765e99a07 With the use of tvb_reported_length_remaining(), there is no need to calculate consumedLen anymore
Change-Id: I8f4c32012061d3bff5e4efb80dfce8d82f7400df
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/1417
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-28 20:49:21 +00:00
Alexis La Goutte b512feda8a Fix Dereference of null pointer found by Clang analyzer
Change-Id: Icc25714cd923fcb514541f28ca19c7728dc1be55
Reviewed-on: https://code.wireshark.org/review/1412
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-28 18:48:27 +00:00
Alexis La Goutte 64650477a1 Make filterable OSPF Header...
* Remove if(tree)
* use proto_tree_add_item
* Enhance checksum display
...

Change-Id: I66062ecbe7f0c8170fbe9c4a2d7654d62a87c18b
Reviewed-on: https://code.wireshark.org/review/1414
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-28 18:48:09 +00:00
Jeff Morriss 989f4ffd69 Fix up indentation.
Change-Id: I9c217cfb0246c763ec7084bb928440d8aab88f99
Reviewed-on: https://code.wireshark.org/review/1416
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-28 18:20:00 +00:00
Philip Rosenberg-Watt 388859a2e3 DPoE OAM message decoding as per CableLabs spec.
Priority given to messages tested in DPoE 1.0 ATP.

Change-Id: I6ba3f1a8ca018f2231ad60f2f347ac57f1f93a00
Reviewed-on: https://code.wireshark.org/review/1076
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-28 17:35:56 +00:00
Jeff Morriss ab87070956 Fix Restoration-Priority's AVP code.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10057

Bug: 10057
Change-Id: I88bb6825006b038065f8edff61066557445f1dc6
Reviewed-on: https://code.wireshark.org/review/1413
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-28 15:56:46 +00:00
Philip Rosenberg-Watt cd68b4744c Add dissector for LINKTYPE_EPON
See IEEE Standard 802.3-2012 Section 5, Clause 65 and CableLabs DPoE
Security and Certificate Specification 1.0, Section 6.

Currently dissects 1G mode. 10G mode will be added when hardware is
available.

Change-Id: I6232af9bf6807644ef66a120d97e5fa5927988fe
Reviewed-on: https://code.wireshark.org/review/1284
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-28 15:26:32 +00:00
Pascal Quantin 484b183e3f MBIM: make the backward compatibility function static
Change-Id: I51bbdf9c0dbb80a8350ec7762e588ca3182dce63
Reviewed-on: https://code.wireshark.org/review/1408
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-28 09:18:46 +00:00
Alexis La Goutte a203bbbd5b Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I349a5aa7248979aa32eda9f853fd660dc01bdd08
Reviewed-on: https://code.wireshark.org/review/1407
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-28 08:34:12 +00:00
Anish Bhatt 581cdcee10 Add Support for IEEE DCBx (8021az)
Sample captures attached at https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10055

Closed-bug:10055
Change-Id: Ib10e8d2a8aecdcf488eb174ed76a259433528f4a
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/1403
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-28 08:32:12 +00:00
Lorand Jakab 7aebb0cec9 Fix issues reported by clang-analyzer
Change-Id: Iefb52c674be99af167eef7b2eba249607c1dfefd
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1406
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-28 06:25:59 +00:00
Mike Gerschefske e240c4e9cd Updated ospf link state router messages to use proto_tree_add_item instead of proto_tree_add_text.
Change-Id: Icb04aaa68e7e8b79116a6ac48d1897eb387aab3e
Reviewed-on: https://code.wireshark.org/review/1404
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-28 06:22:50 +00:00
Evan Huus 1a7e5c9e28 tvb_reported_length_remaining() returns gint
not size_t, which was giving 64/32 conversion errors on some platforms

Change-Id: Idf81dc98f8921a92840731d742d6e46a40e1387f
Reviewed-on: https://code.wireshark.org/review/1405
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-28 03:17:41 +00:00
Michael Mann 0cfd4eb4a1 Add support for DCBX cee/cin protocol
CEE Spec here : http://www.ieee802.org/1/files/public/docs2008/az-wadekar-dcbx-capability-exchange-discovery-protocol-1108-v1.01.pdf

From a wireshark POV, CIN is the same as CEE with a different OUI subtype, and one less supported TLV.

bug:10039
Change-Id: I5aa4f1be2ecc43ecad6e86633231e6e39695af6e
Reviewed-on: https://code.wireshark.org/review/1330
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-28 00:13:27 +00:00
Martin Mathieson 0a3f725260 Change preference default to use RRC-signalled value for SN field length of DRBs.
Change-Id: Ibc56c901938f490f1fb0fede7e2fe0fbfc659250
Reviewed-on: https://code.wireshark.org/review/1402
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-04-27 22:13:59 +00:00
Michael Mann 98ed927290 Fix rare case of wmem map being O(n)
For 'x' equal to 0, HASH() macro also returns 0 which makes wmem map O(n).
When random generator will return 0 just use 1.

Change-Id: If484091352a719aea27135a705d37ff4c184a13b
Reviewed-on: https://code.wireshark.org/review/1387
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-27 21:55:53 +00:00
Evan Huus 4272cb8786 Revert part of g757db64e484b009c3
It was intended to change the DTLS decryption test, but changed the SSL test
file instead, which led to the SSL test mysteriously failing. The SSL capture
really is http, so that's the right protocol, and the port is the standard 443,
not 4433 (which was perhaps a typo?).

Change-Id: I84448c2326d2a4301a4bba9607f8ba90a495531d
Reviewed-on: https://code.wireshark.org/review/1401
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-27 21:55:03 +00:00
Pascal Quantin 3b1903c394 MBIM: fix compilation with GLib versions < 2.22.0
Change-Id: I27e794347dc0988f0f34798cb62f08a11a217176
Reviewed-on: https://code.wireshark.org/review/1400
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-27 21:42:52 +00:00
Alexis La Goutte 5d2e945dbc Fix Dereference of null pointer found by Clang analyzer
packet-gvcp.c:2101:7: warning: Access to field 'req_frame' results in a dereference of a null pointer (loaded from variable 'gvcp_trans')

Change-Id: If39453f9f2ade551fd8c7e369fd60325c16df24b
Reviewed-on: https://code.wireshark.org/review/1393
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-27 21:22:56 +00:00
Pascal Quantin 7ddf2b4540 MBIM: use wmem hash map functions for request/response tracking
Change-Id: Ie550b0ef2b57827f610c4c6a83ff14868e853125
Reviewed-on: https://code.wireshark.org/review/1399
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-27 21:21:37 +00:00
Michael Mann 5ce5d0677e swIPe IP Security Protocol
bug:9996
Change-Id: I7c7ab7dfa81e44d6bf9affe7bfb0cd9f0a221adf
Reviewed-on: https://code.wireshark.org/review/1379
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-27 20:55:58 +00:00
Daniel Stenberg c35870b0af packet-http2: updated to http2 draft-12
From Alexis La Goutte
Fix warning found by pre-commit

Partial-Bug: 10054
Change-Id: I976884a240a55bb2287a802d72668a2c845179c0
Reviewed-on: https://code.wireshark.org/review/1295
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-27 20:23:27 +00:00
Alexis La Goutte b57fc91c68 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I75aa99b020c92e7caf7efebe34cd1af3763cf592
Reviewed-on: https://code.wireshark.org/review/1397
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-27 20:23:01 +00:00
Alexis La Goutte 298633ec33 Add Modelines info
Change-Id: Ib6e1c68e47f2c66d444ac26d1d48f5ef3e14b949
Reviewed-on: https://code.wireshark.org/review/1396
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-27 19:55:40 +00:00
Alexis La Goutte ea729ed5b7 Add Modelines info
Change-Id: I8ce92fcd103a18fad2ea4c0b873914af38d48155
Reviewed-on: https://code.wireshark.org/review/1395
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-27 19:55:11 +00:00