Commit Graph

20979 Commits

Author SHA1 Message Date
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 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
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
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
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 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
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
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
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
Pascal Quantin 826bca0918 GTP: allow empty Data Record Packet IE
Bug: 10277
Change-Id: I4edf330fa1c44a52d985d70555c7756954fb9364
Reviewed-on: https://code.wireshark.org/review/3008
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-11 17:55:03 +00:00
Michael Mann aa0eb595a0 Restore some assignments of ti2 that were removed in the proto_tree_add_subtree[_format] conversion
bug:10270
Change-Id: I40062065add1c6a08bdabc9dcbbe53afaafca035
Reviewed-on: https://code.wireshark.org/review/2997
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-11 07:37:05 +00:00
Anish Bhatt bc8e095ec8 Update to fix for Bug 6302.
There is no need to check block constraints as min length already guarantees this, this also fixes false positives for missing TOS metric blocks

Change-Id: Icbe3067d2506fad1c7dbcb175d932a5f242fa5cd
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/2995
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-11 04:39:16 +00:00
Peter Wu 71ebdb67ad ssl: move CertificateRequest to ssl-utils
Except for field/expert_info names, a redundant subtree assignment,
a different !tree check, a type confusion in DTLS (proto_tree *ti),
a check against a different DTLS/TLS version and a (void) retval cast,
the functions are exactly the same. Extract them to ssl-utils.

Change-Id: I2ca7089fe2cd23212ef78656506cb53768f55927
Reviewed-on: https://code.wireshark.org/review/2986
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-11 04:36:51 +00:00
Peter Wu ba6d2e7cc8 ssl: move Certificate handshake dissection to ssl-utils
There are no dissection differences between DTLS and SSL, so move to
ssl-utils. While at it, skip dissection when the tree is NULL, remove
the plural from certificates length (the length is always larger than
ome), fix type of "ti" for dtls, get rid of "failsafe" subtree
assignment in ssl, get rid of tvb_ensure_bytes_exist in ssl.

Unrelated changes: fix param (tvb vs sub_tvb) for DTLS KeyExchange
handshake messages.

Change-Id: Iecaa45a7a601e55a52aa16180cf219a122fbe95a
Reviewed-on: https://code.wireshark.org/review/2985
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-11 04:35:40 +00:00
Peter Wu 7248c24afc ssl: add missing valid handshake types
The DTLS dissector duplicated a handshake types check, this has been
eliminated. Convert HandshakeType and ContentType to enums to get the
benefit of compiler-checked switch cases. Move these checks to
ssl-utils.

Two default cases could never be reached since the dissector returns
immediately on an invalid ContentType.

Also fixed misleading debugging messages.

Change-Id: I07a2062564e073004dcc0401cd82538e5659fa0c
Reviewed-on: https://code.wireshark.org/review/2978
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-11 04:32:15 +00:00
Bill Meier 9ed99d5c4e Strip some trailing whitespace; Fix some indentation; Add editor-modelines as needed.
Change-Id: I943153e28f468070d86535abad7be032e1386118
Reviewed-on: https://code.wireshark.org/review/2994
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-11 03:20:54 +00:00
AndersBroman 96f0585268 Quick fix to handle IEPS token.
Fix deorecated APIs

Change-Id: Iad1f970b553f1655109b36364a1d37676582f608
Reviewed-on: https://code.wireshark.org/review/2984
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-10 14:48:08 +00:00
Alexis La Goutte a7fb1e5c53 Fix Uninitialized argument value found by Clang Analyzer
Change-Id: I3cdb7734302b3e879def71dfa48c4654999ae9d2
Reviewed-on: https://code.wireshark.org/review/2983
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-10 13:34:03 +00:00
Peter Wu 1bf4efd850 ssl,dtls: convert from tvb_length
Every occurrence of tvb_length* has been converted to
tvb_reported_length* except some dtls lines.

Change-Id: I0faac315cdf5d17c0af18be177aacd076ff86cff
Reviewed-on: https://code.wireshark.org/review/2977
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-10 11:00:11 +00:00
Britt McKinley b2bf078d52 h264: Remove unneeded errata checks.
Some Microsoft errata were caused by bad decoding and were not actually
problems.  Remove the unneeded tests and expert information.
Add PRID ranges values to Layer Presence bytes.

Change-Id: I0b2b555bc448f0b4ee142b2920ae4e37d54ccab4
Reviewed-on: https://code.wireshark.org/review/2958
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-09 22:37:14 +00:00
Sean O. Stalley cdc1c16bb7 Print wIndex in decimal and hex
wIndex often contains different fields in it's upper & lower byte.
Printing in hex makes these seperate fields easier to read.

Change-Id: I69fb7e14b4f5b5a1ecd61bcae34f6d100f1a94b6
Reviewed-on: https://code.wireshark.org/review/2961
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-09 21:01:59 +00:00
Pascal Quantin 9f3c429929 MAC LTE: interpret RAR TPC command
Change-Id: I4e44124d5634e570917730084619e138a6e534af
Reviewed-on: https://code.wireshark.org/review/2963
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-09 18:04:57 +00:00
Pascal Quantin 4418986933 HDMI: remove useless include
Change-Id: Ia575fc8f3e80666a13dbc54220aa3931a1c505f0
Reviewed-on: https://code.wireshark.org/review/2962
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-09 18:03:14 +00:00
Graham Bloice 4b5967f683 Moved nghttp2 to epan
Cleaned up nghttp2 build

Change-Id: I9f7adc12936155e0ffc01ec825b5aff95279f97d
Reviewed-on: https://code.wireshark.org/review/2937
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
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-09 05:31:31 +00:00
Michael Mann 6691293a65 convert to proto_tree_add_subtree[_format]
Change-Id: I8d66b1bc7dbdfee3d4bf6fd3b3c21c6323b66f44
Reviewed-on: https://code.wireshark.org/review/2946
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-09 00:25:04 +00:00
Pascal Quantin cfee2019c6 LTE RRC: upgrade dissector to v11.8.0
Change-Id: I2bb0861029d0d30ae372b0b8085fbedeb4932217
Reviewed-on: https://code.wireshark.org/review/2949
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-08 22:06:46 +00:00
Yan Burman 17872b57e9 Fix setting PT_IBQP type
Without this patch, pinfo->ptype is PT_UNKNOWN

Change-Id: Ia15b5115f874d0c9ff69be11ed7ee3dac1fadbd5
Signed-off-by: Yan Burman <yanb@mellanox.com>
Reviewed-on: https://code.wireshark.org/review/2941
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 15:18:17 +00:00
Pascal Quantin ac52c06038 RRC: fix ASN.1 description by manually adding CR5591
Without it, dual-band DF-3C feature does not work

Change-Id: I95d4a7320b77c6093f5d51efdbb2b21af0deab11
Reviewed-on: https://code.wireshark.org/review/2942
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-08 15:17:17 +00:00
Alexis La Goutte b0a7251f38 Fix Uninitialized argument value found by Clang Analyzer
Change-Id: Ia39d7b258a888c188ae7d87c3c907e2a0ad1d3f0
Reviewed-on: https://code.wireshark.org/review/2936
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 10:39:20 +00:00
Alexis La Goutte 4e478aac67 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I369c4620f47f92bf66722fa79582502c0897a316
Reviewed-on: https://code.wireshark.org/review/2935
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 10:38:28 +00:00
Alexis La Goutte 033249ec62 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Idc6e9cf8f7f4b8e18a50723acbe5dee4c8cb786c
Reviewed-on: https://code.wireshark.org/review/2934
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 10:36:55 +00:00
Pascal Quantin 55ce1bc6a6 Upgrade LPP dissector to v11.5.0
Change-Id: I8c51cebec5b234b9d0667aaf3f70b0a48bb842f6
Reviewed-on: https://code.wireshark.org/review/2933
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 06:30:33 +00:00
Tatsuhiro Tsujikawa a6fc598aa7 Enhance HTTP/2 HPACK header decompression handling
Previously we just call HPACK decompressor when dessecting packets.
This is fine for the first linear scan.  But later same packet may be
dissected more than once and their header block data will be fed into
decompressor again.  This makes header compression context out-of-sync
because HPACK decompressor only works when data is fed linearly.  This
change fixes this issue by caching decompressed headers in the first
linear scan.  On random packet dissecting, they are just looked up.
This change adds support of changing header table size by inspecting
SETTINGS frame and tracking its SETTINGS ACK.

Change-Id: I9c75c67f8677063e443f9b131740f3ee94ff8a63
Reviewed-on: https://code.wireshark.org/review/2616
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 06:23:21 +00:00
Tatsuhiro Tsujikawa 36c393321e Dissect HTTP/2 draft-13
Summary of changes since draft-12:

* Pad High and Pad Low wereare replaced with single Pad Length field.
* Padding was removed from CONTINUATION frame.
* ALTSVC and BLOCKED frames were removed.
* Per-frame compression and its associated SETTINGS flag were removed.
* HPACK Huffman code table and static header table were updated.

Change-Id: I9c4f05f8cd937bfadbb1b912f2b9ffb31e9c18d5
Reviewed-on: https://code.wireshark.org/review/2615
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 06:18:29 +00:00
Peter Wu 46b3dda046 iscsi: automatically detect data segment digest
Modelled after ccf7ed00b6 which detects
the header digest field, this patch adds auto-detection for the Data
Digest field which comes after the data segment.

Since the digest is now automatically detected, drop the three related
preferences.

Verified against scsi-osd-example-001.pcap (from SampleCaptures).

Change-Id: Icd89f1be58889c7ab70aca9dff7d3f99c8fe04d6
Reviewed-on: https://code.wireshark.org/review/2882
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 06:15:45 +00:00
Peter Wu 9b4f16a204 gsmtap: do not abort if dissector is unavailable
Encountered with the following attachments from bugs:
6575-test-dlmapc-wmx
6577-test-dlmapc-wmx
6579-test-dlmapc-wmx

Also added modelines.

Change-Id: I3859bed618830ad359bd0b2b1fdfc3c5fc13269e
Reviewed-on: https://code.wireshark.org/review/2920
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-08 03:45:31 +00:00
AndersBroman 1ff6213c94 Try to fix cast discards '__attribute__((const))' qualifier from pointer
target type

Change-Id: If7efc629247480fbfb231b965a358803b67e1504
Reviewed-on: https://code.wireshark.org/review/2919
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-07 15:16:54 +00:00
AndersBroman 4ac9895884 See if yhis fixes "cast discards '__attribute__((const))' qualifier from
pointer target type"

Change-Id: I0f97b119f1e6151622d360464f12ad399cbaf117
Reviewed-on: https://code.wireshark.org/review/2917
Tested-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-07 14:34:27 +00:00
Martin Mathieson 7801a97fd8 Trying to create and use an empty tvb now throws an exception. Just pass current tvb to mac-lte dissector.
Change-Id: I4aa24342192ec079254f26e00317470377c3e20b
Reviewed-on: https://code.wireshark.org/review/2916
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-07-07 10:42:14 +00:00
Alexis La Goutte 3c638d8bf8 Fix Branch condition evaluates to a garbage value found by Clang Analyzer
Change-Id: I2cb4fb8064c80ee7985c3908820f09f5fa7e37fb
Reviewed-on: https://code.wireshark.org/review/2913
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-07 10:25:20 +00:00
Guy Harris 593878299d Don't cast away constness if not necessary.
Change-Id: I5f6ecd246e358edc3a2f4963c201b2435e4a1a42
Reviewed-on: https://code.wireshark.org/review/2910
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-07 04:46:45 +00:00
Guy Harris eea2e15638 G_GNUC_FORMAT encapsulates __attribute((format_arg(...))).
Change-Id: I9513c187ae4ce8b8cf8f6a926072b215e26ec64f
Reviewed-on: https://code.wireshark.org/review/2907
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-07 04:29:41 +00:00
Peter Wu aa4066dccf skinny: fix retval, convert from tvb_length
New dissectors return an integer, not a boolean, fix that.

Change-Id: I79dea0cc4274d503d61ce8823dc783c542764f6b
Reviewed-on: https://code.wireshark.org/review/2884
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-07 01:46:59 +00:00
Guy Harris 0a2f6fc01a Squelch some compiler warnings.
Change-Id: I768bf577b3871171ab33f080c5a0099ac06718ce
Reviewed-on: https://code.wireshark.org/review/2906
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-07 00:11:59 +00:00
Michael Mann 4d58904a09 convert to proto_tree_add_subtree[_format]
Change-Id: Ie10ac4f5f04a23344d183e095bbafb23c6409144
Reviewed-on: https://code.wireshark.org/review/2904
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-07 00:03:35 +00:00
Guy Harris 79fcc6a1a3 Squelch some compiler warnings.
Change-Id: Ie39c7b0c1fef8f862cec016a3a1a5bd1451a3df2
Reviewed-on: https://code.wireshark.org/review/2905
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06 23:49:04 +00:00
Peter Wu f2b4daf400 Add printf-format annotations, fix garbage
The WRETH dissector showed up some garbage in the column display. Upon
further inspection, it turns out that the format string had a trailing
percent sign which caused (unsigned)-1 to be returned by
g_printf_string_upper_bound (in emem_strdup_vprintf). Then ep_alloc is
called with (unsigned)-1 + 1 = 0 memory, no wonder that garbage shows
up. ASAN could not even catch this error because EP is in charge of
this.

So, start adding G_GNUC_PRINTF annotations in each header that uses
the "fmt" or "format" paramters (grepped + awk). This revealed some
other errors. The NCP2222 dissector was missing a format string (not
a security vuln though).

Many dissectors used val_to_str with a constant (but empty) string,
these have been replaced by val_to_str_const. ASN.1 dissectors
were regenerated for this.

Minor: the mate plugin used "%X" instead of "%p" for a pointer type.

The ncp2222 dissector and wimax plugin gained modelines.

Change-Id: I7f3f6a3136116f9b251719830a39a7b21646f622
Reviewed-on: https://code.wireshark.org/review/2881
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 23:00:40 +00:00
Peter Wu 49bc1047be whois,finger: fix retval, convert from tvb_length
Fixes dissector bug:
failed assertion "save_desegment_offset == pinfo->desegment_offset &&
save_desegment_len == pinfo->desegment_len"

Change-Id: Ia475bea3726252530189a05ba4dbf69f3c2b7e6c
Reviewed-on: https://code.wireshark.org/review/2886
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 22:05:26 +00:00
Guy Harris 5bfc21cf9e Clean up handling of missing functions.
With autotools, CMake, and nmake, if we have a function, #define
HAVE_{function_name_in_all_caps}, otherwise don't #define it.

If we provide our own version of a function in libwsutil, make sure we
have a header that declares it, and *ONLY* include that header if
HAVE_{function_name_in_all_caps} is *NOT* defined, so that we don't have
the system declaration and our declaration colliding.

Check for inet_aton, strncasecmp, and strptime with CMake, just as we do
with autotools.

Simplify the addition of {function_name_in_all_caps}_LO to libwsutil in
autotools.

Change-Id: Id5be5c73f79f81919a3a865324e400eca7b88889
Reviewed-on: https://code.wireshark.org/review/2903
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06 21:03:09 +00:00
Pascal Quantin e649420686 H264: mark a parameter as unused
Change-Id: I564a0fefc263d909c9e478b64c5a816756d97377
Reviewed-on: https://code.wireshark.org/review/2902
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-06 19:44:01 +00:00
Britt McKinley 4e9802e679 H264: Add support of packetization modes, SVC, MS-H264
Add support for Prefix, STAP, MTAP, NI-MTAP, and PACSI packet types.
Add support for Microsoft SEI messages [MS-H264PF]
Add support for dissecting scalable profiles
SDP: Add profile-level-id decode for payload type H264-SVC
MS-H264PF: http://msdn.microsoft.com/en-us/library/hh659565.aspx
Update #1 - Fix Tabs -> Spaces, Reinsert accidentally removed entry 19
from h264_type_values
Update #2 - Changed to using expert info for exceptions and Microsoft
errata.
Update #3:
  - Correct handling of truncated packets
  - Use guid functions and compare techniques
  - Correct ranges for expert info messages
  - Change to using reported_length from captured_length

Change-Id: I520a3c9a6d85c78a976b520cf5a6a405064a48f1
Reviewed-on: https://code.wireshark.org/review/2580
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-06 19:11:24 +00:00
Alexis La Goutte c35b82c8f1 RTCP: Make checkhf happy
Change-Id: I5cdeb4a96bc9c4e11161836457a8689c904e13d4
Reviewed-on: https://code.wireshark.org/review/2899
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 18:32:17 +00:00
Alexis La Goutte 550f611162 RTCP: fix typo (double semicolon)
Change-Id: Id1997c3c8f6d0460da7f0faa58798a72737dd667
Reviewed-on: https://code.wireshark.org/review/2898
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-06 18:30:26 +00:00
Alexis La Goutte 841b1d652c Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I5744a1c1efc65f9a7b3addf17c071b470fd2cced
Reviewed-on: https://code.wireshark.org/review/2896
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 18:30:06 +00:00
Alexis La Goutte 84189ded75 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I82efd1c5f4280de2eec3dbe7bd1995fcd9a3174f
Reviewed-on: https://code.wireshark.org/review/2895
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 18:28:23 +00:00
Michael Mann c71e88e4a9 convert to proto_tree_add_subtree[_format]
Change-Id: I3efa2a81ab2685cde6eae0a00b24520478a545ce
Reviewed-on: https://code.wireshark.org/review/2900
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-06 18:26:48 +00:00
Evan Huus be4d42c6ab Widen openflow variables and check for underflows
As suggested by Alexis reviewing change Ie76c5a810af927b, this issue was
scattered throughout the v4/v5 openflow dissectors. Hopefully I got all of them.
Original issue found in bug 10259.

Change-Id: Idf87deea34132aec5cd4e8f83264906a29b15568
Reviewed-on: https://code.wireshark.org/review/2878
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-06 16:53:39 +00:00
Peter Wu 5886e45179 iscsi: minor retval fix
The return value of new dissectors is the number of bytes that were
successfully dissected, not a boolean. Fix that and get rid of an
unnecessary iSCSIPdusDissected variable.

Change-Id: Ie31df393a1eb44f185d320a4c2d35f5e8b7d7bd9
Reviewed-on: https://code.wireshark.org/review/2889
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 15:51:45 +00:00
Peter Wu d828b15a82 kismet: fix retval, add modelines
new dissectors return an int, not a boolean...

Change-Id: I88e19f7c0dc14da3649d1522ffe936538a867753
Reviewed-on: https://code.wireshark.org/review/2888
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 15:47:51 +00:00
Peter Wu 2eae8bb0c3 mikey: do not request more data on proto violation
Return value "-1" means that more data is requested. The dissector
actually doesn't have any idea what to do with the data, so just return
the data dissected so far.

tcp stream 3182 from c05-http-reply-r1.pcap (SampleCaptures) was
incorrectly detected as MIKEY, it was actually HTTP...

Change-Id: Idca3d3e2f85e821df70436a675699b5834236f89
Reviewed-on: https://code.wireshark.org/review/2887
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 15:45:33 +00:00
Peter Wu b54731dc7d ms-mms: fix retval for short pkts, fix reading flags
uint16 & 0xFF00 will always equal 0. Use tvb_get_guint8 instead. Convert
from tvb_length to tvb_captured_length.

Fix the return value of dissectors, 0 means reject but that cannot be
combined with reassembly requests.

Change-Id: I5fca66e2e809699392237aff5813eecdfb15857f
Reviewed-on: https://code.wireshark.org/review/2885
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 15:42:58 +00:00
Evan Huus 4afd70d4e4 Use g_hash_table_new_full to free some values
Fixes a good 80-90KB of leaks in certain cases.

Bug: 10261
Change-Id: I81d57ac67219e730b03649b9fdfc2306807bdb97
Reviewed-on: https://code.wireshark.org/review/2879
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 14:27:27 +00:00
Michael Mann 6318a29fa3 convert to proto_tree_add_subtree[_format]
Change-Id: Ia2567695ffed30c990eda3740b08bfab101cea96
Reviewed-on: https://code.wireshark.org/review/2883
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-06 14:21:15 +00:00
Guy Harris db530d886d Squelch casting-away-constness warnings.
The pStr argument to dissect_mq_charv() isn't modified (and always
points to a character string), so make it a "const char *", and
eliminate the casts to "guint8 *" in calls to it.

Change-Id: I21dad38c41324528be297a8ddc1854beff2276db
Reviewed-on: https://code.wireshark.org/review/2877
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06 11:25:41 +00:00
Роман Донченко afa8f21f56 make-dissectors-reg: optimize by factoring out the loops
Instead of calling the grep/sed pipelines for each file, build the
list of files in the beginning and call each pipeline only once,
passing the list to the first grep.

This results in a massive speedup in Cygwin; in my test, the time
it takes to run make-dissector-reg . dissectors packet-*.c in dissectors/epan
is reduced from ~116 to ~3 seconds. I also tried it on NetBSD, where
the time do to the same goes from ~6 to ~0.5 seconds.

Amend makefile comments to elide mentions of invoking multiple processes
per file.

Change-Id: Iad441e7d2b6cc3669dada57646e2f8f6b987fd34
Reviewed-on: https://code.wireshark.org/review/2826
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 08:08:20 +00:00
Michael Mann 3490bc6eb9 Change display filters to prefix with ipmi.trace
Change-Id: I7b4476cb0a06362941ef81707a9686f5546a4a54
Reviewed-on: https://code.wireshark.org/review/2868
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 08:03:29 +00:00
Michael Mann 0335ae339d convert to proto_tree_add_subtree[_format]
Change-Id: I66f0bffb987568c3d4c14a06bdc90465c877b27f
Reviewed-on: https://code.wireshark.org/review/2867
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-05 23:08:19 +00:00
Peter Wu 286c191846 9p: fix version detection, fix dissect_9P retval
Fix version detection (detect against full string instead of prefix),
properly dissect Tcreate extension field (9p2000.u only), dissect
Tunlinkat flags (9p2000.L).

Refactor pattern to dissect string[s] types for DRY.

Convert to use tcp_dissect_pdus. I have not seen a fragmented case, but
maybe that may happen in the future.

The main motivation for touching 9p was that it returns bogus values
for some types. This has been fixed by properly increasing offset, and
always return the captured length.

Change-Id: If2184204ae9c853b94aca8ade3763d7fe523fa86
Reviewed-on: https://code.wireshark.org/review/2836
Reviewed-by: Christopher Maynard <Christopher.Maynard@gtech.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-05 22:04:54 +00:00
Michael Mann fc63343a4e convert to proto_tree_add_subtree[_format]
Change-Id: I8df48b25de784a48a25f0e48aac1e1545ed92c35
Reviewed-on: https://code.wireshark.org/review/2865
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-05 20:36:36 +00:00
Evan Huus c92bf7e44b Expand a variable from 16 to 32 bits (and make it signed).
Fixes an overflow leading to infinite loop.

Bug: 10259
Change-Id: Ie76c5a810af927ba092f4067268bd789b3a7d7bf
Reviewed-on: https://code.wireshark.org/review/2856
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-04 21:53:08 +00:00
Pascal Quantin e398c8ed6b ETSI CAT: upgrade dissector to Release 12
Change-Id: Id1988551ca94a862195eb1de1de399e428132b21
Reviewed-on: https://code.wireshark.org/review/2855
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-04 19:38:41 +00:00
Michael Mann c7a6e6fa13 convert to proto_tree_add_subtree[_format]
Change-Id: I621f2e2cad9403449cb78f45302388f0c874d3bc
Reviewed-on: https://code.wireshark.org/review/2852
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-04 16:59:14 +00:00
Michael Mann 93517043e9 convert to proto_tree_add_subtree[_format]
Change-Id: Idd1b20ab32c0960ea52c6f3bc5346462c37c5684
Reviewed-on: https://code.wireshark.org/review/2853
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-04 16:46:14 +00:00
AndersBroman dd424c6225 Handle the case where the previous PDU has left an extra CRLF in the stream.RFC 2626 In the interest of robustness, servers SHOULD ignore any empty line(s) received where a Request-Line is expected. In other words, if the server is reading the protocol stream at the beginning of a message and receives a CRLF first, it should ignore the CRLF.
Change-Id: I97ba94f451463c8facd2c20bf6b7364f095119e7
Reviewed-on: https://code.wireshark.org/review/2808
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-04 14:00:50 +00:00
Evan Huus 7e970c32f4 wmemify some nfs functions, fixing much leaked memory
Bug: 10257
Change-Id: Ia36c03b2be727a37f91eca38af4faf48d1d65436
Reviewed-on: https://code.wireshark.org/review/2840
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-04 07:59:04 +00:00
Evan Huus 7464415049 Fix infinite loop in RTCP dissector
Bug: 10248
Change-Id: I630bc1ab2520c2861b817ba5813f5f7680e96056
Reviewed-on: https://code.wireshark.org/review/2820
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-04 02:21:48 +00:00
Sean O. Stalley bbb3e2f7af Add Bus ID to USB Address Column
USB Addresses are now in the format of: bus_id.device_address.endpoint
This makes it much easier to read traces that captured traffic on
more than one bus.

Change-Id: I264db2ceea712d94632d5d08d05d3af22a4a03fe
Reviewed-on: https://code.wireshark.org/review/2833
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-04 02:20:38 +00:00
Sean O. Stalley 212df87e7f (trivial) moved 'is request' comment in dissect_usb_common()
Change-Id: I759f64920284a35ea55bc68624570def51dfd72a
Reviewed-on: https://code.wireshark.org/review/2832
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-04 02:18:17 +00:00
Bill Meier 4e74546e76 packet-vnc.c: Fix a bug in displaying a set of FT_BOOLEAN bit fields (found by checkAPIs).
Change-Id: Ie5252d20db5826f3e48aba11da1bf85d00630db2
Reviewed-on: https://code.wireshark.org/review/2838
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-03 23:34:06 +00:00
Bill Meier 3e325b1448 packet-vnc.c: Restore tvb_get_string() --> tvb_get_string_enc() changes lost in gdf6bdcc
These changes were originally done in g971ffd6

Change-Id: I9de28ba7089f99e8058207f3b6d34de931decf76
Reviewed-on: https://code.wireshark.org/review/2835
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-03 22:26:27 +00:00
Bill Meier df6bdcc07d packet-vnc.c: Improve dissection
- Properly dissect multiple VNC PDUs in one (or more) TCP segment(s).
- Dissect additional message types ('Fence' and 'Enable Continuous Updates').
- Handle "num_rects" field = 0xFFFF (TightVNC).
- Add some more info as to sources of information about the VNC protocol.
- Add an XXX note as to the (incorrect) reassembly method being used.
- Add some notes as to possible ToDo's.

Change-Id: Id4942c50b3d1373bd2e72c0131614835dc39ba90
Reviewed-on: https://code.wireshark.org/review/2834
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-03 21:51:17 +00:00
Yan Burman 6ed95406e3 Fix type-o left over from cut-and-paste
Change-Id: I80b24cd8b75999454c1767bd3044ecc569f57d98
Signed-off-by: Yan Burman <yanb@mellanox.com>
Reviewed-on: https://code.wireshark.org/review/2805
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 12:22:59 +00:00
AndersBroman f0ed0e69fa Get rid of soft-deprecated API:s
Change-Id: Ieb4a3f07a7831c141ba8ce9c075e72091ef909be
Reviewed-on: https://code.wireshark.org/review/2798
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 09:04:33 +00:00
Evan Huus d70e56a733 Revert to 3ms if we don't have the handshake
Change-Id: I96b23677f3050e9c62edd49f26d50d8b4addcf58
Reviewed-on: https://code.wireshark.org/review/2784
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 07:32:11 +00:00
Pascal Quantin 2dbab6df18 GTP: add dissection of Extended End User Address
Bug: 10251
Change-Id: I174b5a2b3e2ec8ff2ead9f290b452ee468f6fe66
Reviewed-on: https://code.wireshark.org/review/2783
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 07:30:20 +00:00
Michael Mann 980893a15a NDPS dissector is the poster child for proto_tree_add_subtree[_format].
NDPS dissector is also the poster child for not being considered "that naughty" by checkAPIs because most of its proto_tree_add_text calls don't have printf-style arguments (which is what checkAPIs really keys off of)

Fixed both cases and removed about 370 proto_tree_add_text calls from the dissector.

Change-Id: I721678c39d4a0544e5e7212e622c0c2eebfd04f7
Reviewed-on: https://code.wireshark.org/review/2775
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-02 17:35:52 +00:00
Evan Huus a3bac6d0ce kafka: fully dissect offset request/response messages
Change-Id: I641a3dbece6f822144f6740dde6801b1be202db5
Reviewed-on: https://code.wireshark.org/review/2777
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-02 17:29:55 +00:00
Evan Huus 956c440786 RSVP checksum is not required if integrity object is present
Bug: 10219
Change-Id: I2da62ee184327b2bc42a264e1782db927460f5cf
Reviewed-on: https://code.wireshark.org/review/2773
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-02 06:31:58 +00:00
Jakub Zawadzki af7528999f Optimize sip dissector: avoid calling tvb_get_string_enc()
Fetch header value, only when we need to parse it.

Change-Id: I3c170ef8ab03985c8111a1b84ac1afc87bc8b5ca
Reviewed-on: https://code.wireshark.org/review/2767
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-02 06:07:44 +00:00
Malcolm Walters 2a306f4b05 Fix for Bug 10240.
Include padding length in calculation of correct attribute length

Change-Id: I569c6a9e1be39e3bb997e797a094b80cdcba6b07
Reviewed-on: https://code.wireshark.org/review/2747
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-01 20:49:30 +00:00
Jakub Zawadzki 852d5dac9c Remove executable bit, from not executable files.
Change-Id: I36b303b9c2bf4d6bb717261cdbf39ea16532fe06
Reviewed-on: https://code.wireshark.org/review/2757
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-01 20:37:09 +00:00
Graham Bloice bd79dae438 Remove debugging info from protocol tree for frame
Change-Id: Id7f02087e536964bfa6d01a3646c20035a3ab6cb
Reviewed-on: https://code.wireshark.org/review/2746
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-07-01 12:44:31 +00:00
Evan Huus a452d16f2c Optimize epan_new/init_dissection
As Anders correctly pointed out in I7d8f84b2e, constantly resetting state will
turn init_dissection into a bit of a hot path. Especially as we will already
bear the overhead of switching files, we don't want to fall any further behind
than we have to.

This change includes three unrelated optimizations that reduce the cost of
init_dissection by about 40% as measured by callgrind:
 - only initialize ares/ADNS if that preference is enabled (this of course only
   applies if you specify -n to tshark or otherwise disable the preference)
 - use memcpy instead of a loop in sigcomp UDVM init
 - use memcpy instead of a loop in bootp dissector

The only remaining obvious hot spot in this path is reassembly_table_init since
it is called by so many dissectors. Suggestions (perhaps to get rid of the
GPtrArray) welcome.

Oh, and one other change to use g_strerror instead of strerror as insisted
upon by the API pre-commit hook.

Change-Id: I18a74f2b64b25498116079bd4e7fc2b335c7703a
Reviewed-on: https://code.wireshark.org/review/2738
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-01 04:21:14 +00:00
Jakub Zawadzki 659d0efc92 sip optimization: avoid calling tvb_get_guint8.
Use tvb_pbrk_guint8, tvb_find_guint8 when possible.

Change-Id: If8090d9b9b92146e9c216f139c056130d6b04e78
Reviewed-on: https://code.wireshark.org/review/2569
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-01 04:15:02 +00:00
Balint Reczey 4e9e043a6a Init session id to avoid warning using GCC 4.9
Change-Id: I2091f7eb86c64fd086f44a7cf15e7c5483f9b44c
Reviewed-on: https://code.wireshark.org/review/2716
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-01 02:05:41 +00:00
Evan Huus f1ff6635a8 Warn about unencrypted HTTP traffic over port 443
At the suggestion of Toralf Förster. This includes an expert info, as well as
making SSL a new-style dissector and rejecting traffic that looks like
unencrypted text.

Change-Id: Ib09ea0d97952330f092590ff3fc6488807cdbb81
Reviewed-on: https://code.wireshark.org/review/2693
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-30 21:10:11 +00:00
AndersBroman 073bf490aa From Johan Whahl:
Added dissection of the SIP Service-Route header.

Change-Id: Ic4523edb374ae03492af5853863dde501a0c30e0
Reviewed-on: https://code.wireshark.org/review/2721
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-30 14:38:46 +00:00
AndersBroman 9387979e91 Fix the display of AVP:s that are not fully dissected
fixes Bug #10237

Change-Id: I3c38bb4af4440f1e5087f21ef022bf2cd3a66002
Reviewed-on: https://code.wireshark.org/review/2720
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-30 14:14:14 +00:00
Michal Labedzki 3b15891115 Bluetooth: Add missing connection_handle
This initialize previously uninitialized variable (and nice fixing everything)

Change-Id: I943102510fc45735f40db7899884d2c0fe6ffb40
Reviewed-on: https://code.wireshark.org/review/2717
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-30 13:24:20 +00:00
Michael Mann dd63ae2b8c proto_tree_add_subtree[_format]
Change-Id: Id00f456479415adf0a219af6c9a2108d4b3642d0
Reviewed-on: https://code.wireshark.org/review/2702
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 21:18:04 +00:00
Pascal Quantin e39e44df24 GSM MAP: ensure that p2p_dir is always initialized before calling GSM SMS dissector
Bug: 10234
Change-Id: Ie340b849015febe46f91836440d44d4cfde005a4
Reviewed-on: https://code.wireshark.org/review/2695
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-29 17:56:35 +00:00
Gerald Combs f174370ddb [Automatic manuf, services and enterprise-numbers update for 2014-06-29]
Change-Id: Ife61b2e2c53f1faba34940035ac84a2b5ced3b71
Reviewed-on: https://code.wireshark.org/review/2696
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-06-29 15:04:56 +00:00
Michael Mann e8a8d62dc3 proto_tree_add_subtree[_format]
Change-Id: I7e016f10fcfdc0523bf2fe8c11295c0334f7c332
Reviewed-on: https://code.wireshark.org/review/2694
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 14:52:33 +00:00
Michael Mann fe4b7ee625 convert to proto_tree_add_subtree[_format]
Change-Id: If110de1e0555637264f86f1508858d569871a9c7
Reviewed-on: https://code.wireshark.org/review/2675
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 13:10:02 +00:00
David Ameiss e1a8c9599f Standardize the names of, and document, the taps and heuristic dissector tables made avaialble by these dissectors.
Change-Id: If3a143eb9546c9de63cd32b2347000b09e0e3c93
Reviewed-on: https://code.wireshark.org/review/2688
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 00:03:35 +00:00
Graham Bloice 5b9ceae3e5 Remove unused variables post commit 7bf6862ecf
Change-Id: Id583ab1742241deb9325dcb1dbba8a8cb3df3b90
Reviewed-on: https://code.wireshark.org/review/2691
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-06-28 17:41:10 +00:00
Michael Mann 7bf6862ecf convert to proto_tree_add_subtree[_format]
Change-Id: Ia7014003a3cff5181295172978d6c613c3b83b0b
Reviewed-on: https://code.wireshark.org/review/2676
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-28 12:05:43 +00:00
Guy Harris efc0a00520 We're not currently using dissect_rtcp_psfb_remb(); #if 0 it out.
Also, note that we need to determine how to handle Application Layer
Feedback messages based on the SDP setup traffic for the session; recent
changes disabled dissection of REMB Application Layer Feedback messages
in favor of MS-RTP Application Layer Feedback messages.  (This is why we
shouldn't remove dissect_rtcp_psfb_remb() unless REMB isn't being used
any more.)

Change-Id: Ib320bdf4a64263fdef29fc4ea2583eaae1cc4bee
Reviewed-on: https://code.wireshark.org/review/2684
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-27 07:41:21 +00:00
AndersBroman f0d291be28 In function 'dissect_rtcp_psfb':
packet-rtcp.c:1232: warning: unused parameter 'top_item'

Change-Id: I76522a9c6094473ce0eeeb7cc929a66e6da21909
Reviewed-on: https://code.wireshark.org/review/2683
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-27 04:24:49 +00:00
Britt McKinley f36db97506 RTCP: Add support for MS-RTP
Support for Profile Specific Extensions from MS-RTP
Support for RTCP Feedback Messages
Support for Application Layer Feedback Messages. 
MS-RTP: Real-time Transport Protocol (RTP) Extensions
http://msdn.microsoft.com/en-us/library/office/cc431492.aspx

Change-Id: I1f1e6e60b5f9d09b1dffd7e308426c0b67914441
Reviewed-on: https://code.wireshark.org/review/2586
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-27 03:52:11 +00:00
Evan Huus a87e292272 Tighten the dump-glossary test.
1. The only indication we get of an out-of-order value string is a message on
 STDERR, so check that and fail the test if STDERR wasn't empty.

 2. This exposes an out-of-order value string in packet-stun.c; fix it.

 3. This triggered the pre-commit hook on packet-stun.c, which noticed an API
 error (ENC_ASCII -> ENC_ASCII|ENC_NA); fix that too.

Change-Id: I36f87a2a87b40537119562f22a7e3012716ff239
Lesson: automated testing/tooling is both wonderful and scary.
Reviewed-on: https://code.wireshark.org/review/2682
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-27 03:47:32 +00:00
Martin Kaiser 1560b678ee show an expert info if a non-control urb contains a setup packet
Change-Id: I9339869defa47a862b6174d8821cdd8e6186f5c5
Reviewed-on: https://code.wireshark.org/review/2678
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-27 03:22:00 +00:00
Martin Kaiser 06ba7b4b3f a USB urb of an unknown transfer type does not contain a setup packet
Change-Id: Iac6a259a1081b907149c49023614a5053440e560
Reviewed-on: https://code.wireshark.org/review/2677
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-27 03:21:38 +00:00
Evan Huus c9b03b424f add a cast, the mask makes it safe (stupid compiler)
Change-Id: Iaf24c62295a93a1abd4fe3daf7e4c9587c3ef76b
Reviewed-on: https://code.wireshark.org/review/2670
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-26 15:38:11 +00:00
Yan Burman 1f724bc891 iSER: Add iSER dissector support
Bug: 10189
Change-Id: Ie99d99a1736b3c6446d5a00edf201a49dfcd4780
Reviewed-on: https://code.wireshark.org/review/2247
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-26 15:26:18 +00:00
Michael Mann a09de615b4 Fix Function call argument is an uninitialized value
Change-Id: I716e80e53477edd419164c61937800795a550869
Reviewed-on: https://code.wireshark.org/review/2651
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-26 14:07:31 +00:00
Pascal Quantin 7c1b5e9b7e Fix several compilation warnings
Followup of gf798709

Change-Id: I0afddfe2e9b9ac454377f2358a29b4ecdd011b91
Reviewed-on: https://code.wireshark.org/review/2668
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-26 13:08:59 +00:00
Michael Mann f7987091ba convert to proto_tree_add_subtree[_format]
Change-Id: I525ac2aae2bdbfd5f3a2f3b35f1bf10dde053f66
Reviewed-on: https://code.wireshark.org/review/2667
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-26 11:41:10 +00:00
Britt McKinley 732656c6f3 STUN: Add support of MS-ICE2 (Used by Lync)
Interactive Connectivity Establishment ICE Extensions 2.0
http://msdn.microsoft.com/en-us/library/office/cc431504.aspx

Change from review:
1) Change encoding for foundation to ASCII
2) Move case for MS_IMPLEMENTATION_VER.

Change-Id: Ic524a2fe811695478aba81af9cbb3dbd031bbce3
Reviewed-on: https://code.wireshark.org/review/2579
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-26 05:15:00 +00:00
Alexis La Goutte 06cf499eaf Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Icec39c64d952ccc9739df95135ed79b3196a427a
Reviewed-on: https://code.wireshark.org/review/2652
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-06-26 02:43:12 +00:00
Pascal Quantin fd5b0777bb DLSw: better fix, as suggested by Evan
Change-Id: I82556c40cc4f0618e9e1c927beafa19ea4659683
Reviewed-on: https://code.wireshark.org/review/2650
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-25 18:53:56 +00:00
Pascal Quantin a8652ea529 DLSw: ett2 proto_item variable is an input parameter for dissect_dlsw_capex()
Regression introduced in g888f22d

Change-Id: I6ae451ef31b188540db4e4687c9fa492e8aa195e
Reviewed-on: https://code.wireshark.org/review/2649
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-25 17:58:31 +00:00
Peter Wu 4224e353f9 ssl-utils: add missing ett registration
Fixes the dissector bug warning:
"epan/proto.c:4657: failed assertion "idx >= 0 && idx < num_tree_types"

Add some comments to avoid future mistakes, add folding markers and fix
alignment of curves hf.

Change-Id: Ibcb57bfeb09a9777324682704a86f1ce260d345e
Reviewed-on: https://code.wireshark.org/review/2642
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-25 17:16:26 +00:00
Pascal Quantin 13a972bac4 DTPT: remove unused variables
Change-Id: I9c8e26af6e0d71012b010dee24a0d0d7220b49f7
Reviewed-on: https://code.wireshark.org/review/2648
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-25 17:05:05 +00:00
Michael Mann 888f22de16 convert to proto_tree_add_subtree[_format]
Change-Id: I2ea1892b5963cc5578cbdd2b03029ca8424f2267
Reviewed-on: https://code.wireshark.org/review/2640
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-25 16:35:14 +00:00
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