Commit Graph

28207 Commits

Author SHA1 Message Date
Anders e326318eca Only call tvb_get_ptr() once to set src and dst addresses-
Change-Id: I206b25ec512b3665b36307276ab3748e0a5ff73b
Reviewed-on: https://code.wireshark.org/review/7135
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-15 17:57:48 +00:00
Gerald Combs bf151347fe [Automatic manuf, services and enterprise-numbers update for 2015-02-15]
Change-Id: Ie7aa5657e123ef609e05fc6f09782cc5d2443308
Reviewed-on: https://code.wireshark.org/review/7130
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-15 16:04:56 +00:00
Alexis La Goutte 29e1b45775 IS-IS (LSP): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I1b68151f0cb09afd6a6aeba2a71a15624c2fbc97
Reviewed-on: https://code.wireshark.org/review/7129
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-15 13:05:33 +00:00
Gerald Combs e11d7ef08f Fix diagnostics macros and squelch a gcc warning.
Both clang and gcc define __GNUC__. Make sure we account for that when
defining diagnostic macros.

Use DIAG_OFF + DIAG_ON to suppress gcc -pedantic warnings about
frame_data.

Get rid of packet_char_enc casts.

Change-Id: Idbcc61bcdb35c1d20f185461c69451dcdf73bae9
Reviewed-on: https://code.wireshark.org/review/7106
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-14 19:46:42 +00:00
Gerald Combs 5cc0ad8672 Remove a duplicate typedef.
Change-Id: Ie26785cc3577bda84cb4d244aab5a607797b99fb
Reviewed-on: https://code.wireshark.org/review/7118
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-14 17:01:21 +00:00
Alexis La Goutte ca534b1561 MIP6: Local Mobility Anchor Address mobility option code is treated incorrectly
The first packet is an IPv6 packet with Local Mobility Anchor Address mobility option with Option-Code=1. Wireshark parses its address as IPv4 address.

The second packet is an IPv6 packet with Local Mobility Anchor Address mobility option with Option-Code=2. Wireshark parses its address as IPv6 address.

According to RFC 5949 (https://tools.ietf.org/html/rfc5949#section-6.2.2), Option-Code=1 means IPv6 and Option-Code=2 means IPv4, exactly the opposite to what Wireshark does.

Bug: 10961
Change-Id: I03b76dda8beae211e67e6c9e1f40d122e851b1b5
Reviewed-on: https://code.wireshark.org/review/7113
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-14 16:41:30 +00:00
Alexis La Goutte 847f590963 MIP6: AUTH mobility option parses Mobility SPI and Authentication Data incorrectly
The authentication data in the AUTH option in attached IPv6 packet contains one byte too much. This byte is read beyond the option data.
In Wireshark, clicking on the AUTH shows that the option ends at 0xCE while clicking on the Authentication Data shows that it ends at 0xCF.

Reported by Boaz

Bug:10626
Change-Id: I0bcfd6331bc1de30f25d16590487c0e3bf5c002f
Reviewed-on: https://code.wireshark.org/review/7112
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-14 16:36:49 +00:00
Michael Mann 91b5042ece "Hide" hashether_t structure.
One use in a GUI function isn't really enough to justify making the structure public.

Change-Id: Ic7dee275ba0a2bd4e19c06702a867417c5624c27
Reviewed-on: https://code.wireshark.org/review/7080
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-14 15:56:21 +00:00
Guy Harris a64fc6cf44 Don't check for C89 headers.
1988 called, they want their lack of a C standard back.  We don't need
to check whether we have stdarg.h, stddef.h, stdlib.h, or string.h, as
they're specified by C89 and I don't think there are any platforms we
care about that don't have a C89 environment in which we could be built.

Change-Id: I447551181284fab7722354b62774625ed8ee94bc
Reviewed-on: https://code.wireshark.org/review/7110
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-14 09:10:56 +00:00
Guy Harris f62353755b We use GLib's directory-reading routines, so we don't need <dire[cn]t.h>.
Change-Id: Id86e5d6d0ab24adb1bfff0688f33a40f2fdaed8d
Reviewed-on: https://code.wireshark.org/review/7108
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-14 07:23:20 +00:00
Bill Meier 3e3fc9fc5e epan/dfilter/*.c: As needed: Add editor modelines & Fix indentation
Change-Id: I410839329a98bd806c60961dfb9693d5eeeeb702
Reviewed-on: https://code.wireshark.org/review/7104
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-13 19:04:44 +00:00
Bill Meier 82f081dd64 wslua*: Add editor modelines; Fix indentation, etc as needed.
Change-Id: I6df5d46f4b263104aa9cb6353cc987087cdb867e
Reviewed-on: https://code.wireshark.org/review/7102
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-13 18:28:23 +00:00
Bill Meier 9c866ff971 Replace tabs by spaces when editor modelines has "expandtab"
Change-Id: If7a6f2697be732ae4f94ed8b845fd293c32510f7
Also: tabs-stops should be 8
Reviewed-on: https://code.wireshark.org/review/7100
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-13 17:34:53 +00:00
Richard Sharpe 4d5bdf4256 A dissector for the RSVD Protocol (see [MS-RSVD].pdf).
There is still a little more work to do here, especially we should call the
SCSI dissector for handling SCSI CDBs etc ...

This is a potential fix for bug 10913.

Ping-Bug: 10913.

Change-Id: Ia8ff1a8207bb5b1cd18079086ff8c472ae3f8736
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-on: https://code.wireshark.org/review/7022
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-13 16:08:34 +00:00
Jeff Morriss 48a95dea4f Register the Mongo dissector by name so it can be used with TLS.
Change-Id: Ic9d688603747312aa29e5af038363f70c3cbae33
Reviewed-on: https://code.wireshark.org/review/7097
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-02-13 14:03:24 +00:00
AndersBroman c1610c7bd8 Micro optimization, only do tvb_get_ptr() once for dst and src
respectivly.

Change-Id: I1cdc5742057830a47ea71769fb54ab8dfdd3de14
Reviewed-on: https://code.wireshark.org/review/7096
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-13 13:42:41 +00:00
Gerald Combs 931807ea61 Qt: Add the "new packet" window^Wdialog^Wwindow.
Allow persistence across files. Preserve the use of "window" even
though we're really a dialog.

Update ByteViewTab and ProtoTree to support multiple instances.

Remove the need for a cast in frame_data.

Add more forward declarations.

Change-Id: I50d3d9d1455b8ecc158a37218f9e41fe696d5ae2
Reviewed-on: https://code.wireshark.org/review/7086
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-12 23:32:54 +00:00
Pascal Quantin bdcac172ea Fix crash at startup in SSE4.2 code when running a 32 bits Windows build
There is no guarantee that a g_malloc'ed memory block will be aligned on a 128 bits boundary
Instead use a static variable definition (at the cost of exposing the HAVE_SSE4_2 compilation flag in ws_mempbrk.h)

Change-Id: I661bf479a9d458d64c96bafc940c519d29a4780b
Reviewed-on: https://code.wireshark.org/review/7070
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-12 16:37:55 +00:00
Pascal Quantin 678a9b6463 BT ATT: memory given to add_new_data_source() must be allocated in pinfo scope
Bug: 10952
Change-Id: I0eb8e6891c35c70c9d405db87824c442caaa2f30
Reviewed-on: https://code.wireshark.org/review/7085
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-12 16:27:24 +00:00
Anish Bhatt 34acb73df1 [IS-IS-LSP] Add support for Prefix-SID subTLV
Bug: 10679
Change-Id: I4f2627aa22c64593258121a7e70b3f341e025d2e
Reviewed-on: https://code.wireshark.org/review/7048
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-12 12:49:07 +00:00
Dario Lombardo 60cc8b4fd8 Support for looking for incomplete dissectors.
Change-Id: I03e592dd3d54fc0e1c4af09d5d5336dda93f950e
Reviewed-on: https://code.wireshark.org/review/6978
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-12 11:14:24 +00:00
Guy Harris 207b52a988 tvb_length is a macro wrapper for tvb_captured_length; use tvbuff_length.
This squelches a compiler warning on some platforms.

Change-Id: Ibee5c2fe07fc58e22a860b4c4467a501c2b8a979
Reviewed-on: https://code.wireshark.org/review/7079
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-12 10:26:00 +00:00
Michal Labedzki 707522396c Little tuning of proto_tree_add_bytes_with_length
Change name from proto_tree_add_new_bytes to
proto_tree_add_bytes_with_length and other tweaks
pointed by Peter Wu.

Change-Id: I6058c28a74a154e2882e4eb04558bedcede6f508
Reviewed-on: https://code.wireshark.org/review/7039
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-12 09:22:55 +00:00
Anders Broman 4359cb8478 Revert ""Hide" hashether_t structure."
This reverts commit 297ef07b9b.

Change-Id: Id47f5fd221b631c95ca71e3f9315f5263bab22de
Reviewed-on: https://code.wireshark.org/review/7077
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 08:34:30 +00:00
Anders Broman 53228c4bd8 Revert "Make get_manuf_name return a const string."
This reverts commit 797ea88aef.

Change-Id: I9bc2cef0051d88c6374c6f1868b0250cba3edbd4
Reviewed-on: https://code.wireshark.org/review/7076
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 08:34:05 +00:00
Michael Mann 797ea88aef Make get_manuf_name return a const string.
Model get_manuf_name after get_ether_name so that a string (either name resolved or colon-separated bytes) is always stored in a hash table.  This will make name resolution of addresses perform a little better because it doesn't have to work about the wmem_allocator.

Change-Id: I80f465ae0845290255a659ab63310ac3cc35506e
Reviewed-on: https://code.wireshark.org/review/7075
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 07:36:20 +00:00
Michael Mann 297ef07b9b "Hide" hashether_t structure.
One use in a GUI function isn't really enough to justify making the structure public.

Change-Id: I6d70b9bacbc0fa1898150f59c0c69779a6cd5d51
Reviewed-on: https://code.wireshark.org/review/7074
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 07:31:05 +00:00
Jiří Engelthaler 0dbf741865 packet-iec104: fix packet information text
Change I6abc157368a78e1abfde672728b88a36ba6e76cc adds break in "switch case" but there was missing break deliberately. Code modified to let break on his place - copied code from the following condition.

Change-Id: Id008955fbc122c0f8cfe06af2b96f0b643e9417f
Reviewed-on: https://code.wireshark.org/review/7066
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-11 21:02:06 +00:00
Bill Meier 0cd2582e8d Prevent two false positive MSVC2013 Code Analysis warnings
Message: "Using uninitialized memory"

Change-Id: Ib7d381beb9f9c1f3ec19a376c0c8c0d5ef85f373
Reviewed-on: https://code.wireshark.org/review/7069
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-11 17:10:12 +00:00
Michael Mann 9db51dfc70 Remove address_to_str_buf from hsrp dissector "heuristics" as its much faster to just compare the IPv4 address as a 32-bit value.
Change-Id: If5a819b74112e92636d036509cb30ea15b2d5e3d
Reviewed-on: https://code.wireshark.org/review/7067
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-11 14:54:42 +00:00
Hadriel Kaplan a837570d02 Combine SSE and pre-compiled patterns for faster pbrk
This combines the SSE4.2 instructions usage, with pre-compiled
pattern searching usage, for a faster pbrk search method.

Testing against large files of HTTP and SIP, there is about
a 5% performance improvement by using pre-"compiled" patterns
for guint8_pbrk() instead of passing it the search string and
having it build the match array every time.
Similar to regular expressions, "compiling" the pattern match array
in advance only once and using the "compiled" patterns for
the searches is faster than compiling it every time.

Change-Id: Ifcbc14a6c93f32d15663a10d974bacdca5119a8e
Ping-Bug: 10798
Reviewed-on: https://code.wireshark.org/review/6990
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-11 09:14:50 +00:00
Pascal Quantin a618f1c0d6 USB: put back interface class when dissecting URB_CONTROL
Also ensure that USB COM dissection is done with the parent tree and not setup one

Change-Id: Iae9f933ff29b3854879375df320a23e623ea785f
Reviewed-on: https://code.wireshark.org/review/7051
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2015-02-10 20:33:29 +00:00
Pascal Quantin e915db7cc8 Do not iterate over reported length when using tvb_find_line_end
if captured length < reported length, this will trigger an infinite loop

Change-Id: I6557b455e7bbff12658a934e5bb13a42c023e133
Reviewed-on: https://code.wireshark.org/review/7053
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-10 14:02:20 +00:00
Pascal Quantin 7369c25ad4 IMAP: do not iterate over reported length when using tvb_find_line_end
This function can only search in captured length buffer
This fixes an ASAN failure reported by Alexis

Change-Id: Ib936f918e057423d63ff34a5fc79fed602e56dfc
Reviewed-on: https://code.wireshark.org/review/7052
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-10 13:24:59 +00:00
Pascal Quantin 29be26c4b3 FTAM: get rid of an evil global variable
Fixes an ASAN failure reported by Alexis

Change-Id: Id0ddad6451e22ffc53d42985e9b2071c7388d15b
Reviewed-on: https://code.wireshark.org/review/7049
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-10 12:35:37 +00:00
Bill Meier e88a11f5c9 (Trivial) Fix printf-related 'Mismatch on sign' warnings
Found by MSVC2013 Code Analysis

Change-Id: I58063946dd558e98308c87b36eeac0ddbe1a6e79
Reviewed-on: https://code.wireshark.org/review/7045
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-09 18:57:14 +00:00
Peter Wu 2078a95e93 pgsql,imap: add STARTTLS support
The PGSQL "STARTTLS" protocol is documented at
http://www.postgresql.org/docs/9.4/static/protocol-flow.html
While at it, convert some tvb_length[_remaining] users.

Tested against pgsql-ssl.pcapng,
Tested against imap-ssl.pcapng,
http://wiki.wireshark.org/SampleCaptures#SSL_with_decryption_keys

Change-Id: I1a00a6daa7f03de93339c2c13b07b4cfb8cdbd86
Reviewed-on: https://code.wireshark.org/review/6821
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-09 16:26:28 +00:00
Martin Mathieson a58cf528fc file-jpeg: Allow 'Exif' as identification in first App block, but flag as expert info warning if seen
Change-Id: Id16e0b4fbca3b29b01138a9aea758b8beb8d9ed8
Reviewed-on: https://code.wireshark.org/review/7042
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-02-09 14:19:36 +00:00
Martin Mathieson e36a2ad669 Netflow: rework how transport (port) resolution is done, adding support for SCTP
Change-Id: I09b2cc3739628b5de706659731e37fa345804254
Reviewed-on: https://code.wireshark.org/review/7043
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-02-09 14:12:22 +00:00
Peter Wu 929a4f253c ldap: simplify Start TLS handling
RFC 2830 describes the Start TLS operation as follows:

 1. ExtendedRequest is sent by client with the requestName OID set to
    "1.3.6.1.4.1.1466.20037".
 2. Server responds with an ExtendedResponse having a resultCode and
    optionally a responseName (OID).

The text mentions that the field *must* be set but the definition allows
it to be optional. The previous code then made assumption that once (1)
was seen, then any ExtendedResponse signals an acknowledgement.

That is not entirely correct, a server could reject the request. This
patch corrects that by checking the ExtendedResponse_resultCode for
success, and then uses the new ssl_starttls_ack() helper to kick off
SSL. This simplifies the code a bit.

Tested against ldap-ssl.pcapng (which has no responseName) from
http://wiki.wireshark.org/SampleCaptures#SSL_with_decryption_keys
The result is the same as before, except that "Protocols in frame"
changed from "...:ldap:ssl:ldap" to "...:ssl:ldap".

Change-Id: Id7e40c5a50a217c4d3d46f08241d704f19d195dd
Reviewed-on: https://code.wireshark.org/review/6982
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-09 14:08:18 +00:00
Peter Wu e190253478 Fix STARTTLS handling in various dissectors
This patch lets a dissector hand over control to the SSL dissector which
simplifies dissector code ("TCP | App | SSL | App" becomes
"TCP | SSL | App").

After this patch, all of the affected dissectors will now be dissected
as SSL with its Application Data being treated as the protocol before
STARTTLS. This was previously not the case because the port was not
registered for dissection via ssl_dissector_add.

The desegmentation issue within the MySQL dissector is now also gone.
Convert some tvb_length[_remaining] users in pop and smtp as well.

Tested against mysql-ssl.pcapng and mysql-ssl-larger.pcapng(*1),
Tested against pop-ssl.pcapng (note: only first stream is decrypted,
either the key after negotiation is wrong or there is a bug),
Tested against smtp-ssl.pcapng and smtp2525-ssl.pcapng (with Decode As)
and smtp-ssl.pcapng with filter "tcp.len>0",
Tested against xmpp-ssl.pcapng,
http://wiki.wireshark.org/SampleCaptures#SSL_with_decryption_keys

 *1) mysql-ssl-larger has MySQL dissector errors for the fragmented
     SSL packet, but reassembly seems to work. Needs further
     investigation.

Bug: 9515
Change-Id: I408ef8ff30d9edc8954dab9b3615900666dfa932
Reviewed-on: https://code.wireshark.org/review/6981
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-09 14:03:34 +00:00
Peter Wu 93ed72642b ssl,dtls,ssl-utils: Prepare for STARTTLS handling
All STARTTLS-like dissectors (protocols which can switch to SSL/TLS
after a protocol command) currently fail to get called after decryption.
The reason for this is that the port is not registered for SSL
dissection via ssl_dissector_add. Besides this, the MySQL dissector
breaks in the event of multiple segments because it does not properly
set desegmentation.

The call path TCP | App | SSL | App is a bad, error-prone pattern which
requires duplication of required functionality in dissectors. This patch
enables to bypass the App (TCP | SSL | App) by registering a SSL as
conversation dissector after a STARTTLS switch.

Logical overview of changes:

 - Move srv_addr, srv_ptype and srv_port to SslSession and adjust the
   users. This allows passing SslSession around which will never be null
   unlike SslDecryptSession. This is needed for looking up the packet
   direction (server or client) before calling a subdissector.
 - Add app_handle to store the dissector and last_nontls_frame the
   frame that initiated STARTTLS.
 - The same app_handle is now used to store the dissector handle from
   a ssl association.
 - Moved conversation data (SslDecryptSession) to ssl-utils to avoid
   code duplication. Merge ssl_session_init into it. The new
   ssl_session_get() is needed for STARTTLS frame/handle storage.
 - Introduce new "ssl_starttls_ack" function to signal the last non-TLS
   packet.
 - Ensure that match_uint is set before calling the conversation
   dissector. This ensures that dissectors using match_uint to check
   the direction of a packet (client vs. server) see the TCP port
   instead of the IP proto. At least the MySQL and SMTP dissectors
   require such special treatment.
 - Move epan/conversation.h outside HAVE_LIBGNUTLS, remove from dtls
   (as it is already included by ssl-utils).
 - Various comment/debug string updates. Remove outdated comment before
   SSL association lookup.

Besides setting match_uint and caching the app_handle, existing
dissectors should not be affected by this patch. Follow-up patches
will update existing dissectors to use the new ssl_starttls_ack
interface.

Bug: 9515
Change-Id: I795d16b6a901e672a5d89e922adc7e5bbcda0333
Reviewed-on: https://code.wireshark.org/review/6872
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-09 14:00:38 +00:00
Anish Bhatt 5b2a05ce5c [IS-IS LSP] Add support for Adj-SID & LAN-Adj-SID subTLV
Bug: 10677
Change-Id: Ia936ee4af6779b2b7dde61f33c490f545060dbe8
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/6980
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-09 13:03:16 +00:00
Peter Wu 3222cd1df6 ssl-utils: use ALPN hint for improved spdy/http2 recognition
This patch improves detection of a SPDY/3.1 in SSL capture. While at it,
add other protocols from the RFC/drafts.

spdy was tested against a private capture from spdy/3.1 communication
between Chromium 40 and ssl.gstatic.com.
http2 was tested against http2-16-ssl.pcapng from
http://wiki.wireshark.org/SampleCaptures#SSL_with_decryption_keys

Change-Id: I111efae34d614b7d8e37eaaa686b391d332753dd
Reviewed-on: https://code.wireshark.org/review/7000
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-09 12:58:18 +00:00
Lev Stipakov d56a3c9789 This adds support for P_DATA_V2 OpenVPN packets.
On the wire P_DATA_V2 is same as P_DATA-V1 plus 3 bytes "peer-id" value
after opcode. Client-side support has been added since OpenVPN 2.3.6,
server side is in master branch and will appear in 2.4.

Peer-id is especially useful for mobile clients (they often float
between 3G/Wi-Fi) and in general for Wi-Fi clients (solves UDP NAT
timeout issue).

Change-Id: Ic5d2e05e62c27bed18c2368a1bbc5c7bf4d358f1
Reviewed-on: https://code.wireshark.org/review/7023
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-09 05:22:49 +00:00
Michael Mann 8ff944d4ab Add fixed length function for address types.
This allows for even more cleanup with respect to how address types are handled, including removing address_to_str.c.  Most of the functionality was folded into address_types.c, but the remainder was just dispersed because it didn't make sense to keep the file.

Change-Id: Id4e9391f0c3c26eff8c27b362e4f7a1970d718b4
Reviewed-on: https://code.wireshark.org/review/7038
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-09 03:49:13 +00:00
Michael Mann 2875cd382f Eliminate the hf member out of the address structure.
Using the new address type registration, dissectors can create their own address types with their own (column) filters attached to them, eliminating the need for an address to keep track of a hf_ field.

Change-Id: I2bbec256a056f403a7ac9880d5d76a0b2a21b221
Ping-Bug: 7728
Reviewed-on: https://code.wireshark.org/review/7037
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-09 03:48:53 +00:00
Michael Mann 2042385ac9 Add "column filter string" support to address types.
Information about dissector (filter) fields should be kept in a dissector as much as possible. Supporting "column filter string" also allows other dissectors to create their own "address types" with different column filters (because AT_ETHER isn't always an "Ethernet" address).

This feature also allowed a few "dissector specific" address types to be moved to their own dissector.

Change-Id: Ie9024af4db62bc2ee4f8c9d28a1d807f706f45bf
Ping-Bug:7728
Reviewed-on: https://code.wireshark.org/review/7029
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-09 01:13:28 +00:00
Michael Mann 4497bb48fd Add address type registration.
Now address types are setup just like field types and must be registered with a structure that provides its string representation (and more things in the future).  Address types that are limited to a single dissector are registered by the dissector.  More "common" ones are globally registered.  There are still a few that really belong in a dissector, but have other dependencies currently not accounted for in the address type support.

Many of the "address to string" conversions that involved g_sprintf have be changed to use more "performance friendly" methods (some at the cost of needing to_str-int.h)

Leaving all comments regarding this "solution" in address_to_str.c in until all have been implemented

Change-Id: I494f413e016b22859c44675def11135f228796e0
Reviewed-on: https://code.wireshark.org/review/7019
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-09 01:12:01 +00:00
Alexis La Goutte 3b81c360de DNS: LOC Precision missing units
The DNS packet's 3rd additional RR is a LOC RR.
In the LOC RR, Wireshark marks the Size field with meters unit.
However, the Horizontal and Vertical Precision fields have no units

Issue reported by Boaz

Bug:10940
Change-Id: If177757d2bba6ea012a320aceaea2f8d8e50155c
Reviewed-on: https://code.wireshark.org/review/7014
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-08 22:44:05 +00:00