Commit graph

63732 commits

Author SHA1 Message Date
João Valverde
1a3fc2e7af IPv6: Remove union from struct ip6_hdr
The field macros are a particularly obnoxious form of namespace pollution.

Change-Id: I9010a767625fd1c4b4a48c9d75481c577915fce6
Reviewed-on: https://code.wireshark.org/review/16520
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-07-18 01:32:04 +00:00
5123fa26e9 L2TP: Add dissectors for Ericsson specific L2TP AVPs
Ericsson's L2TP implementation uses some vendor-specific AVPs. Let's add
some decoder/dissector support for these.

Change-Id: I65d5527087a9c0f4e18ba17c9e7c63793ef6e995
Reviewed-on: https://code.wireshark.org/review/16507
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-17 15:22:07 +00:00
Gerald Combs
f59fa1b807 [Automatic update for 2016-07-17]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I0ca539cf81e1708a6ea8eafbdf91488086e9ee2d
Reviewed-on: https://code.wireshark.org/review/16513
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-07-17 15:08:55 +00:00
Alexis La Goutte
6e44ea3f98 Add osx/macos build for Travis CI
Change-Id: Id6beedfbe909ac3639790cbb7471bd968bed5b82
Reviewed-on: https://code.wireshark.org/review/16496
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-17 13:43:49 +00:00
Michael Mann
db1e0bcf65 Fix printf style parameters complaints from VS Code Analysis
Change-Id: I5669e2442582f899643fae4a9f86ab6d505dde07
Reviewed-on: https://code.wireshark.org/review/16505
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-17 13:10:37 +00:00
Michael Mann
25dfe445a1 ciscodump.c - Address VS Code Analysis warnings.
1. Check sscanf return value
2. Take large "packet" byte array off of stack and onto heap.

Change-Id: I8ade76359f1b0739ec31d7f3b688d212f21357ba
Reviewed-on: https://code.wireshark.org/review/16498
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-17 13:10:23 +00:00
David Arnold
6e7b1b8a9c Update to support OUCH-4.2 as of 2016/02/29 release
Bug: 12615
Change-Id: I7122ded30083dd85e7785a842c6dd62b459d9676
Reviewed-on: https://code.wireshark.org/review/16465
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>
2016-07-17 06:13:29 +00:00
Michael Mann
8cd167a06c Fix sscanf VS Code Analysis warnings.
Some needed to check return value, others were converted to use strtoul.

Change-Id: I55aae216f95362b67e006f6e682abbd5ae2c8dcc
Reviewed-on: https://code.wireshark.org/review/16502
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-17 01:47:46 +00:00
Alexis La Goutte
379c3c6fde ISIS (LSP): Fix Malformed packet
Coming from fetch too longer bytes...

Rework the display for add some missing field (SubTLV indicator, prefix len) and for prefix IPv4 use the same code like BGP

Issue reported by Garri Djavadyan

Bug:12617
Change-Id: Ib40f1badf8e03fadacfbb0aff1ebd3eab8ca342b
Reviewed-on: https://code.wireshark.org/review/16436
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>
2016-07-16 23:52:42 +00:00
Michael Mann
abd0033c7e androiddump.c - Address VS Code Analysis warnings.
1. Take large "packet" byte arrays off of stack and onto heap.
2. Cast away an shift operation that should have been identified as safe anyway.

Change-Id: I159c4a7452744763f667336cf4824d5ac3472343
Reviewed-on: https://code.wireshark.org/review/16500
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-16 19:52:48 +00:00
Michael Mann
9a9c72ccea Have extcap executables mirror the GTK's WinMain signature.
This is for appeasing VS Code Analysis.

Change-Id: Ib7b3d8a3025dd764da283335051d0f77b45f6dee
Reviewed-on: https://code.wireshark.org/review/16499
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-16 19:52:00 +00:00
Michael Mann
6d8ea38773 wmem_map.c: Address some VS Code Analysis warnings.
size_t can vary on size, so you can't always mix it with guint.

Change-Id: I7e2ea3a990dd4df99422f6113aa3ae53dbf2bc4f
Reviewed-on: https://code.wireshark.org/review/16501
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>
2016-07-16 19:46:05 +00:00
João Valverde
ed307484a7 IPv6: Improve offset handling for options sub-dissectors
We pass the Option Data offset to sub-dissectors.

Change-Id: I4a20514f3f1c31179f93c86e251ba67d671844b3
Reviewed-on: https://code.wireshark.org/review/16484
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-07-16 16:07:20 +00:00
Alexis La Goutte
dbcabe87af Use debian tools script for travis
Change-Id: I0e3390048fe2723579cc108f5adf582f570a41e5
Reviewed-on: https://code.wireshark.org/review/16494
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-07-16 14:52:12 +00:00
Gerald Combs
b5a585c0a0 Use timers instead of packet counts to update our UI.
In file.c, update our UI based on the time elapsed since we last
finished updating the UI instead of on the number of packets we've
processed. Remove the timer code from progress_frame.cpp since it's now
redundant.

This makes the UI more responsive here for captures with large numbers
of packets and it should mean that packets_bar_update spends less time
repainting, at least on Windows.

Change-Id: I9edfa944c44192350bef75b8c0c3ad63bae9c131
Reviewed-on: https://code.wireshark.org/review/16476
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-16 06:48:23 +00:00
Gerald Combs
adec7c424e Allocate data sources using wmem.
Use wmem_strdup + the pinfo pool instead of g_strdup.

Change-Id: I11fbb5ce31b7139421c558ee65ca43c8d8e85900
Reviewed-on: https://code.wireshark.org/review/16445
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-16 06:47:32 +00:00
Martin Kaiser
7e5cbf4e2c always update the status bar at the end of a capture
We used to update the status bar when we get a stopCapture signal.

This does not work for extcap interfaces like randpktdump which
creates 1000 packets and then exits. The status bar message "Live capture
in progress" is not deleted.

For randpktdump, the only reliable indication to detect the end of
the "capture" is when the pipe to dumpcap is destroyed. Update the
status bar at this time.

Change-Id: I59768e7f518625283b2c27c34c428bb115e27a61
Reviewed-on: https://code.wireshark.org/review/16479
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
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>
2016-07-16 06:42:44 +00:00
Michael Mann
5c99fc2b53 Another attempt to squash warnings from printf use in reassemble_test.c
Change-Id: Ieae9466c6785cf931fc96f8e216c0c1383a5b6a2
Reviewed-on: https://code.wireshark.org/review/16489
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-16 03:58:34 +00:00
Guy Harris
16a01cfb01 Comment cleanups.
Change-Id: I995ba14cbd9bbe2c01b0770c16095084895498db
Reviewed-on: https://code.wireshark.org/review/16486
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-16 00:33:56 +00:00
Guy Harris
ae598d1737 Add APIs to remove option instances from blocks.
That will allow deletion of comments, stripping of options when
sanitizing captures, etc..

Change-Id: I9667ba2ccf4e548ff3b7d500796b260a437bcea0
Reviewed-on: https://code.wireshark.org/review/16485
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-16 00:26:47 +00:00
João Valverde
9dd2674fad IPv6: Minor loop cleanup
Change-Id: I73e11c353695a565d9c4222f2a3646d0530c3c40
Reviewed-on: https://code.wireshark.org/review/16482
Reviewed-by: João Valverde <j@v6e.pt>
2016-07-15 22:07:18 +00:00
João Valverde
4bf78ca75b IPv6: Register fragment header dissector handle
Change-Id: Ie49c8cdc010630c8963a730562aaf33f61236058
Reviewed-on: https://code.wireshark.org/review/16443
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-07-15 21:43:14 +00:00
Guy Harris
18d5bccede Use spaces rather than tabs for indentation.
Change-Id: I6028253f7c8c30804eaa4b23d2b09827aacb3c9d
Reviewed-on: https://code.wireshark.org/review/16481
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-15 21:01:04 +00:00
Guy Harris
ea4a62df1f Update comments, give option numbers in decimal.
The pcapng spec gives option numbers in decimal, not hex.

Get rid of the "XXX if not available" comments - if an option isn't
present in a block, it's not present, and doesn't have *any* value.

Change-Id: I1bf0c9a5aaad7dfadf9248e22b67e172625bdd0d
Reviewed-on: https://code.wireshark.org/review/16480
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-15 20:58:07 +00:00
Gerald Combs
29cecf27c4 Qt: Reserve packet list model vectors.
Preallocate and hold onto the data in the various packet list model
vectors. I'm not sure how much this will affect performance, but the
documentation suggests that it's the right thing to do in our case.

Change-Id: If2d5ad142bf2d61e0bc2302990bd288274447df5
Reviewed-on: https://code.wireshark.org/review/16475
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-07-15 19:34:39 +00:00
Guy Harris
d0af229d1f Squelch a compiler warning.
Explicitly cst the results of g_memdup().

Change-Id: I20fd1f355e68735d7cc9bbeb41717a1c2a74de37
Reviewed-on: https://code.wireshark.org/review/16477
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-15 18:21:43 +00:00
João Valverde
2c2bdc1211 IPv6: Fix comment
Change-Id: Ib5c44f806e5844e1eb1579ade4b92d2b719564c1
Reviewed-on: https://code.wireshark.org/review/16474
Reviewed-by: João Valverde <j@v6e.pt>
2016-07-15 15:35:29 +00:00
João Valverde
eb668002ec IPv6: Register extension headers ett/ei arrays
Change-Id: I1208638580efe06a94a055613a0de3ecf2acdb26
Reviewed-on: https://code.wireshark.org/review/16442
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-07-15 14:23:48 +00:00
João Valverde
cfaf756669 Move Shim6 dissector to packet-shim6.c
Change-Id: Ia0bfbf48e8a4eb23d62c8c5cdccad350caedef9e
Reviewed-on: https://code.wireshark.org/review/16425
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-07-15 14:21:46 +00:00
Michael Mann
b8ff743477 wtap_opttypes.c: Fix build error.
Change-Id: I3ee146d441e4d59701c72ed85dcb4efe97766df8
Reviewed-on: https://code.wireshark.org/review/16473
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-15 13:48:50 +00:00
Michael Mann
5e09a57d5a reassemble_test.c: Fix checking macros with correct printf style arguments.
Complaints of VS Code Analysis

Change-Id: Ib5a4649b78ae4c9109249e915c04481ae7fa5524
Reviewed-on: https://code.wireshark.org/review/16472
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-15 13:40:13 +00:00
João Valverde
710b0a8483 IPv6: Check pinfo->layers for hop-by-hop exthdr order
Change-Id: I0467417c4d9a62013d8fe5cbcc03c09147f92cf1
Reviewed-on: https://code.wireshark.org/review/16435
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-07-15 13:09:32 +00:00
Michal Labedzki
e0242a7fd3 Bluetooth: GATT: Add services error codes
GATT Service may define own error code. Add them.

Change-Id: I9e5c0d38b2dd01c16cfd47578f151cefdc9393fe
Reviewed-on: https://code.wireshark.org/review/16467
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-15 12:34:01 +00:00
Michal Labedzki
e9961223d4 Bluetooth: RFCOMM: Fix CID 1364086
Fix null pointer dereferences.

Change-Id: Id095fd0d7c9d70f79fd7367ef5c226f271a24cbe
Reviewed-on: https://code.wireshark.org/review/16466
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-15 12:32:09 +00:00
João Valverde
7533c72c4b IPv6: Remove null check (CID 1364087)
Change-Id: Ia35a78ccaa4f61fbbbfff304f12d813fdbdd009d
Reviewed-on: https://code.wireshark.org/review/16452
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-15 12:31:28 +00:00
Guy Harris
996dcc038d Do a deep copy in wtap_block_add_custom_option().
That way, we don't have to worry about multiple instances of an option
pointing to the same data. and having to worry about freeing data that's
pointed to by another instance.

Change-Id: I3470a9eebf346023713fd0d6ff2451d727c25089
Reviewed-on: https://code.wireshark.org/review/16471
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-15 08:31:55 +00:00
Guy Harris
ced2071505 Fix the snapshot length part of the "same interface?" check.
Fix a typo - compare for unequal snapshot lengths, not equal snapshot
lengths.

Also, move the debug messages about checks right above the checks.

Change-Id: If6f5e125f05f3788b63e9f75d98f55e27830870b
Reviewed-on: https://code.wireshark.org/review/16470
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-15 07:31:03 +00:00
Guy Harris
81642901fe Update Debian symbol files to reflect current reality.
Change-Id: I3e310fc5c43e9045956c17406b9c5a2f2f9090a3
Reviewed-on: https://code.wireshark.org/review/16456
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-15 03:34:01 +00:00
Guy Harris
473910b76d We no longer add default names to interfaces in an IDB.
The way you say "this interface's name is unknown" is by not giving it
an if_name option, not by giving it an if_name option that says "this
isn't known".  Remove the if_name option from the interfaces in this
capture file.

Change-Id: Ie3569c81bd065e48278cfa83b82b06ea6b5258af
Reviewed-on: https://code.wireshark.org/review/16455
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-15 03:21:04 +00:00
Guy Harris
7f92c24faf Widen some variables.
Perhaps they cannot ever have values > 65535, but there's really no
benefit to restricting them to 16 bits on the 32-bit and 64-bit
platforms on which we run, and this might address what CID 1364088 is
*really* complaining about.

Change-Id: I5238261d04783401873de89469f8e2906554add4
Reviewed-on: https://code.wireshark.org/review/16454
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-15 02:09:39 +00:00
Michael Mann
9397b262e9 tvbtest.c - Fix printf style argument types
Change-Id: I05ecbd06262e0dd68851dd6728817ad721a91962
Reviewed-on: https://code.wireshark.org/review/16449
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-15 01:49:33 +00:00
Michael Mann
f2a7594ac0 reassemble_test.c: Reorder macro behavior to make it clearer we have NULL checks in place.
Trying to pacify VS Code Analysis.

Change-Id: I76379b23a5d4c772b91d6113af3974e105e4da88
Reviewed-on: https://code.wireshark.org/review/16448
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-15 01:49:09 +00:00
Michael Mann
2c3127940a exntest.c: Create local functions to handle "nesting" TRY/CATCH macros to fix shadow warnings.
Found by VS Code Analysis, although it appears it's been discovered before
and warranted the DIAG_ON/OFF macros.  Those have been removed as this is
believed to be a good solution.

Change-Id: I376d816855366d55affe7b9e4b8616509aa4e7fe
Reviewed-on: https://code.wireshark.org/review/16447
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-15 01:48:49 +00:00
Guy Harris
8428d3a927 Squelch compiler warnings.
Cast some numerical values to wtap_block_type_t.

Change-Id: I56651c62045880638175c39174341feffb4b1068
Reviewed-on: https://code.wireshark.org/review/16451
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-15 01:33:18 +00:00
João Valverde
f8b738016e Fix manpages typo.
Change-Id: Iac747655d09c94926e51c7ea1f23375650cd6641
Ping-Bug: 12305
Reviewed-on: https://code.wireshark.org/review/16446
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-15 01:15:15 +00:00
Guy Harris
bb610ac57b Fix signature of wtap_opttype_block_register().
It gets passed a wtap_block_type_t value, so declare it as such.

Change-Id: I6980cab7e1885c9920b2a75e12f9d2d2a64d6f96
Reviewed-on: https://code.wireshark.org/review/16450
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-15 01:13:31 +00:00
Guy Harris
1f8999bb96 Redo the block options APIs.
A block can have zero or more instances of a given option.  We
distinguish between "one instance only" options, where a block can have
zero or one instance, and "multiple instances allowed" options, where a
block can have zero or more instances.

For "one instance only" options:

	"add" routines add an instance if there isn't one already
	and fail if there is;

	"set" routines add an instance if there isn't one already
	and change the value of the existing instance if there is one;

	"set nth" routines fail;

	"get" routines return the value of the instance if there is one
	and fail if there isn't;

	"get nth" routines fail.

For "multiple instances allowed" options:

	"add" routines add an instance;

	"set" routines fail;

	"set nth" routines set the value of the nth instance if there is
	one and fail otherwise;

	"get" routines fail;

	"get nth" routines get the value if the nth instance if there is
	one and fail otherwise.

Rename "optionblock" to just "block"; it describes the contents of a
block, including both mandatory items and options.

Add some support for NRB options, including IPv4 and IPv6 option types.

Change-Id: Iad184f668626c3d1498b2ed00c7f1672e4abf52e
Reviewed-on: https://code.wireshark.org/review/16444
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-14 23:02:39 +00:00
Pascal Quantin
42e72d529c More 2.1.1 → 2.1.2 changes
Change-Id: If1a7f1232bbb23b27063d4ef618c2059293ff0c4
Reviewed-on: https://code.wireshark.org/review/16441
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-07-14 22:21:53 +00:00
Gerald Combs
af5daa6b5a Qt: Replace a QMap with a QVector.
Use a vector to map packet numbers to their respective rows. This reduces
load times slightly here.

Change-Id: I80dc8656e1d0b6b1b7c75d33c001397b6221d25e
Reviewed-on: https://code.wireshark.org/review/16438
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-07-14 21:53:21 +00:00
Gerald Combs
ee29efbd9c 2.1.1 → 2.1.2.
Change-Id: If03589159cbf7c1a0de97fd50edd06d1cd0e63bd
Reviewed-on: https://code.wireshark.org/review/16440
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-07-14 21:10:01 +00:00