Commit Graph

29929 Commits

Author SHA1 Message Date
João Valverde d7420d071d IPv6: Add new line for readability
Change-Id: Ia963b1c12a8e852e75318fc054aa8caf7c63833c
Reviewed-on: https://code.wireshark.org/review/10465
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-10 16:09:09 +00:00
AndersBroman 61f07f1932 [GTPv2] Dissect F-Cause for FORWARD_RELOCATION_RESP in case of S1AP.
Change-Id: I245daad739c7f181d4f57cbc50416096199f682a
Reviewed-on: https://code.wireshark.org/review/10462
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-10 13:03:55 +00:00
Tom Haynes 37bee87a52 nfs: Fix compilation break
Initialize layout_type.

Change-Id: Ied6cf61045cbee4f45b802c99ba06c2a07cc7613
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10461
Reviewed-by: Roland Knall <rknall@gmail.com>
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: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-10 10:38:15 +00:00
João Valverde e9b12916ab IPv6: Rename 'dstopt_tree' variable in dissect_opts()
dissect_opts() is used to dissect both hop-by-hop options and
destination options.

Change-Id: I2cb8716a30cf521772d9128155c87c0f92598ef6
Reviewed-on: https://code.wireshark.org/review/10459
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-09-10 07:58:48 +00:00
Gerald Combs cd9f163eb9 Add the IAX2 Analysis dialog.
Copied from the RTP Analysis dialog, just like the GTK+ version.

Change-Id: I111020bc4073a3a3ba583bdace51a91ee5fef300
Reviewed-on: https://code.wireshark.org/review/10447
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-09-09 21:57:08 +00:00
Pascal Quantin 302b03a0bb GIOP: increase the maximum message size allowed to 10MB
Also make it configurable through preferences

Bug: 11508
Change-Id: Ic2cc085376d61892996b33ed45f906e4b3ff19da
Reviewed-on: https://code.wireshark.org/review/10449
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-09 21:22:43 +00:00
Tom Haynes 8a8a82d1b6 nfs: Add NFSv4.2 op LAYOUTERROR
Change-Id: I748166ebcad1fa704b3d99770cf0c6296bdae3dd
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10434
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 14:56:35 +00:00
Tom Haynes 0c6b54edd1 nfs: Add support for the Flex File Layout Type in LAYOUTRETURN
Change-Id: I40462f2acf20b99b5691a5efe1f6bfa563163bee
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10429
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 14:56:02 +00:00
Tom Haynes 0f89e42de5 nfs: Add NFSv4.2 op LAYOUTSTATS
Change-Id: I29429373b4a50d9580560b4f0759e31dd8cbf0c3
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10427
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 12:45:56 +00:00
Tom Haynes 6b59566a2b nfs: Add NFSv4.2 op WRITE_SAME
Change-Id: I6a170f7e38a712c4ea0bc83ff4b1baf616a47253
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10436
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 12:42:28 +00:00
Tom Haynes 0fdd702a67 nfs: Add NFSv4.2 op READ_PLUS
Change-Id: I10fd5c28c57c467c854ce3658887b2d0ce6f51b8
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10435
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 11:53:16 +00:00
Tom Haynes 720a7595f0 nfs: Add NFSv4.2 cb op CB_OFFLOAD
Change-Id: Idfd27f382e78813b067b99fbe2e7934ddb72b6da
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10433
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-09 11:50:57 +00:00
Tom Haynes 9e07406014 nfs: Add NFSv4.2 op IO_ADVISE
Change-Id: Ie2cc621fa928a541810e67a2444408572e0d8d4d
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10432
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 11:38:47 +00:00
Tom Haynes b5aa0ff1a4 nfs: Add NFSv4.2 ops OFFLOAD_CANCEL and OFFLOAD_STATUS
Change-Id: Ic5ff60f559e1651b206cac4612b3cbc64ca67306
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10431
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 11:37:52 +00:00
Tom Haynes c7828244f5 nfs: Add NFSv4.2 op CLONE
Change-Id: I38eab48dcc27c813fc134881b359d8033bc00771
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10430
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 11:35:47 +00:00
Tom Haynes 2160e9cd97 nfs: Add NFSv4.2 ops COPY and COPY_NOTIFY
Change-Id: I780b7519be5b8a8aadac7141363ff138cae4e583
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10428
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 11:29:21 +00:00
Tom Haynes 79b88aacb6 nfs: Cleanup of FlexFiles Layout Type
Change-Id: I178b166ee682693e6e3c17759573899ba13ca6f5
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10426
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 11:21:22 +00:00
Tom Haynes 6e82854667 nfs: Add new attributes for NFSv4.2
Change-Id: Ib6f0c723dc7a5f031cdc52fd339a8fb29362370b
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10425
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 11:20:24 +00:00
Tom Haynes a79967f1e0 nfs: Add new error codes for NFSv4.2
Change-Id: I9a4cbb3b43c2695ca576eea7263c561a9d0f3783
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10424
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 11:18:18 +00:00
Pascal Quantin 322e09676c Fix some memory leaks when extracting a string from TVB
Change-Id: If3970a20045d84200924f89ac467c4eb0206cb11
Reviewed-on: https://code.wireshark.org/review/10446
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 07:39:18 +00:00
John b0aec6d961 packet-optommp.c add dest_ID support.
OptoMMP sets destination_ID to 0x0000 if MSB not set
Else makes subtree with full dest_ID and boot_ID

Change-Id: I459a8428eacd71846344b5e9f95ef471c3bb049a
Reviewed-on: https://code.wireshark.org/review/10361
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-09 04:11:28 +00:00
João Valverde ee729df973 Add the IPv6 DSCP value to the IP DSCP column
Bug: 7030

Change-Id: If4dac85d1406023829220fa9d58a6e642dbcec67
Reviewed-on: https://code.wireshark.org/review/10409
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-08 18:23:03 +00:00
João Valverde bc4bc72bd3 Detect mismatched ethertype protocol ID (IPv4) and encapsulated IP packet (IPv6)
Bug: 11458
Change-Id: I66b51654d268196da366b0e9aea6ced0076d4737
Reviewed-on: https://code.wireshark.org/review/10407
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-08 15:38:55 +00:00
Alexis La Goutte 2de799fb8d BGP: Update BGP Capability List
from IANA capability-codes 2015-07-23
* draft-ietf-idr-bgp-enhanced-route-refresh => RFC7313
* Add CP-ORF (RFC7543)
* Add FQDN draft-walton-bgp-hostname-capability

Change-Id: I9de73be9eca1ed2456d4a15150b040454eb01add
Reviewed-on: https://code.wireshark.org/review/10442
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-08 11:15:12 +00:00
Roland Knall 6f1c9fd432 PluginIF: Parent menu and goto frame
The developer may provide a given menu as parent menu for the
 sub menu. If the menu does not exist, the main menu will be used.

 Has been implemented for Qt as well as GTK.

Change-Id: I3f26684862fd0b08f59eeb4d6f4a24ce7dc3d428
Reviewed-on: https://code.wireshark.org/review/9939
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2015-09-08 11:03:35 +00:00
Guy Harris f25b8c6784 Move some stuff into the only code path where it's used.
AirPDCapPacketProcess() really does two different things; some of the
stuff it does in both code paths only needs to be done in one code path.
Make it so.

Change-Id: Idb231d729150781f323e88ed375c983a3afd2577
Reviewed-on: https://code.wireshark.org/review/10439
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-09-08 05:03:56 +00:00
Michael Mann bcba9ba0d3 Add API to expose "expert info" summary.
This is intended for use in expert_add_info_format or proto_tree_add_expert_format to get the "base" string to then append additional information, but I'm sure other uses can be found.
Similar to some of the proto_get_xxx APIs, but still only "create as needed".

Change-Id: Ib76e6ed557c2ae41e0a40957a9efa4bf485909da
Reviewed-on: https://code.wireshark.org/review/10420
Reviewed-by: Michael Mann <mmann78@netscape.net>
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-09-08 04:45:19 +00:00
Guy Harris 44a0bafd15 Don't try to decrypt with an AES key shorter than 128 bits.
AES keys must be at least 128 bits; AES_unwrap returns a null pointer if
handed a too-short key, and we then just dereference that null pointer
and crash.  Just give up with a too-short key.

Bug: 11507
Change-Id: Id1cf0a43c608597a11ff9df40f3654e6ff30619d
Reviewed-on: https://code.wireshark.org/review/10422
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-09-08 00:46:41 +00:00
Guy Harris f6d0e0946e Add a new expert info type for decryption problems.
This is what should be used if, for some reason, decryption can't be
performed.  (And if there's a known reason why decryption can't be
performed, it should be used, so the user knows why their
802.11/SSL/whatever traffic isn't decrypted, and either doesn't have to
ask why or, at least, can give more details when they do ask why.)

(Yes, I plan to use this for the 802.11 decryption code.  Work in
progress.)

Change-Id: I812e61c2a4613d2e85f9ced1f5ed6ae91ac5f7ae
Reviewed-on: https://code.wireshark.org/review/10421
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-09-07 23:58:57 +00:00
Olaf Bergmann a6360b6cc0 SSL: bugfix for raw public keys in certificate message
RFC 7250 has changed the format of the Certificate structure from
RFC 5246 to the following:

opaque ASN.1Cert<1..2^24-1>;

struct {
    select(certificate_type) {

        // certificate type defined in RFC 7250
        case RawPublicKey:
           opaque ASN.1_subjectPublicKeyInfo<1..2^24-1>;

        // X.509 certificate defined in RFC 5246
        case X.509:
           ASN.1Cert certificate_list<0..2^24-1>;
    };
} Certificate;

Thus, ssl_dissect_hnd_cert() must parse subjectPublicKeyInfo
immediately when the message's certificate type is
SSL_HND_CERT_TYPE_RAW_PUBLIC_KEY. Otherwise, the message will
contain a certificate_list.

This modification first determines the certificate type and then
handles both cases independently. For raw public keys, no subtree
is created to reflect the flat structure of the certificate
message.

Bug: 11480
Change-Id: I1c55eca361c4e40fcbff5bc32bfc8de3576bdfbf
Reviewed-on: https://code.wireshark.org/review/10272
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-09-07 21:56:42 +00:00
Gerald Combs 4cb37376e7 [Automatic update for 2015-09-06]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: If1cc31f1cd036c536a8a8bb9d9094bdb7c9f6f07
Reviewed-on: https://code.wireshark.org/review/10403
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-06 15:10:57 +00:00
Pascal Quantin b97938994c SV: add an option to dissect seqData as PhsMeas
When set, this brings back the dissection code that was removed in g84a8c1d (bug 5696)

Bug: 11475
Change-Id: Iba6b0ec6490e2971a3670d13cb3b84351b69f126
Reviewed-on: https://code.wireshark.org/review/10399
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-06 14:00:54 +00:00
Pascal Quantin 09e92f004a OCSP: get rid of an evil global variable
Bug: 11505
Change-Id: I87cc676426dceed05a9a95bb515c4fb2535ac9c5
Reviewed-on: https://code.wireshark.org/review/10400
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-06 12:25:38 +00:00
João Valverde a35311d312 Fix comments in dissect_6lowpan_iphc_nhc()
Change-Id: I9c02b8f2a64127200c9cfe2f389f773ac198ed21
Reviewed-on: https://code.wireshark.org/review/10389
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-05 06:18:15 +00:00
Cody Doucette f5ac9f55c4 xip-serval: add support for XIP Serval packets
Serval is a service-centric architecture that has been ported to XIA to
allow applications to communicate using service names. This change adds
a dissector for XIP Serval, which sits between layers 3 and 4, and
also amends the XIP dissector to be able to invoke it.

Bug: 11491
Change-Id: I11299ddbd0fb9eaf8728f8b3fde2a63656963114
Reviewed-on: https://code.wireshark.org/review/10315
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-04 14:39:51 +00:00
João Valverde 3ca6bde92f Capitalize IPv6 extension headers ipprotostr()
Change-Id: I36f0ceb0c44414e6b98f580757eec226facae9ae
Reviewed-on: https://code.wireshark.org/review/10353
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-09-04 14:38:35 +00:00
Alexis La Goutte ecc51f3ea6 H223: fix will never be executed [-Wunreachable-code]
Found by Clang 3.7

Change-Id: I3a7c41eba2ee636bb74326598a3de47f5a23126a
Reviewed-on: https://code.wireshark.org/review/10325
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-04 14:31:49 +00:00
Hadriel Kaplan f526468bd3 Coverity CID 1167971-1167974: constant expressions in wslua_int64
Get rid of false-positive coverity issues by using a macro instead
of source code if-statement.

Bug: 11501
Change-Id: I07f478ed334931f05bdfb87cb8f614b16bbf8fa8
Reviewed-on: https://code.wireshark.org/review/10376
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-09-04 12:35:49 +00:00
Kevin Bracey 7c4f622d68 Insert correct padding in RFC 6282 IPHC headers
IPv6 Extension Headers compressed using IPHC should have a single Pad1
or PadN inserted at the end if necessary - the previous code just left
any padding zero-initialised (equivalent to multiple Pad1s).

This guarantees correctly-compressed packets are accurately
decompressed, including the specific option padding pattern. (The type of
padding could matter, eg for IPSec authentication - padding options are
authenticated.)

Print a warning note if a non-option header needs padding - this is
invalid.

Bug: 10523
Change-Id: I66c98370862800a8fccbe02ed6a851961e2f7d1d
Reviewed-on: https://code.wireshark.org/review/10230
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-04 11:04:07 +00:00
guydavies ad46641eae BGP: Fix typo
Change-Id: I2d33af7da22fee543d08624d06ca8880472f3586
Reviewed-on: https://code.wireshark.org/review/10377
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-04 10:31:03 +00:00
Pascal Quantin 04913778d8 Declare col_get_text() as WS_DLL_PUBLIC
Bug: 11498
Change-Id: I5204bd27cee044a57913e48c4da00628f3f58bf8
Reviewed-on: https://code.wireshark.org/review/10374
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-03 20:08:49 +00:00
Stig Bjørlykke 68fa739ef1 Lua: Check if having listeners before remove
This avoids a warning when trying to remove a listener twice.
  g_ptr_array_remove: assertion 'array' failed

Change-Id: I0bcbbbe3b3393a8455b51fad80c5716fc38ac50e
Reviewed-on: https://code.wireshark.org/review/10370
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-09-03 16:07:37 +00:00
Michael Mann 2be3820912 Address "shadow" warnings found by checkAPI script.
These aren't "true" shadow issues, but the script doesn't completely understand C syntax (for things like struct member names "time" and "index").  But fixing them creates less noise.

Change-Id: I5a2db1549095824530428529e86cab453c031a04
Reviewed-on: https://code.wireshark.org/review/10368
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-09-03 06:05:43 +00:00
Guy Harris 32e785f813 The official #define for 32-bit and 64-bit Windows is _WIN32.
It's _WIN32, with a leading underscore, not WIN32.  See, for example:

    https://sourceforge.net/p/predef/wiki/OperatingSystems/

and

    https://msdn.microsoft.com/en-us/library/b0084kay.aspx

*Some* environments may also define WIN32, but we shouldn't depend on
that.

Replace all-caps "WIN32" referring to Windows in comments and other text
with "Windows" or "Win32".  (The two are pretty much equivalent, these
days; nobody much cares about Win16, not that we ever ran on it, and
64-bit Windows is just a 64-bitified Win32.)

Change-Id: Id327bcd4b1e9baa4f27055eff08c2d9e594d6f70
Reviewed-on: https://code.wireshark.org/review/10367
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-09-02 22:59:10 +00:00
Bill Meier e1541182cb Fix one more MSVC2015 issue: "[...]ignoring unknown option '/Zd'"
Remove some old cruft which compiled packet-rrc.c with '/Zd'
 option for certain very old Microsoft C compilers which we no
 longer support (e.g., MSVC6!).

Change-Id: I47f7ab8c92b9e495acedfe76260d607a01c2a40f
Reviewed-on: https://code.wireshark.org/review/10362
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-09-02 18:35:17 +00:00
Gerald Combs c8bdb95d21 1.99.9 → 1.99.10.
Change-Id: I924be5b0e3c73a0bb8ae1361fa518ec10139e13d
Reviewed-on: https://code.wireshark.org/review/10363
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-02 18:29:10 +00:00
João Valverde af6365a834 Allow "Decode As" for IPv6 over UDP
Change-Id: Ib28206e9573f1dd624be1d3c265fef405f65b19a
Reviewed-on: https://code.wireshark.org/review/10351
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-09-02 14:32:33 +00:00
Dario Lombardo d5127100b9 idl2wrs: fix clang analyzer Warning complains.
890:9: warning: Access to field 'str' results in a dereference of a null pointer (loaded from variable 'token_list')
3132:4: warning: Value stored to 'str' is never read
3155:4: warning: Value stored to 'str' is never read
3166:4: warning: Value stored to 'str' is never read
3183:4: warning: Value stored to 'str' is never read
3192:4: warning: Value stored to 'str' is never read
3203:4: warning: Value stored to 'str' is never read
3220:4: warning: Value stored to 'str' is never read


Change-Id: If1a1acfc331e0648f95f6d6defe6533b6927ccaa
Reviewed-on: https://code.wireshark.org/review/10357
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-02 13:27:34 +00:00
Pascal Quantin 5518ae0787 PER: followup of g59453fb
Change-Id: I45c02a249444e5f17d99eeb0ca8dea6f7a012262
Reviewed-on: https://code.wireshark.org/review/10356
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-02 11:59:42 +00:00
Dario Lombardo e1dee7cfb6 dcerpc: fixed distcheck.
Change-Id: Ide0b95278786d45d9c41fb0fe3214dce0880b830
Reviewed-on: https://code.wireshark.org/review/10355
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-02 11:49:19 +00:00
Tom Haynes 5d8363e83d nfs: Fix order of octets in IPv4 address
Before:

skull:bugs loghyr$ ~/ipv4/wireshark/tshark -r 2-layoutstats-in-1-compound.pcap -Y nfs -V | grep -i ipv4
                [IPv4 address 113.12.31.172, protocol=tcp, port=2049]

After:

skull:bugs loghyr$ ~/ipv4/wireshark/tshark -r 2-layoutstats-in-1-compound.pcap -Y nfs -V | grep -i ipv4
                [IPv4 address 172.31.12.113, protocol=tcp, port=2049]

Bug: 11496
Change-Id: Ia6097ae76411f6ff9de1f53191c8fc767856e2d1
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/10347
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-02 11:36:23 +00:00
Alexis La Goutte 920e056bb4 idl2wrs: Make Mac OSX buildbot happy
Change-Id: I5f9c860bec0f8d323d9f3cd7cf55e348654c8b8b
Reviewed-on: https://code.wireshark.org/review/10354
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-02 05:49:53 +00:00
João Valverde 8b6fe35226 IPv4: Remove extraneous colon from format string
Change-Id: If52f8086ec971cc43947ece3d8e062da8378fa95
Reviewed-on: https://code.wireshark.org/review/10352
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-02 05:16:48 +00:00
Michael Mann 59453fb54b Eliminate proto_tree_add_text from packet-per.c
Change-Id: I67f572129821fb00e4478a30bfd4a52287b8b1a1
Reviewed-on: https://code.wireshark.org/review/10350
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-02 05:15:41 +00:00
Michael Mann c41a833d03 Eliminate proto_tree_add_text from some dissectors.
Change-Id: If617016f588bbf940f37699e27559dc5c59cf508
Reviewed-on: https://code.wireshark.org/review/10349
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-02 05:14:17 +00:00
Michael Mann 630f48fead Eliminate proto_tree_add_text from packet-rsvp.c
Change-Id: I95edc1b40c07a4addf194df6a2056e7b61193e5a
Reviewed-on: https://code.wireshark.org/review/10348
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-02 05:12:23 +00:00
Dario Lombardo 87f2bd45fc idl2wrs: some code cleanups.
Code cleanups include:
- sanity checks for malloc()
- change forbidden APIs into g_* versions
- minor indentation fixes
- add modeline
- add compilation for cmake and autotools

Bug: 11052
Change-Id: I825f04d9703448f9165d188be2bdd185fce5ff5d
Reviewed-on: https://code.wireshark.org/review/10030
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>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-02 02:28:23 +00:00
Alexis La Goutte aa1f55610b MSDP: fix will never be executed [-Wunreachable-code]
Move tvbuff declaration for avoid https://llvm.org/bugs/show_bug.cgi?id=19020

Found by Clang 3.7

Change-Id: I299d2413dc4effc5e6e34c289152b8f401f19342
Reviewed-on: https://code.wireshark.org/review/10326
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-02 00:42:50 +00:00
Alexis La Goutte 998dcc24ed ANSI: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I981336271a8f6b41fe777f732069639df494c5d2
Reviewed-on: https://code.wireshark.org/review/10346
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-02 00:40:21 +00:00
Alexis La Goutte b7764fc601 UMTS (mac): fix will never be executed [-Wunreachable-code]
Move tvbuff_t declaration for avoid https://llvm.org/bugs/show_bug.cgi?id=19020


Found by Clang 3.7

Change-Id: Id26fd62273d6838774db161a8b3f6c7db94a2de1
Reviewed-on: https://code.wireshark.org/review/10328
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-02 00:36:24 +00:00
Pascal Quantin c8f87842cb ANSI A: fix dissection of numerous fields broken in g7298a31
Change-Id: I09898cfc1aedc4b8067c6d12c94effc51a5ebbc0
Reviewed-on: https://code.wireshark.org/review/10345
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-01 19:23:52 +00:00
Michael Mann 7298a31687 Eliminate proto_tree_add_text from ANSI dissectors.
Change-Id: I22dccb2f2d71897334e11632f4060ccfbf4794ad
Reviewed-on: https://code.wireshark.org/review/10334
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-09-01 04:10:06 +00:00
Gerald Combs 54d2ff1c3e Convert the WSP stats to generic stat API.
Add support for multiple tables to SimpleStatisticsDialog.

Change-Id: I843d901db092d2f2856d3d1a16f29f85fb41374b
Reviewed-on: https://code.wireshark.org/review/10339
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-09-01 01:01:32 +00:00
Gerald Combs 377d215e0f Convert the MTP3 stats to new "generic stat API".
Convert both the MTP3 statistics and summary. As with the GSM stats this
is mostly untested.

Change-Id: I7af8d5f21c8161dc95f7f2c710f32364b6f6a431
Reviewed-on: https://code.wireshark.org/review/10338
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-08-31 23:06:09 +00:00
Alexis La Goutte 7dd834975f NGHTTP2: Update to 1.3.0
Change-Id: Ia12396b3b4a2bb4dcbdce63d06558b6474cd588e
Reviewed-on: https://code.wireshark.org/review/10324
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-08-31 17:51:50 +00:00
Michael Mann a060183142 Eliminate proto_tree_add_text from packet-rtps.c
Change-Id: I353b4fcb3091e731a4b2a68e1932a5abc60c6038
Reviewed-on: https://code.wireshark.org/review/10323
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-08-31 06:43:09 +00:00
Joerg Mayer 053f53ccd1 Add a hidden item that allows to allow filtering on the station address.
This currently only works for data frames. A Fixme is in place for
managment frames.

Change-Id: I0a72a9a3e40cf8269856fbbcd97b270af422afa2
Reviewed-on: https://code.wireshark.org/review/10322
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-08-31 02:52:45 +00:00
Martin Kaiser f0b4e8ec92 dlsw: don't THROW() an exception from a dissector
Change-Id: I897202e7fb2987f608ca4f98aa1a1dc4b7dbd995
Reviewed-on: https://code.wireshark.org/review/10320
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-08-30 18:32:18 +00:00
Martin Kaiser 81c6ecd1d9 dlsw: remove unnecessary if (tree) checks
don't create an expert info under if (tree)

Change-Id: I2c8f90483c434d708a97b621621ca123fc505edc
Reviewed-on: https://code.wireshark.org/review/10319
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-08-30 18:13:39 +00:00
Gerald Combs 99e16ce820 [Automatic update for 2015-08-30]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I37400bf1fac15fcd5f2946913b96184b1828f091
Reviewed-on: https://code.wireshark.org/review/10317
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-30 15:10:10 +00:00
Pyeole faaa6f2a34 BGP: fixed incorrect NLRI decoding
Bug: 11308 
Change-Id: I967b9596edad1e3656e139d0ca3a0e3c389d80ea
Reviewed-on: https://code.wireshark.org/review/10308
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-30 13:48:31 +00:00
Pascal Quantin 6c065783c5 CBOR: fix definition of cbor.type.tag64 field
Bug: 11486
Change-Id: I070c8c397a41c0c8231720c611938d7282c03d19
Reviewed-on: https://code.wireshark.org/review/10310
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-30 06:03:35 +00:00
Kevin Bracey eacaa1aad8 6LoWPAN: IPv6 Fragment Headers don't have a Length field
RFC 6282 specifies special handling of the "Length" field in compressed
IPv6 extension headers. However, the Fragment Header does not have a
Length field, so this special handling does not apply - the second octet
should be treated as opaque data, and the header length is always 8
octets.

Bug: 11368
Change-Id: I28fcd66d96f58a5959bb669caf4244afaca9e67e
Reviewed-on: https://code.wireshark.org/review/10231
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-08-29 17:26:52 +00:00
Alexis La Goutte 51e77b6335 CBOR: fix no previous prototype for proto_reg*_cbor [-Wmissing-prototypes]
Change-Id: I20476046fc2338484ab85757cad7b19f4e41e4be
Reviewed-on: https://code.wireshark.org/review/10283
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-08-29 12:31:56 +00:00
Jeffrey Smith 4ebf5b85e0 bootp/dhcp: fix Alcatel suboption detection bug
Change-Id: I4a4222f3f30bf8e996770295756dd206b5ce101b
Reviewed-on: https://code.wireshark.org/review/10297
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-29 12:30:57 +00:00
Guy Harris d76718651b Get rid of trailing blanks.
Change-Id: I0b705c924464dcc4987ed0e7c67b106b2b648dce
Reviewed-on: https://code.wireshark.org/review/10289
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-28 19:49:48 +00:00
Guy Harris da266af710 Don't check the radio information when testing for an HT Control header.
I now read 8.2.4.1.10 "Order field" in 802.11-2012 as saying that, in
management and QoS data frames, the Order bit shouldn't be set for
non-HT, non-VHT frames, so we can just test it for those frame types
without bothering to check the radio metadata to see if the frame is an
HT or VHT frame.

This handles cases where the radio metadata isn't complete, e.g. an HT
frame with a radiotap header but no MCS field.

Handle this for *all* QoS data frames when capturing.

Get rid of the "fixed-length link-layer header" stuff; it's not being
used.

Fix a case where we're appending text to a tree item without a space
separating it from the previous text.

Bug: 11351
Change-Id: I980f5b7509603b0c22c297fddc19434c08817913
Reviewed-on: https://code.wireshark.org/review/10288
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-28 19:46:41 +00:00
Pascal Quantin c04d54fbd4 Preparation Host Flows: make ICMP(v6) code and type retrieval more robust
Do not retrieve type and code base on the info column content.
Instead store type and code in pinfo structure and retrieve them in sequence analysis tap.

Change-Id: I71cd505d7faf713c2372731495d47b45928a41f8
Reviewed-on: https://code.wireshark.org/review/10280
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Artho <pascalartho@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-28 18:54:34 +00:00
Alexis La Goutte a7f22aa798 ISAKMP: Add new CHACHA20/POLY1305 Transform Types Values (RFC7634)
From IANA ikev2-parameters (2015-08-24)

Change-Id: I02bfd9a0ffc9f863f4d266fcc56cd707c3e71725
Reviewed-on: https://code.wireshark.org/review/10282
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-28 13:59:15 +00:00
Gerald Combs f19a173a84 Speed up column sorting.
The GTK+ UI sequentially dissects and caches column strings for all rows
before sorting a column. Do the same in the Qt UI, which can improve
performance considerably.

Don't colorize packets when sorting in the Qt UI unless it's necessary.

When sorting in the Qt UI, let the user cancel the initial packet
dissection.  Note that we'll need to replace std::sort in order to
cancel out of sorting.

Use a pre-allocated and pre-compiled GRexex when we prime columns. Note
that we probably shouldn't parse a regular expression there.

Cache the last result of proto_registrar_get_byname.

Note performance hot spots elsewhere in the code.

To do:

GeoIP in packet-ip.c is pretty slow.

Bug: 11467
Change-Id: Ib34038fee08ef0319261faeffc4eca01e52f4bd3
Reviewed-on: https://code.wireshark.org/review/10275
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-08-28 02:54:20 +00:00
Michael Mann 30c2f23f05 Eliminate proto_tree_add_text from some dissectors.
Change-Id: I066b70cfd58f5fb3ffbcb2e238416747d9e7dd57
Reviewed-on: https://code.wireshark.org/review/10269
Reviewed-by: Michael Mann <mmann78@netscape.net>
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-08-27 19:29:31 +00:00
Didier Arenzana e3a4188759 RADIUS: Validation of response authenticators
This patch enables validation of response authenticator messages when
the shared secret is known.
The validation can be activated in the preferences.
It implements the validation protocol described in RFC 2865 page 16: Response Authenticator.
When an authenticator is invalid, the information is added in the header information.
It adds two flags for the display filter : radius.authenticator.valid and
radius.authenticator.invalid: since verification is not always possible we use
two flags to determine if the verification has been made or not, in the same way as
udp and tcp checksum validation is implemented.
The Authenticator field becomes a tree, and the value of the flags are visible in
this tree.

Change-Id: I33a664f2265c6248e106cee7904c754089d50445
Reviewed-on: https://code.wireshark.org/review/10216
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-08-27 11:00:06 +00:00
Alexis La Goutte 2e1fa634c6 Lemon grammar: fix indent (use tabs)
Change-Id: I6fa38d5d85b25ac6c55fcfa67d6c8dba8482cc8c
Reviewed-on: https://code.wireshark.org/review/10266
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-08-27 04:35:23 +00:00
Michael Mann 0af048b7e4 Remove calls of tvb_ensure_length_remaining.
The remaining calls seem to fall into 3 categories:
1. passing it to tvb_find_line_end when -1 (for length) will do.
2. duplicating the checking of tvb_reported_length_remaining, which is already in use near the tvb_ensure_length_remaining call.
3. Those that (probably) need tvb_ensure_capture_length_remaining

Change-Id: I1e77695251e055644bcbbb89f3c181c65d1671ca
Reviewed-on: https://code.wireshark.org/review/10268
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-08-27 04:34:10 +00:00
Martin Kaiser 8ad5611750 sv: remove some unnecessary checks
http://personal.strath.ac.uk/robert.c.atkinson/papers/sgms2011.pdf
implies that appid, length and the two reserved fields are mandatory
just try to dissect them, don't check if there's enough bytes remaining

correct a typo while at it

Change-Id: I09a315fc2c70161af527dca5661f877e09b63ff6
Reviewed-on: https://code.wireshark.org/review/10273
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-08-26 20:57:09 +00:00
Jeffrey Smith bc4487a6fc bootp/dhcp: tighten check for Alcatel extensions
The check for Alcatel extensions in bootp/dhcp packets is very weak,
resulting in some false positives.  Then when trying to parse the
suboptions, the result is an error on the packet.

This change eliminates some false positives by adding a test that the
vendor-specific option contents match the encapsulated format described
in section 8.4 of RFC2132.

Change-Id: Ie4188ff900426c2d80a5694fbba5c88385625a61
Reviewed-on: https://code.wireshark.org/review/10267
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-26 17:24:01 +00:00
tkc 8b4ff246b5 ieee80211: Qos Control bit4 handling: Make the default case as EOSP, to handle TDLS Packets.
When parsing TDLS direct link packets the ToDS: 0 and FromDS:0
so the wireshark treats the 4th bit in QoS Control as "bit4", but it
should be treated as EOSP.

So changed the default case to EOSP and only when TODS is set
treat it as "bit4".

Change-Id: Ie2a73320dc9921aed4547e32836e6cd7d89ef109
Reviewed-on: https://code.wireshark.org/review/10250
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-26 11:51:49 +00:00
Alexis La Goutte bd218897c4 Camel: fix indent (use 2 spaces)
Change-Id: I0e8047fca7f24e60e4db8ad77254bcff5f8d6651
Reviewed-on: https://code.wireshark.org/review/10257
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-26 06:58:50 +00:00
João Valverde 6b41d2c202 Do not treat all unknown IP protocols as unknown IPv6 extension headers
Change-Id: I229260ce668b60a9756cd3f2e343c278ae27c211
Bug: 9996
Reviewed-on: https://code.wireshark.org/review/10196
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-08-26 06:13:06 +00:00
Guy Harris 5e45269bf6 Explain why the MSDU length field in an A-MSDU is big-endian.
Change-Id: I4a1cfd09395860348d71e9f4c86b6343cfdcd02a
Reviewed-on: https://code.wireshark.org/review/10262
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-25 23:57:10 +00:00
Guy Harris 4fe661da81 Get subset TVBs correctly.
If you know the actual data length, use tvb_new_subset_length(); it will
use that as the *reported* length, which is how it *should* be used, and
will calculate the *captured* length for you as appropriate.

Change-Id: I86dde999f59fdfec58b118729b7b881737983033
Reviewed-on: https://code.wireshark.org/review/10260
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-25 22:40:46 +00:00
Pascal Quantin 0e952e6920 SIGCOMP: fix sigcomp.copying_bytes_literally field
Change-Id: Ib1baa3437579a413899aaba5dd8d31982cda1b0d
Reviewed-on: https://code.wireshark.org/review/10258
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-25 18:02:08 +00:00
Michael Mann 0c291f9224 Eliminate proto_tree_add_text from packet-sigcomp.c
Some other cleanup noted by the check* scripts.

Change-Id: I14d7bfa81c689fff00fc82e966d50d4ae9f0988d
Reviewed-on: https://code.wireshark.org/review/10254
Reviewed-by: Michael Mann <mmann78@netscape.net>
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-08-25 16:07:23 +00:00
João Valverde 571f254ba8 Replace "IPv6 header length" with the more correct "payload length"
Change-Id: I3e667ba2e3ac49ce99e7a2035d9ff604fd7cbcca
Reviewed-on: https://code.wireshark.org/review/10205
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-25 10:57:49 +00:00
AndersBroman 31bf40eacf [Camel] The tags used in EstablishTemporaryConnectionArg differs in V2 and
V3 versions of Camel.
Add ASN1 code for EstablishTemporaryConnectionArgV2

Bug: 11466

Change-Id: I0dbb9c83e520c269dd567f3c3bc34c99c9aa5e15
Reviewed-on: https://code.wireshark.org/review/10249
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-25 10:54:10 +00:00
João Valverde 2af57832b6 Add more validity checks to the IPv6 dissector
Check for IP version and header size

Change-Id: I69102dda4e0e91ac1617d9a48fe9b0bab26aa9fe
Reviewed-on: https://code.wireshark.org/review/10218
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-25 07:35:59 +00:00
Richard Sharpe edeaae04d9 Remove the search back up the proto tree for the capture frequency that was
being used to determine if we are dissecting 802.11ad in several places.

Since we now have a macro for testing that and the frequency is in the phdr
we really should use that. This also prevents problems during display filter
execution with respect to fields that are only present for 802.11ad.

Change-Id: Id04a31c15b04378b6b0f056baa1f37d94a65b71c
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-on: https://code.wireshark.org/review/10234
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-25 02:15:23 +00:00
Guy Harris 4ba522537a Point to GitHub for the pcapng specification.
Change-Id: I33faa41e8b0f36ee49d29fe391feafd94d0a7e80
Reviewed-on: https://code.wireshark.org/review/10245
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-25 01:47:26 +00:00
Jeff Morriss 662f4b2f49 Use one variable that was set but not previously used and delete another.
Change-Id: I6bd7a16e3ea97659a0007edfd9f90dbd2060e443
Reviewed-on: https://code.wireshark.org/review/10244
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-08-25 00:28:16 +00:00
Guy Harris b16cca4714 Some beamforming stuff from 802.11ac.
Extracted from Joerg Mayer's Ixia-derived patch to 1.12 in bug 11464.
Most of the changes there are already in the trunk.

Change-Id: I90ba04e145ffb2b164810320e3510a5bed847ed4
Ping-Bug: 11464
Reviewed-on: https://code.wireshark.org/review/10243
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-24 22:17:25 +00:00
João Valverde d7e3076c90 IPv6 RPL: "cmprI" should be "cumprE"
Bug: 10560
Change-Id: I7cf9fb8ad39d128ed375abb8703937be8e3795b3
Reviewed-on: https://code.wireshark.org/review/10228
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-24 11:48:55 +00:00
João Valverde bc0d8d18a6 Remove space from field description for consistency
Change-Id: I74b0be1724d0754b7d1b724e177d44c4894d0e6b
Reviewed-on: https://code.wireshark.org/review/10198
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-24 10:57:17 +00:00
Martin Kaiser a5b5c5a850 fc: don't THROW() an exception from a dissector
bring up an expert info and exit

Change-Id: Icbbafb8b7187a66d3ddc9a674502ad728b7c4ffc
Reviewed-on: https://code.wireshark.org/review/10222
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-24 10:48:35 +00:00
Martin Kaiser 517f4d4ffd cigi: don't THROW() an exception from a dissector
stop the dissection instead and bring up an expert info in the main function

Change-Id: I391bf821422ef8e6ae01849c88096e90e4295920
Reviewed-on: https://code.wireshark.org/review/10221
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-24 10:48:13 +00:00
AndersBroman 7c0b8bda7d [Q.2931] Don't use BASE_EXT_STRING for a value_string, fixes the test
suite

** (process:10080): WARNING **: Invalid value_string_ext ptr for: q2931.atm_identifier

Change-Id: Id4ec745629af7774e480e91fba01ed8da5aac1bd
Reviewed-on: https://code.wireshark.org/review/10227
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-24 10:45:50 +00:00
Stig Bjørlykke 079dd03fde Fixed typo in hfinfo_remove_from_gpa_name_map
Change-Id: Ic80fbe9397e50c41fa01ef9147319dd2ac0c0b91
Reviewed-on: https://code.wireshark.org/review/10226
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-24 09:53:23 +00:00
Pascal Quantin a2d8514456 ip: fix ip.hdr_len filter value when the header length is too small
Change-Id: Ia510d0f4e496ef0577856bf633d6ca19f0b3e1cb
Reviewed-on: https://code.wireshark.org/review/10210
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-24 09:19:32 +00:00
Michael Mann bd553f6ee2 Eliminate proto_tree_add_text from packet-q931.c and packet-q2931.c
Change-Id: I681b05755429fd7420c423ff88e5a4d3dc95db64
Reviewed-on: https://code.wireshark.org/review/10219
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-24 07:56:08 +00:00
João Valverde 47c9aa4673 Check if IPv6 payload length exceeds framing byte length
Bug: 11418
Change-Id: Icbb980fda4f7addf52db59bc4f2aa27fc8f85837
Reviewed-on: https://code.wireshark.org/review/10176
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-24 07:31:48 +00:00
Stig Bjørlykke 216f06b299 Lua: Support deregister ProtoField with existing abbrev
Change-Id: Icb06792bb2662dcee6e5495359ceef420a5b4498
Reviewed-on: https://code.wireshark.org/review/10212
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-24 06:53:24 +00:00
Michael Mann 984f87aba7 Eliminate proto_tree_add_text from some dissectors
Change-Id: Id710ab10093227b27ef5f18b0d2960e31d0b95a9
Reviewed-on: https://code.wireshark.org/review/10200
Reviewed-by: Michael Mann <mmann78@netscape.net>
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-08-24 06:24:46 +00:00
Pascal Quantin ce38df527f CBOR: get rid of INFINITY and NAN defines
This triggers an "overflow in constant arithmetic" warning with MSVC2013

Change-Id: Ie3b076019c4722857c8e57f8568a0cb124fd13ad
Reviewed-on: https://code.wireshark.org/review/10217
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-23 19:51:59 +00:00
Guy Harris 4f68c52eda See if this makes MSVC happy.
It's complaining about an "overflow in constant arithmetic".  Neither
INFINITY nor NAN are specified by C90; C99 specifies that they are both
floats.  Until recently, Microsoft had no interest in C99; if the
version we're using supports C99's INFINITY and NAN, it should be OK to
assign them to a variable (no "arithmetic" involved), so I'm guessing
that the "arithmetic" in question is the use of conditional operators ?
and :, so I'm writing it as an if statement instead.

Change-Id: I532b9b5943be32e0897e4f03ac4e625ac41ee63b
Reviewed-on: https://code.wireshark.org/review/10215
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-23 18:38:46 +00:00
Stig Bjørlykke 6b9a628e54 Lua: remove unneeded todo comments
Change-Id: I2591a0f21092a251e6fc4393e97ae0594318dfdf
Reviewed-on: https://code.wireshark.org/review/10214
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-23 18:38:13 +00:00
Guy Harris fd68385a2b Use G_GINT64_MODIFIER, not l, in format strings for 64-bit integers.
64-bit integers are *not* guaranteed to be longs and, in fact, are *not*
longs on ILP32 platforms such as 32-bit UN*Xes and 32-bit Windows and on
LLP64 platforms such as 64-bit Windows.

Change-Id: I6408778f638bb6cea52ffb64be39ea26c9b2ee64
Reviewed-on: https://code.wireshark.org/review/10213
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-23 18:21:07 +00:00
Guy Harris a451c603df Rename variable to avoid collisions with math.h's exp().
Spell out "mantissa" while we're at it.

Change-Id: I47ddb9882f45ef58a6f7101818683e68bc54983b
Reviewed-on: https://code.wireshark.org/review/10211
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-23 18:13:52 +00:00
Hauke Mehrtens 0b03543cbb CBOR: add Concise Binary Object Representation (RFC 7049) dissector
This adds a dissector Concise Binary Object Representation (CBOR) (RFC 7049).
CBOR is a binary data format designed for implementations with small
code size as used in the IoT. It uses a structure similar to JSON, but
encodes the data in binary format. This is used on top of CoAP for
example.

Change-Id: I9d7b7d4f7609c899bfc68250cdfebd5dc64e0402
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-on: https://code.wireshark.org/review/9848
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-23 16:51:18 +00:00
Peter Wu 3ce60ed112 dtls: do not try to add a zero-length fragment
fragment_add does not like adding zero-length fragments, it causes a
zero-length memcpy to NULL.

According to RFC 6347, fragment_offset=0 and fragment_length=length is
an unfragmented message, so fragment>0 and fragment_length=length=0 is a
fragmented message.

An empty fragment does not extend a previous message, so ignore it.
Such fragments are produced by at least GnuTLS 3.3.7[1], so raise a
warning instead of an error.

Caught by ubsan:

    epan/tvbuff.c:783:10: runtime error: null pointer passed as argument 1, which is declared to never be null

    #0 0x7f5319f6ed64 in tvb_memcpy epan/tvbuff.c:783
    ...
    #13 0x7f5319f27e2b in fragment_add epan/reassemble.c:1394
    #14 0x7f531a5c70a4 in dissect_dtls_handshake epan/dissectors/packet-dtls.c:1257

 [1]: http://comments.gmane.org/gmane.network.gnutls.general/3582

Change-Id: I70bf16d2fb64793d0deaabe612147e238b743b2e
Ping-Bug: 11358
Reviewed-on: https://code.wireshark.org/review/9689
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-08-23 16:48:04 +00:00
João Valverde 3703b4e324 Fix ip_try_dissect() boolean return
If dissector_try_heuristic() succeeds return TRUE and vice-versa.

Change-Id: I3fb2595604f2f3981468473d0a966efe7387745e
Reviewed-on: https://code.wireshark.org/review/10199
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-23 16:42:38 +00:00
Robert Grange cc7afd29d8 packet-mq: Add new Const/Def for WMQ800 FP3
Add new Const/Def for WMQ800 FP3
Improve Detection of EBCDIC String in MQCONN_REPLY
Add Value in comments

Change-Id: I695a3afa64fee7f22918f68540901c97dfd38464
Reviewed-on: https://code.wireshark.org/review/10012
Reviewed-by: Robert Grange <robionekenobi@bluewin.ch>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-23 16:38:17 +00:00
Gerald Combs 89ff46e630 [Automatic update for 2015-08-23]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I3726aa80e1e4d23301500fca326ae2b952bf38f6
Reviewed-on: https://code.wireshark.org/review/10208
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-23 15:06:52 +00:00
Alexis La Goutte f95d459ccc OSPF: Fix indent (use 4 spaces)
Change-Id: I4bd3c4a983b12e8fa053c2362f80dd723b9de572
Reviewed-on: https://code.wireshark.org/review/10191
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-23 13:25:32 +00:00
Guy Harris ebca184be0 Call the MCS field by its correct name.
Yes, it *should* have been called "HT", but hindsight is always 20-20.

If you want less confusingly named information, look at what the "802.11
radio information" dissector puts into the protocol tree; the radiotap
dissection is for people debugging radiotap implementations or looking
for vendor-specific information that's not (yet) put into the generic
802.11 radio information.

Change-Id: If6e97f82595a6f11a45e34d5a52e70e9ca686d7c
Reviewed-on: https://code.wireshark.org/review/10202
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-22 22:35:31 +00:00
Joerg Mayer 5a7f574cbd Fix two bugs
1) Introduced by me in commit c4fe7129d8
     where I didn't honor the "print lsa header only" flag properly for
     data highlighting
  2) Introduced in 2001 with commit dd1b7eafaf
     which moved offset increasing into an "if (tree)" statement with code
     after the if statement continuing to work with offset.
Also make display of v2 and v3 LSAs the same again (forgot one case in
previous commit.

bug:11461
Change-Id: I1986c19842f1fa9c8a6d0a7c9a79c64939eeb9d0
Reviewed-on: https://code.wireshark.org/review/10192
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-08-22 12:21:48 +00:00
João Valverde 532070b4e7 Add support for IPv6 stats tree statistics
Also add support for alphabetizing stat tree items as the addition of IPv6 stats tree makes it more obvious its needed.

Change-Id: I8b319ceac805ce7e3a1fd59f92c1c6fe2a54d3de
Reviewed-on: https://code.wireshark.org/review/10062
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-22 08:30:52 +00:00
Joerg Mayer 953cdd42a2 Print two reserved elements as reserved instead of skipping them
Change-Id: Ic91e07df4881dfff0f0dd1c4809903cbdee8ef60
Reviewed-on: https://code.wireshark.org/review/10190
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-08-22 04:34:44 +00:00
Joerg Mayer c4fe7129d8 Small cleanups and improvements
Show the LSA type and length in the summary line
  Improve a message to make it clear when we are talking about a LLS TLV
  Add an expert item for LLS bit set but data block missing
  PI_MALFORMED is an error not a warning.

Change-Id: I516c2a2f0c27fcf101671527d4e4f018e17d3025
Reviewed-on: https://code.wireshark.org/review/10189
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-08-22 04:18:37 +00:00
Gerald Combs ee80be6dac Add the display filter macros dialog.
Add some missing functionality to UatDialog.

Remove what appears to be unused dfilter macro code.

Change-Id: I8a8d6358523f24d5ddfe953d7741fe9af25d98eb
Reviewed-on: https://code.wireshark.org/review/10187
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-08-22 01:51:04 +00:00
Joerg Mayer 97014f6d6b OSPF database packets and OSPF hellos in DC mode are unicast. At
least Cisco sends out these packets with a TTL of 1.

Change-Id: I9ef0cd486d200a768329cfb758b87e20e3456663
Reviewed-on: https://code.wireshark.org/review/10188
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-08-22 01:50:26 +00:00
Hadriel Kaplan d32c3dab46 Lua: check sscanf return value
Wslua's Int64.fromhex() and UInt64.fromhex() need to check the sscanf return
value. Found by coverity (CID 1191368 &1191369).

Change-Id: I67fba027e18341d429787515f94c794573dc41c2
Reviewed-on: https://code.wireshark.org/review/10183
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-21 17:42:32 +00:00
João Valverde 69ec4a5530 Add "ip.version" field to bogus IP for filter matching
Change-Id: Ibb05b8742e41c1b16c1335ad97af99324ab95223
Reviewed-on: https://code.wireshark.org/review/10175
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: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-21 16:06:17 +00:00
Bill Parker f8712aeeda [Kerberos] Call to 'fseek()' without a check for a return value < 0,
indicating failure.

Bug: 11056

Change-Id: Iaa6b7ca07626b78c77e3c1507726ec579764a582
Reviewed-on: https://code.wireshark.org/review/10181
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-21 15:10:38 +00:00
Luke Mewburn 856bab63e6 LWM: fix compilation without libgcrypt
Add HAVE_LIBGCRYPT compilation guards.
Move gcrypt-related variables into the scope they're used.

Change-Id: I81a2c8a54514fb51de53640fa8eceeddb2bf24d9
Reviewed-on: https://code.wireshark.org/review/10118
Reviewed-by: Michael Mann <mmann78@netscape.net>
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-08-21 14:24:44 +00:00
Dave Rigby b5ca69b1a6 Couchbase: dissect sub-document commands
Add support for dissecting Couchbase sub-document commands (those
which operate on a subset of a whole document).

Example pcap file:
  https://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=get&target=couchbase_subdoc_multi.pcap

Change-Id: I5394a6f86c036ebd339574bac4e52f7d0821e4bf
Reviewed-on: https://code.wireshark.org/review/10151
Reviewed-by: Michael Mann <mmann78@netscape.net>
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-08-21 14:23:51 +00:00
João Valverde d097968285 Make IPv6 extension header protocol names uniform and consistent with RFC 2460
Example from RFC 2460 (page 7):

  IPv6 header
  Hop-by-Hop Options header
  Destination Options header (note 1)
  Routing header
  Fragment header
  Authentication header (note 2)
  Encapsulating Security Payload header (note 2)
  Destination Options header (note 3)

Change-Id: I03c1ebedf581f71047b303856052609574110c61
Reviewed-on: https://code.wireshark.org/review/10173
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-21 12:41:52 +00:00
AndersBroman 30ce20da30 [Expert] Enhance error output to identify the duplicated field.
Change-Id: Ie38f51e2fa0f846dbcfd7a19f29eac1bd07cffbc
Reviewed-on: https://code.wireshark.org/review/10179
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-21 11:57:25 +00:00
Peter Lemenkov f73e1c2956 Allow redefining all ports for RADIUS
RADIUS configuration sometimes uses more ports - for example, one for
authentication, another one for accounting. Sometimes it uses the entire
port ranges. In case of FreeRADIUS 2.x.x server it might look like this:

...
listen {
        type = auth
        ipaddr = *
        port = 13812
}
listen {
        type = acct
        ipaddr = *
        port = 13813
}
...

Unfortunately we allow only one port to be redefined, not more. So it
forces a person who's analyzing a traffic from such a RADIUS server
manually select "Decode as" every time for each port.

It was requested at least once to lift this limitation:

* https://ask.wireshark.org/questions/2189/decode-multiple-ports-as-radius

So let's fix it!

With this commit it's possible to set a port ranges for RADIUS dissector
to handle. An example (default) configuration looks like (see
~/.wireshark/preferences):

radius.ports: 1645,1646,1700,1812,1813,3799

Old "alternate_port" preference is marked as obsolete. It won't be shown
to a user but it will still be used if exists (remained from a previous
installations).

*Ver. 2*:
Old alternate_port value is copied to the ports range, thus making
transition even more smooth.

Change-Id: Ibdd6f4f9fa1e0ac186147cec380bbfc62d509b17
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://code.wireshark.org/review/10015
Petri-Dish: Anders Broman <a.broman58@gmail.com>
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>
2015-08-21 11:43:11 +00:00
Timo Warns 7d599251f6 SSL: refine KEX handling and fix _anon KEX dissecting
Dissecting client and server KEX messages requires to precisely distinguish KEX
algos. For example, Server KEX for DH_anon do not contain a signature, while
DHE_DSS and DHE_RSA do. The patch introduces KEX distinction with full
precision and fixes dissecting _anon KEX messages.

Change-Id: I0bcd5e2bf899ba9cac79476d5b7a1ffb3accf0db
Reviewed-on: https://code.wireshark.org/review/9836
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-08-21 08:57:16 +00:00
Pascal Quantin eeafab579e file-pcapng: always set pinfo->fd->num before calling next layer dissectors/file-pcapng
Also fix an off by 1 error for EPB case

Change-Id: I895d82a58ec02c577dcaa67a97d456b42460b947
Reviewed-on: https://code.wireshark.org/review/10149
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-21 08:34:28 +00:00
Alexis La Goutte 5e3388f85d GSM_map: Fix indent (use 2 spaces) and add modelines
Change-Id: I1549eb55e1fa87c46e2493c37f3ed352970b794b
Reviewed-on: https://code.wireshark.org/review/10168
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-21 07:35:15 +00:00
Paul Emge 805578636b Fix bug with MVRP dissection where only one message was dissected.
Fix whitespace and replace tvb_captured_length with tvb_reported_length

Change-Id: I3952e7a1ac00b68e6f6eb1283977bc6299b0baaf
Reviewed-on: https://code.wireshark.org/review/9900
Reviewed-by: Michael Mann <mmann78@netscape.net>
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-08-21 07:25:07 +00:00
Alexis La Goutte aec8e932a5 SPDY: fix no previous prototype for 'dissect_spdy_heur' [-Wmissing-prototypes]
Change-Id: Ife5f44a333227b1df3d2377d12dbec65a4b4d5c3
Reviewed-on: https://code.wireshark.org/review/10164
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-21 04:58:13 +00:00
Alexis La Goutte 8f0fc4ba77 GSM/ANSI/CAMEL...: fix no previous prototype for '*_stat_init' [-Wmissing-prototypes]
Change-Id: I0aedefbb77899ebceac7fb08249faf47964d785b
Reviewed-on: https://code.wireshark.org/review/10163
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-21 04:57:30 +00:00
Jeff Morriss b4762a0434 Generate Diameter's expert info's even when there's no tree so that they show
up in the Expert Infos dialog.

Push the if(tree) check down into the basic type dissectors since we can't
generate/fill the label (which won't be used anyway) when we're not building
the tree (since the proto_item will be faked/NULL).

Change-Id: Ie4f1f6856cfad0dabc7c58cdee2c16c8fc032c6d
Reviewed-on: https://code.wireshark.org/review/10001
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-21 04:53:04 +00:00
João Valverde d9395b7e34 Rename 'ip_next_header_dissector_table' to 'ipv6_next_header_dissector_table' in IPv6 dissector
Provides better readability, the dissector table is only used for IPv6
extension headers.

Change-Id: I87d877a89c6465d4475f2f0a40636ccd1b6cdd92
Reviewed-on: https://code.wireshark.org/review/10174
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-21 03:08:23 +00:00
Gerald Combs 2ed3d91b45 Add the WLAN statistics dialog.
Instead of splitting the stats into two lists as with the GTK+ UI, add
everything to an expandable tree. This allows viewing nodes on more than
one network.

Rename the top-level Bluetooth menu item to Wireless and put the WLAN
stats dialog there.

The Qt UI matches SSIDs (WlanNetworkTreeWidgetItem::isMatch) a bit
differently than the GTK+ UI. Try to make the logic as plain as possible
since we'll likely have to update it in the future.

The addition of a custom BSSID address types means that we can't assume
that everything is AT_ETHER. Add routines for checking for broadcast
BSSIDs and comparing only the data portions of addresses.

Move PercentBarDelegate into its own module. Use it in
WlanStatisticsDialog.

Change-Id: Ie4214eb00671a890871380c4a07213ebfb7585c6
Reviewed-on: https://code.wireshark.org/review/10171
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-20 23:12:37 +00:00
Alexis La Goutte 0f9bbbc6f7 BOOTP: fix indent (use tab)
Change-Id: I32ea4d1b9cd8aa351cbdb2bab0642e4ed0c191fb
Reviewed-on: https://code.wireshark.org/review/10169
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-20 21:36:40 +00:00
Alexis La Goutte b07ae6c2b2 ANSI: Add modelines
Change-Id: I641a9525ec5a6315cc4a2d97506a885605b3504b
Reviewed-on: https://code.wireshark.org/review/10170
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-20 21:36:04 +00:00
Alexis La Goutte 4dd49c571d Camel: Fix indent (use 2 spaces) and add modelines
Change-Id: I6fe835e78e58faabd5cfeeb84e39793b48d3df25
Reviewed-on: https://code.wireshark.org/review/10167
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-20 21:33:09 +00:00
Gerald Combs 36a74cb13a Tap parameter and stats dialog fixups.
If we run into an error when trying to register a tap listener, return
instead of tapping packets. This should fix some (but likely not all)
double frees found by Stig. For now close each statistics dialog if we
find an error. Note that we might want to keep them open instead.

Add checks and cleanups to some of the stats table free routines.

Call fillTree once in TapParameterDialog's constructor instead of each
time it's shown. Make fillTree a slot which lets us use a delay timer so
that the dialog is visible when we retap packets.

Change-Id: Id49f2f2a99bc8e5b1d32990024986b3c8b1abe24
Reviewed-on: https://code.wireshark.org/review/10153
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-20 18:07:02 +00:00
João Valverde 829c64864c Check for IP version errors in dissect_ip()
Change-Id: I7db4ed54be820e5667e1e93880013cc7abf95256
Reviewed-on: https://code.wireshark.org/review/10064
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-20 14:28:35 +00:00
João Valverde 8a7186791c UDP jumbogram expert info fix
Change-Id: Ifa6170622bc8331097bc3fe9c567c97ce826c340
Reviewed-on: https://code.wireshark.org/review/10140
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-08-20 11:44:21 +00:00
Pascal Quantin bc8b94d571 file-pcapng: differentiate captured length and reported length when calling next dissector and catch bound errors
Otherwise dissection will fail when analyzing a capture with a snap length set

Change-Id: If6714364efffdd1fbf88c947743929a71f75c663
Reviewed-on: https://code.wireshark.org/review/10135
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-20 11:43:56 +00:00
Pascal Quantin ff78d0ad03 file-pcap: differentiate captured length and reported length when calling next dissector and catch bound errors
Otherwise dissection will fail when analyzing a capture with a snap length set

Change-Id: I764f48c624d0cc411b04ee62f8ecccaf6abb6f0c
Reviewed-on: https://code.wireshark.org/review/10134
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-20 11:43:43 +00:00
Pascal Quantin 2046368574 file-pcapng: fix dissection of options in blocks
- fix the loop logic
- flags in EPB include link-layer-dependent errors

Change-Id: Iae0b4869b556abbf3c14f3b865d0f23cee182c84
Reviewed-on: https://code.wireshark.org/review/10132
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-20 10:04:13 +00:00
Pascal Quantin 8a8622298b PNRP: capitalize protocol name
Change-Id: I1cf5d22e12241ef330319ef8fdf176becdefe300
Reviewed-on: https://code.wireshark.org/review/10131
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-19 21:07:32 +00:00
Pascal Quantin d9dd323d4f file-pcapng: remove useless hf_pcapng_timestamp_data entry
Change-Id: I82b2d4e4b0be8179103b827e0d11a0d8b10e1374
Reviewed-on: https://code.wireshark.org/review/10133
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-19 21:00:37 +00:00
Pascal Quantin 9380d066e2 ixiatrailer: remove execute bit
Change-Id: I6cd8f98518b21e935b329f5470b706ec059c91eb
Reviewed-on: https://code.wireshark.org/review/10129
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-19 16:56:33 +00:00
Alexis La Goutte d05b6f9682 Bluetooth: ATT: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Found also by Coverity (CID 1316607)

Change-Id: Ib6a4437fd24b51a8aa87d4bcdb5ee2a1dc43dae3
Reviewed-on: https://code.wireshark.org/review/10124
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-08-19 13:01:46 +00:00
Alexis La Goutte 03b78a0144 Bluetooth: ATT: Fix code will never be executed [-Wunreachable-code]
Change-Id: I5048da723ddecde931956ed1af77438f823c1990
Reviewed-on: https://code.wireshark.org/review/10125
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2015-08-19 13:01:20 +00:00
Alexis La Goutte d470ff1238 btsnoop: Missing break in switch (CID 1316606)
Change-Id: I105da06b7161a5b5f0cc2b4ce5303c4d5c989280
Reviewed-on: https://code.wireshark.org/review/10126
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-08-19 13:00:55 +00:00
Stig Bjørlykke fa40025a7e Recompile dfilter for all tap listeners when fields changed
When fields have changed the compiled display filter may be invalid
or need a recompile to be valid.

Filters which are not valid after a recompile is set to a filter
matching no packets (frame.number == 0) to indicate that this does
no longer match anything.  We should probably have a better filter
matching no packet for this purpose.

Change-Id: Id27efa9f46e77e20df50d7366f26d5cada186f93
Reviewed-on: https://code.wireshark.org/review/10123
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-19 08:55:19 +00:00
João Valverde e328fa5a3e IPv6: Minor variable name fix
Change-Id: Iaef41fa2a212577f1fbdf7705eca65a928faa8c3
Reviewed-on: https://code.wireshark.org/review/10122
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-19 08:08:27 +00:00
Andrew Chernyh 3268023b87 Added TDMoP protocol dissector
Bug: 11340
Change-Id: I04408db376718c7a5392f9521d7d75d0481ec30e
Reviewed-on: https://code.wireshark.org/review/9514
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-19 04:17:41 +00:00
João Valverde d5caba6df0 [IPv6] Make "ip.version" field pretty(er)
Change-Id: I1e32f666118e36f48edcc1678d75db3ca3f62776
Reviewed-on: https://code.wireshark.org/review/10075
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-19 01:45:15 +00:00
João Valverde c32c1f0608 IPv6 Jumbogram expert info cleanup
Change-Id: Ic06e50a30330758d6ed0b1b1d9ba0d7f74929a9a
Reviewed-on: https://code.wireshark.org/review/10111
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-19 01:35:57 +00:00
Luke Mewburn fc1b48f46b DVBCI: fix typo in comment
Change-Id: I0f6e57b7f16526e7c1b96fb8bd69c003c89b7f42
Reviewed-on: https://code.wireshark.org/review/10119
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-19 00:51:59 +00:00
Alexis La Goutte 6ed3e080e9 pcapng(file): fix duplicate break
Change-Id: Ife7170c050402ab94d368acc6c233714be764824
Reviewed-on: https://code.wireshark.org/review/10114
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-18 19:20:03 +00:00
Guy Harris 4abec47c05 Clean up handling of time stamps.
Use common code for all time stamps, so it's handled the same for the
Packet Block, Enhanced Packet Block, and Interface Statistics Block.

Show the high and low parts of the time stamp as fields; file dissectors
should show the raw file details.  Mark the calculated time stamp as
generated, as it's not the raw file data.

Get the 64-bit time stamp by shifting the high part left 32 bits and
ORing in the low part; no need to play games with unions and byte order

Change-Id: I19b2c3227a3ca1e93ec653f279136aa18687581f
Reviewed-on: https://code.wireshark.org/review/10116
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-18 19:17:56 +00:00
Guy Harris ea7cf08368 Cast away 64 -> 32 narrowing complaints.
"secs" in an nstime_t is a time_t; cast the calculated seconds portion
to time_t.

Change-Id: Ieaad4c18bb21384a5781f50eadd3a537b414a369
Reviewed-on: https://code.wireshark.org/review/10113
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-18 18:52:01 +00:00
Dario Lombardo 7a096c3844 Init values set (found by American Fuzzy Lop).
Change-Id: Iddd2b4a0ceb409db1afb1a412339134634de631c
Reviewed-on: https://code.wireshark.org/review/10104
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-18 18:29:58 +00:00
Guy Harris f49eb3745c Update comment.
Change-Id: I51e14a280ba898a321455168ac8ded1853f55e64
Reviewed-on: https://code.wireshark.org/review/10109
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-18 17:33:02 +00:00
AndersBroman a3c175a823 Add casts to passify buildboot.
Change-Id: I8aa4695f1f8dfdfc5bfcd4fb4f36e1b332581d5a
Reviewed-on: https://code.wireshark.org/review/10106
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 14:50:58 +00:00
Dario Lombardo db87e62298 pcap: add init value.
Found compiling with gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04).

Change-Id: I21bd3a5ab3365f0065c919aba7d6bd00b878d041
Reviewed-on: https://code.wireshark.org/review/10105
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-08-18 14:40:17 +00:00
Michal Labedzki da6f48dc06 Fix typo in makefile
Typo:
file.pcapng.c -> file-pcapng.c

Change-Id: I72c40fd086f1b68b69e950c065877b2733279a04
Reviewed-on: https://code.wireshark.org/review/10102
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-18 13:40:07 +00:00
Michal Labedzki 22364bdf88 File-format: BTSNOOP: Add option to dissect next layers
Show next layers of each packet.

Change-Id: I8c56eab969fef9a0a712b479dc2cdef6cc1578ae
Reviewed-on: https://code.wireshark.org/review/221
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 12:53:38 +00:00
Michal Labedzki dd57c6bf38 File-format: Add PCAP and PCAPNG dissectors
They have educational values and can be used to debugging some issues.
Now Wireshark can open three files (BTSNOOP, PCAP, PCAPNG)
in two modes: Capture (Traditional) and File-Format.

Change-Id: I833b2464d11864f170923dc989a1925d3d217943
Reviewed-on: https://code.wireshark.org/review/10089
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 12:52:03 +00:00
Michael Mann c05df9932c Add udp_dissect_pdus.
It works similar to tcp_dissect_pdus, but only works on a single packet.  Intended for protocols that go over TCP and UDP so that they can have a common dissection function.
Will of course, also work on UDP-only protocols with a fixed length header and size.

Used DNP3 as a guinea pig since "multiple PDU support" over UDP was just added.

Change-Id: Ib7af8eaf7102c96b4f8b5c1b891ae2d8f0886f9d
Reviewed-on: https://code.wireshark.org/review/10083
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 12:50:29 +00:00
Michal Labedzki db5b786e55 Bluetooth: Update Assign Numbers
+18 ATT attributes to be implemented (IPS 1.0 - 19 May 2015, etc.)

Change-Id: Ib30ea20fe9b32a4be842f01ad5b8e8ee081a14ff
Reviewed-on: https://code.wireshark.org/review/10095
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 12:42:42 +00:00
Michal Labedzki a50a49e527 Bluetooth: ATT: Add some remaining attributes
Add 14 attributes (not as easy as the previous),
there are still 19 + 3 (no idea for now [Valid Range, Report, IEEE 11073-20601
Regulatory Certification Data List]) attributes to be implemented (soon).

Change-Id: Iee5cde4673b62f93084923a592b11824c0683605
Reviewed-on: https://code.wireshark.org/review/10094
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 12:38:16 +00:00
Pascal Artho 9e72779636 Preparation Host Flows: Dissector Packet ICMP and ICMPv6
see https://code.wireshark.org/review/#/c/9976/

Change-Id: Ic301db4deea1a02b9e08c123b3e21e70817a2c85
Reviewed-on: https://code.wireshark.org/review/10097
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 08:47:20 +00:00
Martin Kaiser 4048ca0a27 rewrite the H1 dissector
* use the offset variable to keep track of where we are,
  remove the position variable
  (previously, offset remained 0 all the time...)
* use proto_tree_add_item()
* highlight the correct bytes for each field
* define a block type and block length instead of
  naming these fields differently for each block
* indent by 4 spaces

Change-Id: Ie0995e5fe6364605fd30020f171e51458844fa59
Reviewed-on: https://code.wireshark.org/review/10080
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-18 04:20:25 +00:00
Michael Mann acc0c14e2f Eliminate proto_tree_add_text from XMPP dissectors.
Change-Id: I32fdf085ef484d147d9f0b27c56efba41bb827bf
Reviewed-on: https://code.wireshark.org/review/10086
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 04:05:00 +00:00
Hadriel Kaplan 8fd719731b Lua: add FT_PROTOCOL as a ProtoField type
Bug: 11450
Change-Id: Ic77ddd193246c0202efcc9c11e61e8f6f85329c5
Reviewed-on: https://code.wireshark.org/review/10087
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-18 03:50:58 +00:00
Martin Kaiser 41cb3bdc54 h1: remove if (tree) checks, indent according to the modelines
Change-Id: I878aa23b5d718653b9039aeb94a0ece88c9c03cf
Reviewed-on: https://code.wireshark.org/review/10079
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-08-17 20:26:08 +00:00
Martin Kaiser c78d7c8aa8 h1: don't THROW() an exception from a dissector
leaving the parsing loop should be enough in this case...

Change-Id: Ic250961aeb4d3cfcd74ee8caacb59657c32444de
Reviewed-on: https://code.wireshark.org/review/10078
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-08-17 20:25:45 +00:00
Selvamegala 821ea20fda Add Decryption support for Lwmesh
Bug: 10783
Change-Id: Id598838f036b1f312791d9dddbf3767dcbfd1aee
Reviewed-on: https://code.wireshark.org/review/9937
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-08-17 16:00:43 +00:00
Alexis La Goutte 2eec7fec86 BPDU: Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I91cc96f92ae2e6b07144120d70f8db5b7ad45fce
Reviewed-on: https://code.wireshark.org/review/10070
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-17 15:05:02 +00:00
João Valverde 77193efb9e dissect_ip_heur(): Remove TODO (done)
Change-Id: I0c36179b63f5d60037de80badfea352c903c2525
Reviewed-on: https://code.wireshark.org/review/10065
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-17 05:58:33 +00:00
Michael Mann 9a6e36d281 Remove proto_tree_add_text from packet-xml.c
Required introducing packet_info* to xml_frame_t structure.

Change-Id: Ie777fe3bc8c7ea052d3441dd31e0631ce47324cb
Reviewed-on: https://code.wireshark.org/review/10063
Reviewed-by: Michael Mann <mmann78@netscape.net>
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-08-17 04:35:26 +00:00
Dario Lombardo af62264139 DNP3: add support for udp multi frame packets.
Bug: 11435
Change-Id: I1f3006a4276e8a95d028294ebb9635f71be0f75e
Reviewed-on: https://code.wireshark.org/review/10013
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-17 00:08:49 +00:00
Guy Harris 2ba0ea3722 Fix the conversion of milliseconds to seconds and nanoseconds.
1 millisecond = 1000000 nanoseconds, not 1000 nanoseconds, and
nstime->nsecs is nanoseconds, not microseconds.

Change-Id: I6925ff80f6443015f83ca00bad2a347d10eadd7c
Reviewed-on: https://code.wireshark.org/review/10060
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-16 19:34:50 +00:00
Petr Gotthard 8b8d37801c AMQP 1.0: Fix OSX build errors
packet-amqp.c:10660: warning: implicit conversion shortens 64-bit value into a 32-bit value
packet-amqp.c:10661: warning: implicit conversion shortens 64-bit value into a 32-bit value

Change-Id: Ic1c19edf10432dccb5fc4f3ea07defd45b9eef17
Reviewed-on: https://code.wireshark.org/review/10054
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-16 17:57:28 +00:00
ff 6f7811ed68 A new Early Allocation Request for draft-ietf-pce-lsp-setup-type and
draft-ietf-pce-segment-routing has been issued.  Reference:
https://mailarchive.ietf.org/arch/msg/pce/Zdsc0HHl1SLvpANRWhpLvIzJQyI
There are implementations out there that are using 5 as SR-ERO subobject
identifier (instead of 36 that will be assigned by IANA) and 27 as the
PATH-SETUP-TYPE TLV identifier (instead of 28 that will be assigned by
IANA).  This patch decodes both 5/36 as SR-ERO subobject and 27/28 as
PATH-SETUP-TYPE.  It is unlikely that IANA will re-assign code points 5
and 27 in the near future.

Change-Id: Ie2efa869344e4c1121f19f1ee3a71711d566a037
Signed-off-by: ff <francesco.fondelli@gmail.com>
Reviewed-on: https://code.wireshark.org/review/10057
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-16 17:29:15 +00:00
Gerald Combs c643cbfb81 Run abicheck commands at compile time.
The CMake dumpbabi targets collectively copy over 800 files. Do
that when when we build the actual targets instead of at configure
time. Hopefully this will speed up initial CMake runs.

Change-Id: I6e4d691e24c73ea05d638a0f897f570541c84e38
Reviewed-on: https://code.wireshark.org/review/10052
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-16 16:04:47 +00:00
Gerald Combs 8d1a5498fb [Automatic update for 2015-08-16]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Idb8a2cff075a1ffe5e3cd1d6f4d3fb1b6c357cdb
Reviewed-on: https://code.wireshark.org/review/10055
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-16 15:10:47 +00:00
Petr Gotthard b1d33db258 AMQP 1.0: Refactor to fix parsing of timestamps
Timestamps are currently dissected as integer numbers; two aspects need to
be recatored to correctly dissect timestamps:
 - the add_1_0_proto_item() function
 - protocol fields (hf_xxx) and the get_amqp_1_0_value_formatter()

(1)
The AMQP 1.0 dissector rely on the proto_tree_add_item. There is only one
invocation common for all datatypes (in add_1_0_proto_item), which cannot
pass any type-specific ENC_xxx specifiers and it cannot handle custom
datatypes like AMQP timestamp.

I propose to replace the add_1_0_proto_item() by type-specific dissectors that
will correctly set the ENC_xxx specifiers and handle exceptional cases like
the AMQP timestamp or the zero-length true/false datatypes.

(2)
The get_amqp_1_0_value_formatter implements a table-driven magic to select
alternate hf_xxx field based on the actual datatype. This however
 - defines alternate fields where the standard permits only one datatype
 - does not support fields that can contain any datatype ("*")
 - does not support FT_TIMESTAMP

I propose to make this mechanism less table-driven (more explicit and more
flexible) and allow all alternates permitted by the standard.

Change-Id: Ib2cbda632d4c81ec3e6b81f539fe77bb913afc1c
Reviewed-on: https://code.wireshark.org/review/9528
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-08-16 13:00:41 +00:00
João Valverde 8fa4016347 make-taps.pl: Remove duplicate slash in pathname
Change-Id: Id5e13df24409267c405cdd05479610a8ba898289
Reviewed-on: https://code.wireshark.org/review/10047
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-16 11:55:24 +00:00
Michael Mann 2e2129a914 Conversion of random proto_tree_add_text calls.
Change-Id: I6505ce34de84bfe46d5bc7b4d6a3c6044f3fb4b5
Reviewed-on: https://code.wireshark.org/review/10041
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-08-16 02:32:12 +00:00
Stig Bjørlykke 88f334bc39 Fixed a comment in cleanup_dissection
Change-Id: I445e09803023d1a22a663ba0501c013f113b5bfe
Reviewed-on: https://code.wireshark.org/review/10045
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-15 17:33:08 +00:00
Stig Bjørlykke 5f13933ddb Lua: Free true_false_string values at reload
Change-Id: I8ab194bf094e82f08ddafb0a1451aec42989b93d
Reviewed-on: https://code.wireshark.org/review/10044
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-15 17:26:54 +00:00
João Valverde 0a16350b05 Add a newline for readability
Change-Id: I7dbfa8f82454bd93ca5a66f22c29982923803918
Reviewed-on: https://code.wireshark.org/review/10043
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-15 17:01:49 +00:00
Michael Mann 7f38b65cc1 Don't clear the tcp_analysis if a conversation is not provided to get_tcp_conversation_data().
Callers may need to know information like retransmissions, etc which will be lost.

Change-Id: I3f8b6b0aeb308701eb34ae6f6f735af6995ed441
Reviewed-on: https://code.wireshark.org/review/9940
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-15 15:22:46 +00:00
João Valverde 85e2018eac udp: fix minimum jumbo length
Change-Id: I5ab4974cc60cdec0c3571bdec815c8cb9e8f7255
Reviewed-on: https://code.wireshark.org/review/10040
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-15 15:20:13 +00:00
Evan Huus 85d2eef619 btatt: guard against incomplete reassembly
If we try and reassemble a fragment whose end does not line up exactly with the
start of the following fragment, abort or else we will leave uninitialized gaps
in the resulting buffer.

Bug: 11436
Change-Id: I4cd05c1a9ac4404bf70a3945f80b12f7bf5f74ee
Reviewed-on: https://code.wireshark.org/review/9983
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: Anders Broman <a.broman58@gmail.com>
2015-08-15 06:52:38 +00:00
João Valverde 677d4d6be2 Add IPv6 Jumbogram support (RFC 2675)
Change-Id: Icea1659395d7bc16e367b74a695586926b33149b
Reviewed-on: https://code.wireshark.org/review/9968
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>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-15 06:51:04 +00:00
Michael Mann 828254042a Eliminate proto_tree_add_text from GSM dissectors.
Change-Id: I36a3d15a4fa86847a83d1dbea40111d36d7cfd61
Reviewed-on: https://code.wireshark.org/review/10036
Reviewed-by: Michael Mann <mmann78@netscape.net>
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-08-15 06:49:38 +00:00
Stig Bjørlykke 46d6e8cc62 Added some missing breaks
Change-Id: I3b2f25832ca878ec3e7f9e4dcce258dc870fc5ad
Reviewed-on: https://code.wireshark.org/review/10031
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-14 12:49:36 +00:00
Stig Bjørlykke 7833b93c66 Free all hfi->strings in free_deregister_field
Change-Id: I6fe78266a2e881fa80e1e3a3423b685d3c1764de
Reviewed-on: https://code.wireshark.org/review/10029
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-14 11:47:25 +00:00
Stig Bjørlykke 28b52060d4 Free protocol in proto_free_deregistered_fields
This fixes some issues with use-after-free when reload Lua plugins.

Change-Id: I63f3fd9ebe8a19008f560e72067f2078f5eaf759
Reviewed-on: https://code.wireshark.org/review/10026
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-14 07:30:02 +00:00
Guy Harris 6cc1c8d98b Clean up heuristic checks.
Fix heuristic checks to handle sliced packets correctly.  "Correctly"
means "fail the heuristic", as the heuristic checks every single byte of
the putative Ixia trailer, as one thing it does is check the checksum,
which is in the last 2 bytes of the trailer and checks everything before
it.  So just return 0 if the full trailer isn't part of the captured
data.

Try to handle being handed a tvbuff that contains an FCS by looking at
the putative "magic number" locations where it would be if the tvbuff
didn't include the FCS and, if that doesn't match, where it would be if
it *did* include the FCS.  If the former doesn't match but the latter
does, assume that means it does include the FCS, and do all other
processing under that assumption.

Clean up some comments.

Fix an hf_ variable name to match the field name, and put the tvbuff
value fields in the order of their types.

Don't fail if the field length is 0 - it's a value length, so it could
in theory be 0.  Rely on the length checks for individual types to catch
problems.

Change-Id: Idc834aa6637cfbbafd6499060a007e720378154e
Reviewed-on: https://code.wireshark.org/review/10024
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-14 03:06:11 +00:00
Guy Harris 3c5fd58a58 Get rid of trailing whitespace.
Change-Id: I035fad79dd8d01aa3121732f2a9b07d20cc4384f
Reviewed-on: https://code.wireshark.org/review/10023
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-13 23:36:35 +00:00
Guy Harris 814f6173fe Update to reflect reality.
The Ixia trailer is a variable-length sequence of TLVs followed by some
fixed-length fields.  Describe it as such.

Realign some #defines while we're at it.

Change-Id: I5fc45a1d44978f1dc1f13e7098c3f797838db7b3
Reviewed-on: https://code.wireshark.org/review/10022
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-13 23:33:33 +00:00
Ionut Ceausu 5931da979e ixiatrailer: Change format of the protocol so that is supports future fields.
Protocol is TLV protocol and with this change I add one more field to it.
It is entire backward compatible.
Format is as follow:
  Fields	Trailer Length	0xAF12(Signature)	Trailer Checksum

The fields portion of the trailer is a series of 2-byte fields followed by variable
length data. The first byte indicates the field type, the 2nd byte indicates the
field length.   The values supported are listed below:
	1	Reserved (Original Packet Size)
	3	Timestamp (From Local Timebase)
	4	Timestamp (From NTP source)
	5	Timestamp (From GPS)
	6	Timestamp (From 1588)
	7	Timestamp (From Holdover)

Change-Id: I0a3b31cfbc5b6273e1f5326d9841e449735967fe
Reviewed-on: https://code.wireshark.org/review/9854
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-08-13 20:50:08 +00:00
Dario Lombardo cd76cf6df8 ieee802.11: changed blurb to stop checkAPI complains.
Change-Id: I9ec74a7af229a1af3ca946acc5af94ede1913c29
Reviewed-on: https://code.wireshark.org/review/10016
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-13 16:02:38 +00:00
Pascal Quantin 2d5f2ae108 GVCP: fix dissection of Stream Channel Packet Size register
Bug: 11442
Change-Id: I1c187bdf7ffd14b2a4f66d29883a4b112486bd35
Reviewed-on: https://code.wireshark.org/review/10014
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-13 15:57:47 +00:00
Michael Mann beb5c0b765 Eliminate proto_tree_add_text from some dissectors.
Change-Id: I1e6bf52fad1b1fffefc174a557ff836f400e8fd7
Reviewed-on: https://code.wireshark.org/review/9996
Reviewed-by: Michael Mann <mmann78@netscape.net>
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-08-13 04:19:48 +00:00
Alexis La Goutte 2449c7ad77 GTP: fix indent (use 4 spaces)
Change-Id: I2f0645adee2aff32122a8ccb60843e1bfd0897e1
Reviewed-on: https://code.wireshark.org/review/10004
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-12 21:03:35 +00:00
Bill Meier 451dd051cd [lwres] Fix (32 bit ?) MSVC-2015 warning: "conversion from 'size_t' to 'guint16', possible loss of data"
Change-Id: Ifc71d1c2afc3ff16f950f2f1c3c9e7142d62fc16
Reviewed-on: https://code.wireshark.org/review/10007
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-08-12 20:53:00 +00:00
Bill Meier d20f2b6422 [pdc] Fix a few [msvc-2015?] warnings about 'constant compared to constant'
Essentially: Do the version checks at compile time using
             #if statements (even though the compiler
             probably optimized out the run time checks).

Change-Id: I4879b39729ba5bd6b1c478ac43c107cb9fb445b3
Reviewed-on: https://code.wireshark.org/review/10006
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-08-12 20:52:24 +00:00
Bill Meier 6ae8df4a43 [pdc] [msvc-2015] Change a variable type to prevent 32-bit MSVC-2015 "internal error"
[...]\packet-pdc.c(205) : fatal error C1001: An internal error has occurred in the compiler.

(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246)
 To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++
 Help menu, or open the Technical Support help file for more information

INTERNAL COMPILER ERROR in 'C:\Program Files\Microsoft Visual Studio 14.0\VC\BIN\cl.EXE'
    Please choose the Technical Support command on the Visual C++
    Help menu, or open the Technical Support help file for more information

Change-Id: I505898d0c76244a56d75af1a1c5bf30554dd9a2b
Reviewed-on: https://code.wireshark.org/review/10005
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-08-12 20:51:19 +00:00
Gerald Combs 5c80f08648 Add DCE-RPC and ONC-RPC service response time dialogs.
Add RpcServiceResponseTimeDialog, which handles DCE-RPC and ONC-RPC
service response time statistics. Try to make it as lightweight as
possible, since we might want to pull this into the RPC dissectors
similar to the other SRT statistics.

Allow program names on the command line in place of numbers or UUIDs. Make
matches case-insensitive. E.g. the following are equivalent:

    -z rpc,srt,100003,3
    -z rpc,srt,nfs,3
    -z rpc,srt,NFS,3

as are the following:

    -z dcerpc,srt,f5cc5a18-4264-101a-8c59-08002b2f8426,56
    -z dcerpc,srt,nspi,56
    -z dcerpc,srt,NSPI,56

Change-Id: Ie451c64bf6fbc776f27d81e3bc248435c5cbc9e4
Reviewed-on: https://code.wireshark.org/review/9981
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-08-12 20:17:35 +00:00
Stig Bjørlykke bde416afcc Lua: Moved deregister out of wslua_cleanup
Change-Id: Ia43aa0e5f09400ef9923288b362256094a1241b8
Reviewed-on: https://code.wireshark.org/review/9998
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-12 13:23:07 +00:00
Stig Bjørlykke dc7443fcc9 Added guards for deregistered fields
This is functions used when redissecting after a Lua plugins reload.

Change-Id: Ida14526faec1992006938a6732ee894ac83c2d12
Reviewed-on: https://code.wireshark.org/review/9995
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-12 12:09:43 +00:00
AndersBroman a3e3d60310 Align comments
Change-Id: Iab59ba51700b018337552018c76e30dcbd41f3f6
Reviewed-on: https://code.wireshark.org/review/9993
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-12 11:27:38 +00:00
AndersBroman cd16301b36 [GTP] Direct Tunnel Flags 7.7.81 is currently specified with one data
octet.

Change-Id: Iab7917b23e6be03f63a92ef0aaf0814c9cbea2c3
Reviewed-on: https://code.wireshark.org/review/9992
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-12 08:16:41 +00:00
Michael Mann bfdc2cb7a3 Eliminate proto_tree_add_text from some dissectors.
Change-Id: I7a7778802c442b254626a7676cb74ca2855fa65e
Reviewed-on: https://code.wireshark.org/review/9977
Reviewed-by: Michael Mann <mmann78@netscape.net>
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-08-12 08:14:12 +00:00
Stig Bjørlykke f1a4db34b3 Lua: Remove unneeded call in wslua_cleanup
Change-Id: I0cda00001b40e5951d680d72dbc8043cbe8b9309
Reviewed-on: https://code.wireshark.org/review/9980
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11 20:06:36 +00:00
Stig Bjørlykke 58ec64c36e wmem: Fix wmem_tree_remove_string
Always set is_removed when insert data in a node.

Change-Id: I8fb50932a369e3f4fe8a1f743462683fff705cc2
Reviewed-on: https://code.wireshark.org/review/9978
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11 19:55:01 +00:00
Alexis La Goutte de70d2a18a H225: fix indent (use 2 spaces) and add modelines info
Change-Id: Ibe4cf8d004c6c94f745e5c620100af9483fa6a31
Reviewed-on: https://code.wireshark.org/review/9934
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-08-11 16:33:38 +00:00
Stig Bjørlykke d6c6b0899d wmem: Mark removed strings with is_removed
This will allow integer value 0 again.

Change-Id: Ibfa4249ea8b887971d3b3214ad9e4d095d20d155
Reviewed-on: https://code.wireshark.org/review/9973
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11 14:15:49 +00:00
Stig Bjørlykke ecc4f756bd Added Reload Lua plugins.
This is initial support for reloading Lua plugins without
restarting the application.

Still todo:
- Deregister FileHandlers
- Support deregister ProtoField with existing abbrev (same_name_hfinfo)
- Add a progress dialog when reloading many plugins
- Search for memory leakages in wslua functions

Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1
Reviewed-on: https://code.wireshark.org/review/5028
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11 12:09:07 +00:00
AndersBroman 70d06deb2e [SMCR] Minimum 4 bytes is required to perform the heuristic check.
Change-Id: I29426147cb1443af3c9cc9dc1b60beabe9a94277
Reviewed-on: https://code.wireshark.org/review/9972
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-11 11:54:47 +00:00
AndersBroman f23382434b [Diameter] Add expert info to subdissection of 3GPP AVP:s
Change-Id: Ic2ec0696f1f6b8bb918dd04aa898dccdb8b90ece
Reviewed-on: https://code.wireshark.org/review/9971
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-11 11:36:51 +00:00
AndersBroman 25796075a1 [ENEA LINX over TCP] Make the TCP port registration a preference defalted
to 0.

Change-Id: I837bf8ac9d5724dd485f0bc62f3fe32bedd3eb0e
Reviewed-on: https://code.wireshark.org/review/9970
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-11 11:10:04 +00:00
AndersBroman c262bf28bc [GIOP] A GIOP message can have size = 0 (CloseConnection)
Change-Id: I1feb6135c79191aa3ac7f36bbc969e6b36314107
Reviewed-on: https://code.wireshark.org/review/9969
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-11 09:16:13 +00:00
Martin Kaiser 56a9b53773 zbee-nwk-gp: fix a memory leak when keys are defined in the preferences
==5932== 33 (32 direct, 1 indirect) bytes in 1 blocks are definitely lost in loss record 2,124 of 4,121
==5932==    at 0x4C28BED: malloc (vg_replace_malloc.c:263)
==5932==    by 0xA024F30: g_malloc (gmem.c:159)
==5932==    by 0xA03A9E5: g_memdup (gstrfuncs.c:384)
==5932==    by 0x70754D2: gp_init_zbee_security (packet-zbee-nwk-gp.c:1459)
==5932==    by 0xA03A78C: g_slist_foreach (gslist.c:840)
==5932==    by 0x67E867C: init_dissection (packet.c:249)
==5932==    by 0x67DC202: epan_new (epan.c:160)
==5932==    by 0x414B16: cf_open (tshark.c:2464)
==5932==    by 0x40CF8A: main (tshark.c:2169)

Change-Id: I7c0ce0717957525ca18eb4888ed3389debc89a49
Reviewed-on: https://code.wireshark.org/review/9967
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-11 04:09:44 +00:00
Martin Kaiser b1be6bce66 zigbee: remove some more if (tree) checks
Change-Id: I81b46ec7d9d919ff2779d1005063e9ef6c92e097
Reviewed-on: https://code.wireshark.org/review/9966
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-08-10 21:16:09 +00:00
Martin Kaiser 52a7b79db1 remove some unnecessary if (tree) checks
Change-Id: Ib0f4cc47ede7b840cba38ecad04bd17bb6bccd55
Reviewed-on: https://code.wireshark.org/review/9965
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-08-10 20:28:55 +00:00
AndersBroman 94bb2765e8 Try to fix the build bou by copying tha cast made in glib.
Change-Id: I6da06b8e6ae272b940ef4ee47ce6b253bf9f3699
Reviewed-on: https://code.wireshark.org/review/9961
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-10 11:21:00 +00:00
Alexis La Goutte 7fb514fe4d GSM (a_common): fix indent (replace tab by 8 spaces)
Change-Id: Id1d6bfcb04ac75d767fe6f09454dc8235de7bc75
Reviewed-on: https://code.wireshark.org/review/9928
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-10 08:31:18 +00:00
AndersBroman 76d4b80b8e g_slist_free_full () does not exist until GLIB 2.28
Change-Id: I81df5b4dbe1916eca51cdb72199de7a90471bd07
Reviewed-on: https://code.wireshark.org/review/9960
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-10 08:28:39 +00:00
Guy Harris 75d46fec3f Get rid of trailing white space.
Change-Id: I3c0091612bdd518f749abbfbefbd0e2097b8c18b
Reviewed-on: https://code.wireshark.org/review/9958
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-10 07:53:55 +00:00
Guy Harris 43c2e5769a Don't try to decrypt the payload if it was cut short by the snapshot length.
It's not clear that the decryption code can handle an incomplete
payload.  If it can, please fix this (bear in mind that you won't have
all the MIC, and may not have *any* of the MIC, so...).

Bug: 11389
Change-Id: Ie863ddc5c4aa7fbf6cde317823a413d226a41c0d
Reviewed-on: https://code.wireshark.org/review/9954
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-10 07:31:26 +00:00
Guy Harris 31571144be Use the reported length where appropriate.
Use the captured length to know how much data to decrypt.  Use the
reported length to determine whether we have a null payload and to se
the reported length of the decrypted payload and of tvbuffs for the
un-decrypted payload.

Bug: 11389
Change-Id: I4395c5a48c16110fcf31b611b99749c61000d489
Reviewed-on: https://code.wireshark.org/review/9953
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-10 06:57:23 +00:00
Martin Kaiser d108f2871c zigbee: fix two memory leaks
==17992== 4 bytes in 1 blocks are definitely lost in loss record 68 of 4,102
==17992==    at 0x4C28BED: malloc (vg_replace_malloc.c:263)
==17992==    by 0x9FB2F30: g_malloc (gmem.c:159)
==17992==    by 0x9FC89E5: g_memdup (gstrfuncs.c:384)
==17992==    by 0x703F977: dissect_zbee_aps (packet-zbee-aps.c:1300)
==17992==    by 0x67B4F1E: call_dissector_through_handle (packet.c:618)

==17992== 8 bytes in 1 blocks are definitely lost in loss record 580 of 4,102
==17992==    at 0x4C272B8: calloc (vg_replace_malloc.c:566)
==17992==    by 0x9FB2F88: g_malloc0 (gmem.c:189)
==17992==    by 0x703F962: dissect_zbee_aps (packet-zbee-aps.c:1299)
==17992==    by 0x67B4F1E: call_dissector_through_handle (packet.c:618)

second version that uses glib memory routines and does not mix
g_hash_table and wmem

remove an obsolete comment and an unnecessary return; while at it

Change-Id: I2e92db0613f01b6c3009e8ad82ceb65a87cba12e
Reviewed-on: https://code.wireshark.org/review/9830
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-10 04:50:03 +00:00
Michael Mann c462f1b54e Eliminate proto_tree_add_text from packet-wbxml.c
While I was at it, some (mostly) duplicate functionality allowed rearranging of functions to eliminate most forward declarations.

Change-Id: I2d7027d336c391d81dfe81c7a1ebf0d56c0826b2
Reviewed-on: https://code.wireshark.org/review/9951
Reviewed-by: Michael Mann <mmann78@netscape.net>
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-08-10 04:47:19 +00:00
João Valverde 6d8b4afb49 Cleanup variable name in dissect_frag6()
Change-Id: Ib6bdea5dbc95b5221e41ca30c11288ff8c1dbb7f
Reviewed-on: https://code.wireshark.org/review/9952
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-10 04:44:07 +00:00
Martin Kaiser 655b0dc623 use the captured length as payload length for zigbee decryption
this length is used for allocating a buffer and for crypto calculations
we should use the bytes that were actually captured, not the reported
length

the capture in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=11389
has one packet with a stupidly large reported length and a reasonable
capture length (and one completely bogus packet) - this fix ensures that
the decryption does not break for the former packet

also, tvb_reported_length_remaining() does not return values < 0 any
more, remove the check for this

Bug: 11389
Change-Id: I42cb4526483160416b51e3cb72442148b5fac4f3
Reviewed-on: https://code.wireshark.org/review/9950
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-10 04:43:20 +00:00
Alexis La Goutte aafc7ff596 H225: fix no previous prototype for 'h225_stat_init' [-Wmissing-prototypes]
Change-Id: I945bbbb3b10258f22c60b04b19cf55671fc6ed94
Reviewed-on: https://code.wireshark.org/review/9933
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-08-09 19:27:29 +00:00