Commit Graph

20746 Commits

Author SHA1 Message Date
Guy Harris a11879e218 Get rid of an unused variable.
Change-Id: I8e436b7e4724c85943200087783d3cf7dd7c1535
Reviewed-on: https://code.wireshark.org/review/2639
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-25 02:38:24 +00:00
Michael Mann 29ecd114bf convert to proto_tree_add_subtree[_format]
Change-Id: I5f573dffabb8685a8e5a334ff2bfb24d9838daa6
Reviewed-on: https://code.wireshark.org/review/2601
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-24 23:42:13 +00:00
Evan Huus 83da877fff Add back initializers dropped in g9356d5c689fa
They were actually necessary.

Bug:10224
Change-Id: I9973bf7bab670d12e5b90bb2a57e99f9125d6a07
Reviewed-on: https://code.wireshark.org/review/2632
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-24 22:28:11 +00:00
Evan Huus 2a1e3d16aa Fix two bugs in kafka dissection
- Respect the length field when dissecting message sets
 - Don't "wrap around" in capture when doing request/response matches

Also convert one instance to proto_tree_add_subtree, as an experiment.

Change-Id: Id161687865afa7ca83e6943a643bc54582f65554
Reviewed-on: https://code.wireshark.org/review/2624
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-24 21:59:41 +00:00
Anish Bhatt b4d4218a18 OSPF Cleanup. Remove unnecessary TFS declarations
Change-Id: I9b4205f6d579ea9e707d83baf81f77393e3098b4
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/2478
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-24 19:56:52 +00:00
Pascal Quantin eaf6bf3ec0 MBIM: add an option to force SMS PDU decoding format if MBIM_DEVICE_CAPS_INFO message was not captured
Change-Id: Iff78a00b463a7a33e1705c76ea49618af532f3aa
Reviewed-on: https://code.wireshark.org/review/2621
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-24 17:25:30 +00:00
Guy Harris 4f1d20abae proto_tree_add_uint() takes a value, not an encoding, as an argument.
Change-Id: Ie2c0523e32b54cd13506501d98215934a8d1304e
Reviewed-on: https://code.wireshark.org/review/2611
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-24 06:57:32 +00:00
Martin Kaiser e68638fe6b usb iso urbs on linux can't possibly contain a setup packet
see mon_bin_event() in the linux kernel where the setup_flag is set only
for control urbs

clean up various things related to this assertion:
remove type_2 parameter
show the iso descriptors in any case
calculate the end offset correctly, the end offset is the byte after the
iso data

Change-Id: Iebfbe6443c224a958a1697563aa8fb853d7aa8c2
Reviewed-on: https://code.wireshark.org/review/2541
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-24 03:11:56 +00:00
Joerg Mayer 0f76609237 Remove unneeded include <sys/stat.h>
Change-Id: I3be8f29d2b4fba2cb1d7ee2f29bdb27e42dd40a5
Reviewed-on: https://code.wireshark.org/review/2607
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-24 02:32:26 +00:00
Joerg Mayer 836feeb559 Remove unneeded sys/types.h
Change-Id: I03cd66cb9a2d01ea40308b338955756d08a36516
Reviewed-on: https://code.wireshark.org/review/2604
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-24 02:08:07 +00:00
Michael Mann 4976d67184 Restore correct tree assignment.
Change-Id: Id06bd486114a80fb899f8dc148d48928e99e775e
Reviewed-on: https://code.wireshark.org/review/2602
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-24 02:01:05 +00:00
Peter Wu e22d3c9b74 ssl: fix ClientKeyExchange, fix TLSv1.2 SKE for DH
Since DTLS and TLS do not differ in handling ClientKeyExchange and
ServerKeyExchange, its dissection got moved to ssl-utils. The code is
based on the SSL dissector, with header field names adjusted to the
DTLS ones (those got capitalized). Besides a version difference (for
signatures), the header field and function names, the DTLS and SSL code
are equal (this is verified).

This patch refactors the dissectors for DHE_RSA and ECDHE to make use of
a common function to dissect the signed_params field. All offset
tracking is also removed in favor of exception handling by the
proto_tree_add_item function. Occurrences of proto_tree_add_uint are
also replaced by proto_tree_add_item for simplicity.

After those changes, the SKE dissector for DH key exchanges is updated
to handle the mandatory signature field in TLSv1.2, using the newly
added function. (bug 9208)

Another bug occurred after the length check removal, pre-TLS and
OpenSSL's old DTLS implemenation do not include a vector length in
the CKE. This is now also fixed. (bug 10222)

Other minor changes: comments added/corrected, renamed
keyex_dh -> keyex_dhe (includes DHE_RSA and DHE_DSS).

Bug: 9208
Bug: 10222
Change-Id: I76e835d56a65c91facce46840d79c1c48ce8d5dd
Reviewed-on: https://code.wireshark.org/review/2542
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-23 23:31:40 +00:00
Joerg Mayer 8702a6b827 Remove some unneeded includes
Change-Id: I4327ead0451244daa0d876ae3a770cbbf80760c8
Reviewed-on: https://code.wireshark.org/review/2590
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-23 23:19:28 +00:00
Pascal Quantin dd7134d907 Initialize whole buffer in GPRS Mobility and Session Management dissector
Bug: 10216
Change-Id: I572a7a6ce0f816063f02397b667dd46c990cf73e
Reviewed-on: https://code.wireshark.org/review/2583
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-23 20:13:00 +00:00
Joerg Mayer 54cc0d86da Replace AF_ values by COMMON_AF_ values.
Remove no longer needed system includes

Change-Id: Id9ffffaa7da5185041db63fa7611d348a1cc4b68
Reviewed-on: https://code.wireshark.org/review/2577
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-23 16:48:26 +00:00
Evan Huus 02edc3369b Revert "Optimize sip_is_known_sip_header()"
This reverts commit c9a5fbeb1d.

Change-Id: Ic2e5d531f719ed1107ef7bb1de12175d4601fd6d
Reviewed-on: https://code.wireshark.org/review/2574
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-23 16:22:30 +00:00
Evan Huus 520190c77b Revert "Cheat and try to fix the generated file manually."
This reverts commit 9079e3ad1d.

Change-Id: I0430408e139ff8de068c970d02e36122552614fe
Reviewed-on: https://code.wireshark.org/review/2575
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-23 16:22:08 +00:00
AndersBroman 9079e3ad1d Cheat and try to fix the generated file manually.
Change-Id: Iabf1821aa0ef676ac4d1d7f2983460b2e671a98a
Reviewed-on: https://code.wireshark.org/review/2573
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-23 15:30:39 +00:00
Jakub Zawadzki c9a5fbeb1d Optimize sip_is_known_sip_header()
Profling SIP shows that gperf generated hashing code, is
3 times faster than using GHashTable & g_str_hash/_equal()

This result in about 1% improve of whole dissection (sip traffic with filter).

Change-Id: Id6bf64bacd872e2d1c30a1b6356db444b25ba326
Reviewed-on: https://code.wireshark.org/review/2116
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-23 14:42:20 +00:00
AndersBroman eaf6e551fe Fix a typo.
Change-Id: I6874a6f4a340c2b8e82d1ca5333cbeb31ff27f2d
Reviewed-on: https://code.wireshark.org/review/2570
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-23 08:24:49 +00:00
Jakub Zawadzki 6e0be0173b Add col_append_lstr(), speedup column generation for TCP.
When dissecting with columns TCP dissector spends
around 1/4 time in col_append_fstr(), add col_append_lstr()
and do formatting by ourselves.

Change-Id: If90bc26242761884b4991e8db0db62c8f9e32690
Reviewed-on: https://code.wireshark.org/review/2527
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-23 03:33:59 +00:00
Guy Harris ab6a45aec6 Get rid of set-but-not-used variable.
Change-Id: Ic0f2c79b4bd9fc737bf33ef64512f4142d74de6b
Reviewed-on: https://code.wireshark.org/review/2568
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 22:18:12 +00:00
Guy Harris 6896def6da Get rid of some unused variables.
Change-Id: I2a806af639e5f0519ba93b0048ec7a4624fa33fc
Reviewed-on: https://code.wireshark.org/review/2567
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 21:49:26 +00:00
Guy Harris 9c35a5d8fd Make dissect_lltd() a new-style dissector and register it as such.
Presumably that was the intent.

Change-Id: Icf8529a23a9a36e7f12e446d67f3867771b221d8
Reviewed-on: https://code.wireshark.org/review/2566
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 21:42:43 +00:00
Michael Mann 9356d5c689 convert to proto_tree_add_subtree[_format] for ASN.1 dissectors
Change-Id: I753ca95e2e1b38bad2c09955317e648c525e40ef
Reviewed-on: https://code.wireshark.org/review/2509
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:08:21 +00:00
Michael Mann 2c0214efff LLTD dissector
bug: 6071
Change-Id: If7b544a762df10ffc13aeaf8886cf74a1757c37c
Reviewed-on: https://code.wireshark.org/review/2512
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:07:43 +00:00
Michael Mann 188aa9a80e convert to proto_tree_add_subtree[_format]
Change-Id: Ib60ca75b7da8cfa21cfe2999c9b9448a02c332df
Reviewed-on: https://code.wireshark.org/review/2560
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:07:16 +00:00
Evan Huus 3fc441e7a5 Initialize whole buffer in GTP dissector
Bug:10216
Change-Id: Ib7de616d50937eb43b16daa4067ee0de9edc8ec7
Reviewed-on: https://code.wireshark.org/review/2562
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-22 20:54:28 +00:00
Evan Huus ce99d8a205 Fix leak in nbap init function
Change-Id: I9a70d4da936ad5fd847fc1ba0b29b7220030b977
Reviewed-on: https://code.wireshark.org/review/2558
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-22 20:23:52 +00:00
Evan Huus dfe7e71ec5 Fix a leak in the SCTP dissector
use wmem instead of glib

Change-Id: I326d2dd71b13ae45b4434c86fdacf9f3cec6c069
Reviewed-on: https://code.wireshark.org/review/2557
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-22 20:23:36 +00:00
Michal Labedzki 0a960872d7 Logcat: Set data-text-lines dissectors for log
Some binary logcat packets has more then one line, show them in
a convenient form.

Change-Id: I008aac6fe5589f2b10db51f7221853f9d79bbc7a
Reviewed-on: https://code.wireshark.org/review/2549
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-22 16:57:35 +00:00
Michal Labedzki 10fc6e2531 Bluetooth: A2DP: Fix fuzz failture
Fix invalid structure casting by using defaults values,
this also fix DecodeAs for A2DP.

Do the same for VDP.

Change-Id: I360787af648ed65205eb54732ab6d88f8532cf15
Reviewed-on: https://code.wireshark.org/review/2551
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-22 16:56:48 +00:00
Michal Labedzki 164af0050d Bluetooth: Complete sessions
Some interfaces support multiple Bluetooth adapters with events like
add/remove. We must support that to distinquish adapters streams
in case that new adapter has the same id that old one.

Next one is create session for "Connection Handle", so
next layer will now when it is connected and disconnected.
This is also used to distinguish streams.

Change-Id: I9e062c8e4cc9c033b75f1a596e8351a215169843
Reviewed-on: https://code.wireshark.org/review/2548
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-22 16:56:31 +00:00
Guy Harris 58bbfa5ee3 When setting entry_tree, set entry_item as well.
Hopefully, this will fix the warnings from the buildbot that entry_item
was used without being set.

Change-Id: Ibfd921bfbbad68cd8eafd1e3ad3d178cfca03d6e
Reviewed-on: https://code.wireshark.org/review/2547
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 16:42:05 +00:00
Michael Mann f5e2b4293d convert to proto_tree_add_subtree[_format]
Change-Id: I358bfaa4e5d40cd01b766f614f8bd0dbaf611dd0
Reviewed-on: https://code.wireshark.org/review/2508
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 14:34:17 +00:00
Martin Kaiser 08bd0128ed minor cleanups
Change-Id: Ieaa0fa5cdbe8dc8f50cf5b9ee432c786a8f9fc9a
Reviewed-on: https://code.wireshark.org/review/2540
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-22 04:11:04 +00:00
Martin Kaiser 4c740dc8f5 the tree that we use in the iso transfer function in is the urb_tree
Change-Id: Ia32c2f24df9392d1102fa1121ac93b1071bae7ca
Reviewed-on: https://code.wireshark.org/review/2538
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-22 03:53:00 +00:00
Martin Kaiser 6b90679284 no need to check the parent tree when we create the iso descriptor tree
Change-Id: I6cbc5047b8d58ecbe41bf5392d31dc0adc81d5d5
Reviewed-on: https://code.wireshark.org/review/2537
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-22 03:52:35 +00:00
Martin Kaiser 2b6ce23271 rename the ti variable
Change-Id: Iec3bdfcb3cb14e97045789aec1e11288357d379d
Reviewed-on: https://code.wireshark.org/review/2536
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-22 03:52:13 +00:00
Martin Kaiser 2aae7caa5d create the iso descriptor tree's title in a simpler way
Change-Id: I4e60295208c2ac35a452f5fb3dffd090cc151473
Reviewed-on: https://code.wireshark.org/review/2535
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-22 03:51:53 +00:00
Martin Kaiser dfa7337b3a create a new function that dissects the usb linux iso transfer
(just copied the existing code)

Change-Id: Ia6dd9be9b39c3c16408e22181225c18d56ac6016
Reviewed-on: https://code.wireshark.org/review/2534
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-22 03:51:26 +00:00
Anish Bhatt e02c66f157 Check constraints for OSPFv2 LSAs:
1 Router LSA: >= 24 bytes (>= 0 link descriptor(s) required)
2 Network LSA: >= 28 bytes (>= 1 router-ID(s) required)
3 Summary LSA: >= 28 bytes (>= 1 TOS metric block(s) required)
4 Summary LSA: >= 28 bytes (>= 1 TOS metric block(s) required)
5 AS-External LSA: >= 36 bytes (>= 1 TOS forwarding block(s) required)
7 NSSA LSA: >= 36 bytes (>= 1 TOS forwarding block(s) required)
9 Opaque Link LSA: >= 20 bytes
10 Opaque Area LSA: >= 20 bytes
11 Opaque AS LSA: >= 20 bytes

as described in Bug 6302

for all other types including unknown, check for minimum length of 20

Change-Id: I93451d99a93213b4ded8157cecd54b0a6221d351
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/2292
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-21 18:17:08 +00:00
Evan Huus 37b903d7ab batch of tvb-length conversions
Change-Id: I76ca4d075756e3ac691070e0c05344a410ea2498
Reviewed-on: https://code.wireshark.org/review/2507
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-21 04:01:52 +00:00
Pascal Quantin 6808afd017 TCP: update the list of options and put Kind and Length items in the right subtree
Bug: 10211
Change-Id: Ide37f2a2b33f0d6d7cdff897eed02a8c1ea24f7d
Reviewed-on: https://code.wireshark.org/review/2488
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-20 18:51:27 +00:00
Stig Bjørlykke 2ab2921c7d Revert part of svn revision 52045 (git b38ee917)
This fix does change the format printed for values using bitmasks
(because the bit values are printed first) and is not always wanted
in this dissectors (because of readability).

We should have a better way of doing what I want in this dissectors,
so I'll have a look at this later.

Change-Id: I2477aa6b1d0c42a7ad5848bba3cb74dce3bba1f0
Reviewed-on: https://code.wireshark.org/review/2485
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-06-20 17:04:49 +00:00
Guy Harris ce3d2ff3de Rename dissector_add_handle() to dissector_add_for_decode_as().
Hopefully that name makes it clear what the routiner's purpose is, and
will encourage people to use it rather than using dissector_add_uint()
with a bogus integer value.

Change-Id: Ic5be456d0ad40b176aab01712ab7b13aed5de2a8
Reviewed-on: https://code.wireshark.org/review/2483
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-20 16:43:56 +00:00
Martin Kaiser 4df6b51784 remove duplicate offset=0
Change-Id: I6653b733dfd2c587909371e50fd0c2efc4649dcd
Reviewed-on: https://code.wireshark.org/review/2482
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-20 16:22:58 +00:00
Martin Kaiser ffccb9c069 no need for if(tree)
Change-Id: I5762fb30f57d0f9bc3e5fc786577ed1cc49b64d7
Reviewed-on: https://code.wireshark.org/review/2481
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-20 16:22:52 +00:00
Evan Huus ee2885f9e8 add cast to fix buildbot
Change-Id: I945830a6dd9c34adf9802fa9e9948e2e90d8aba8
Reviewed-on: https://code.wireshark.org/review/2476
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-20 06:14:16 +00:00
Evan Huus 80c070fb51 Don't hide tcp option kind/len fields
Hidden fields are deprecated, and we were hiding them inconsistently anyways.

Bug:10211
Change-Id: Iaf1576ae7bc04c0c0bd896c096b117f1b8af2e9e
Reviewed-on: https://code.wireshark.org/review/2474
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-20 06:07:41 +00:00