gd/wireshark/.git
4 years agoHTTPS (almost) everywhere.
Guy Harris [Fri, 26 Jul 2019 18:43:17 +0000 (11:43 -0700)]
HTTPS (almost) everywhere.

Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoInitialize newly-allocated iap_conversation_t before fetching packet data.
Guy Harris [Fri, 26 Jul 2019 08:54:14 +0000 (01:54 -0700)]
Initialize newly-allocated iap_conversation_t before fetching packet data.

If we do it after trying to fetch packet data, the attempt to fetch
might throw an exception, and the structure won't be fully initialized.

Bug: 15934
Change-Id: If50a8c18232d934c1e33512cddb40a011a4eaef7
Reviewed-on: https://code.wireshark.org/review/34087
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoDebian: remove symbols
Pascal Quantin [Fri, 26 Jul 2019 08:55:42 +0000 (10:55 +0200)]
Debian: remove symbols

Those functions are defined as inline in proto.h and are not exported
functions. The change g76e227bcef had an impact on this check and now
they are flagged as missing. Let's remove them.

Bug: 15944
Change-Id: I58a0bd41283ce20aa7441ca08173e3d8d469a0ec
Reviewed-on: https://code.wireshark.org/review/34088
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
4 years ago3.1.0 > 3.1.1.
Gerald Combs [Thu, 25 Jul 2019 20:02:12 +0000 (13:02 -0700)]
3.1.0 > 3.1.1.

Change-Id: Idc7ab6cfe38cffa4053d0d8ce710cb95b33aa6ac
Reviewed-on: https://code.wireshark.org/review/34084
Reviewed-by: Gerald Combs <gerald@wireshark.org>
4 years agoBuild 3.1.0.
Gerald Combs [Thu, 25 Jul 2019 18:45:16 +0000 (11:45 -0700)]
Build 3.1.0.

Change-Id: Iced73e36e00018ace596b671959bc087b3541765
Reviewed-on: https://code.wireshark.org/review/34082
Reviewed-by: Gerald Combs <gerald@wireshark.org>
4 years agodebian-setup.sh: Add package lsb-release
Juergen Kosel [Wed, 24 Jul 2019 17:00:40 +0000 (19:00 +0200)]
debian-setup.sh: Add package lsb-release

The package lsb-release is a build requirement.
Especially needed to build wireshark in a docker container based on
debian:stable.

This change is a prerequisite for the change discussed in
https://code.wireshark.org/review/#/c/34042

Change-Id: Ib8ec73c8bffcb8761ad5748882aa9418e8cd7948
Signed-off-by: Juergen Kosel <juergen.kosel@gmx.de>
Reviewed-on: https://code.wireshark.org/review/34071
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoQt: fix compilation with older Qt versions.
Dario Lombardo [Fri, 19 Jul 2019 14:56:19 +0000 (16:56 +0200)]
Qt: fix compilation with older Qt versions.

../ui/qt/widgets/copy_from_profile_menu.cpp:52:30: error: no matching function for call to 'QAction::QAction(QString&)'
         pa = new QAction(name);
                              ^
../ui/qt/widgets/copy_from_profile_menu.cpp:52:30: note: candidates are:
In file included from /usr/include/qt5/QtWidgets/qmenu.h:40:0,
                 from /usr/include/qt5/QtWidgets/QMenu:1,
                 from ../ui/qt/widgets/copy_from_profile_menu.h:16,
                 from ../ui/qt/widgets/copy_from_profile_menu.cpp:10:
/usr/include/qt5/QtWidgets/qaction.h:174:5: note: QAction::QAction(QActionPrivate&, QObject*)
     QAction(QActionPrivate &dd, QObject *parent);

Change-Id: Ib7cb7cf522f1a95d5f4c16b1dc8f2ada8e46793c
Reviewed-on: https://code.wireshark.org/review/34081
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoQt: Export profiles
Roland Knall [Wed, 24 Jul 2019 21:39:25 +0000 (23:39 +0200)]
Qt: Export profiles

Allow for the export of profiles. The currently selected profile may be
selected, as well as all user-defined profiles

Fixes: Bug, where invalid data has been written into the profiles not
present inside the original file

Change-Id: I7c6310920a1f3a064cfcedc7774b742ff01c9b9e
Reviewed-on: https://code.wireshark.org/review/34077
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoDon't format printable non-ASCII Unicode characters as escape sequences.
Guy Harris [Thu, 25 Jul 2019 12:23:36 +0000 (05:23 -0700)]
Don't format printable non-ASCII Unicode characters as escape sequences.

Note that even strings fetched with ENC_ASCII may contain them - bytes
with the 8th bit set get mapped to REPLACEMENT CHARACTER.

This means we can format STR_UNICODE fields with format_text(); do so.

Bug: 1372
Change-Id: Ia32c3a92d220ac5174ecd25f33e2d1f85cfb8cb8
Reviewed-on: https://code.wireshark.org/review/34080
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoUSBLL: Verify DATA packets CRC-16
Tomasz Moń [Fri, 19 Jul 2019 15:43:20 +0000 (17:43 +0200)]
USBLL: Verify DATA packets CRC-16

Ping-Bug: 15908
Change-Id: Idda280545665184aca40c694ea6d639c9317307a
Reviewed-on: https://code.wireshark.org/review/34016
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agoUSBLL: Initial USB 2.0 Link Layer dissector
Tomasz Moń [Tue, 23 Jul 2019 13:54:36 +0000 (15:54 +0200)]
USBLL: Initial USB 2.0 Link Layer dissector

Dissect raw USB Packets. The actual USB packets to transaction conversion
(which is needed to pass the data to existing USB URB dissector) is not
implemented yet.

Ping-Bug: 15908
Change-Id: Ia75d58882d770fdd8650622d318241743069ad8f
Reviewed-on: https://code.wireshark.org/review/34006
Reviewed-by: Tomasz Moń <desowin@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agoQt: Fix copy indicator for profile
Roland Knall [Thu, 25 Jul 2019 07:50:31 +0000 (09:50 +0200)]
Qt: Fix copy indicator for profile

If a profile has been created as a copy from a user profile,
and a global profile exists with the same name as the parent user
profile, deleting the parent user profile mistakenly indicates,
that the copy has been cerated with the parent global profile
not the then deleted user profile

Change-Id: I4d4c91de64b623a8553a3c51ad449988dfe8eec5
Reviewed-on: https://code.wireshark.org/review/34079
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoQt: Various Profile UI Updates
Roland Knall [Mon, 22 Jul 2019 19:27:39 +0000 (21:27 +0200)]
Qt: Various Profile UI Updates

Correct the text for delete and copy profiles, which better
display if they have been copied from a system-profile or
if the original entry has been deleted

Move Import button into the button box, as this seems
to be the consensus with applications and gives the info
label more room

Tooltips now behave the same way as they did before the
refactoring and copying from a new element creates the
correct names

Only one element could be deleted any given time, if the
default element was to be resetted

Change-Id: Ieb902b68627cb9bda5d2483b39de6479ff8d4533
Reviewed-on: https://code.wireshark.org/review/34070
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoUpdate the release notes for 3.1.0.
Gerald Combs [Wed, 24 Jul 2019 21:29:13 +0000 (14:29 -0700)]
Update the release notes for 3.1.0.

Change-Id: I85b2a8088e1968bd8e2fb707fe269e11fb2e0c90
Reviewed-on: https://code.wireshark.org/review/34078
Reviewed-by: Gerald Combs <gerald@wireshark.org>
4 years agoUse tvb_get_raw_bytes_as_string() to fetch the verb and reply code.
Guy Harris [Wed, 24 Jul 2019 20:58:02 +0000 (13:58 -0700)]
Use tvb_get_raw_bytes_as_string() to fetch the verb and reply code.

Change-Id: I615feb257274fdc44b8791078c0da512a4a7bd88
Reviewed-on: https://code.wireshark.org/review/34076
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoQt: Profile Treeview updates now after importing profiles
Roland Knall [Mon, 22 Jul 2019 20:21:43 +0000 (22:21 +0200)]
Qt: Profile Treeview updates now after importing profiles

The Treeview was not updated after a successful import.

Change-Id: I66d1873f75f1fca1ad1212130deb463a44253083
Reviewed-on: https://code.wireshark.org/review/34059
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoUse g_ascii_isalpha(), not is_rfc2234_alpha().
Guy Harris [Wed, 24 Jul 2019 20:12:16 +0000 (13:12 -0700)]
Use g_ascii_isalpha(), not is_rfc2234_alpha().

Use GLib's locale-independent "is this alphabetic?" routine, rather than
rolling our own.

Change-Id: I841de09d534867ec7510bd680fd97387719b2850
Reviewed-on: https://code.wireshark.org/review/34075
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoUse tvb_get_raw_bytes_as_string() to fetch the reply code.
Guy Harris [Wed, 24 Jul 2019 19:46:44 +0000 (12:46 -0700)]
Use tvb_get_raw_bytes_as_string() to fetch the reply code.

Change-Id: Ida31fd962a6c2c792f19ac438697948c155e3f45
Reviewed-on: https://code.wireshark.org/review/34074
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoHandle multiple PDUs per TCP segment and reassembly of multi-segment PDUs.
Guy Harris [Wed, 24 Jul 2019 19:17:39 +0000 (12:17 -0700)]
Handle multiple PDUs per TCP segment and reassembly of multi-segment PDUs.

Use tcp_dissect_pdus().

Put the packet length and packet type into the protocol tree as items.

Pass to routines dissecting various packet types an offset to the data
past the packet type indication.

While we're at it:

Clear the Info column, so it doesn't contain TCP-level stuff.

Use the new tvb_get_raw_bytes_as_string() to get the first 4 bytes of
the payload as a string.

Fix the capitalization of some field names.

Change-Id: I3d5b8f4b4115d7b3675fbebc68a5e67976aba27b
Reviewed-on: https://code.wireshark.org/review/34073
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoAdd a routine to fetch raw bytes into a fixed-length buffer as a string.
Guy Harris [Wed, 24 Jul 2019 18:22:33 +0000 (11:22 -0700)]
Add a routine to fetch raw bytes into a fixed-length buffer as a string.

That's what the remaining calls to tvb_get_nstringz() and
tvb_get_nstringz0() are being used to do, even though those routines
were not intended for that purpose - the calls are extracting from a
text protcool, meaning that the strings are *not* null-terminate in the
packet.

Strings - even null-terminated ones - should, in almost all cases, be
extracted by tvb_get_string_enc() or routines that call it, so that an
encoding is specified.  In the few cases where we're fetching strings
only to be compared to ASCII constants, or to parse as numbers, we can
get away with this.

Change-Id: I29f0532902c4ade2207de7f06db69c32eafd4132
Reviewed-on: https://code.wireshark.org/review/34072
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoClean up handling of group lists.
Guy Harris [Wed, 24 Jul 2019 09:50:41 +0000 (02:50 -0700)]
Clean up handling of group lists.

Use a wmem_strbuf_t for the group list, so it expands as necessary,
rather than a static string buffer.  Pass it to dissect_group() through
dissect_rpc_list().

For each group, get the group name from the call to
dissect_rpc_string(), and append it to the wmem_strbuf_t.

Change-Id: I65b36a9b6d34dd1e88babd005fc60ab46331b382
Reviewed-on: https://code.wireshark.org/review/34069
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoRemove an extra backslash.
Guy Harris [Wed, 24 Jul 2019 09:21:02 +0000 (02:21 -0700)]
Remove an extra backslash.

The only backslashes in invalid_dir_chars on Windows should be the one
escaping " and the one escaping \ itself; there's no need for one to
escape | and, in fact, MSVC warns about that.

Change-Id: I7622f5123df7da3049352dc0e86322b11f8c4150
Reviewed-on: https://code.wireshark.org/review/34068
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agodebian/control: sync downstream wireshark-gtk changes
Peter Wu [Sun, 21 Jul 2019 17:27:07 +0000 (18:27 +0100)]
debian/control: sync downstream wireshark-gtk changes

Add package relations to the deprecated wireshark-gtk package. The
transitional package added by "Stop shipping Wireshark's GTK+ GUI" has
not been incorporated however. The Standards-Version version bump done
in 2.0.5+ga3be9c6-1 (2 Aug 2016) required no changes. Note that both
Debian Stretch and Ubuntu 16.04 have debian-policy 3.9.8.

Change-Id: Idb6f106ea03d47bcf87ba60f5470754e9ae4369e
Reviewed-on: https://code.wireshark.org/review/34047
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agodebian: libwireshark-dev must depend on libwiretap-dev
Gregor Jasny [Fri, 28 Sep 2018 09:12:04 +0000 (11:12 +0200)]
debian: libwireshark-dev must depend on libwiretap-dev

because wireshark/epan/packet_info.h (libwireshark-dev)
depends on wireshark/wiretap/wtap.h (libwiretap-dev)

Change-Id: I76eb17c2c0502f4ea53c6ce934aeaea5ff5cfdd9
Reviewed-on: https://code.wireshark.org/review/34046
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agodebian: Add autopkgtest for testing starting GUI and CLI
Balint Reczey [Sat, 9 Mar 2019 21:00:33 +0000 (22:00 +0100)]
debian: Add autopkgtest for testing starting GUI and CLI

Incorporates debian/tests/ changes up to upstream/3.0.0-76-ge634555b61:

 * Add autopkgtest for testing starting GUI
 * Add missing autopkgtest dependencies
 * Use automatic xvfb server number in tests
 * Use GLX extension in autopkgtest, Qt needs it
 * Install at-spi2-core in gui autopkgtest to avoid error messages
 * debian/test/gui: Ignore stderr from wireshark-gtk since upstream deprecated it
 * debian/tests/gui: Redirect stderr to stdout because Lua prints to stderr
 * Stop shipping Wireshark's GTK+ GUI

Change-Id: I840fa17fb5ac2bc7b4fed36c4286ea97742f7369
Reviewed-on: https://code.wireshark.org/review/28519
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agodebian: Fix permission change in case of local diversions
Topi Miettinen [Sat, 20 Jul 2019 08:46:51 +0000 (11:46 +0300)]
debian: Fix permission change in case of local diversions

/usr/bin/dumpcap may be locally diverted to somewhere else, so let's
query dpkg-divert for the current location.

Change-Id: I4347d390b2c1e94383308d274b113a23bec62f5b
Reviewed-on: https://code.wireshark.org/review/34040
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agof5ethtrailer: type-version subdissector table
Jason Cohen [Tue, 23 Jul 2019 18:03:10 +0000 (13:03 -0500)]
f5ethtrailer: type-version subdissector table

Add a subdissector table to the noise provider.
This allows for extendability via a plugin to support
new versions or message types of trailer noise.

The original f5ethtrailer was distrubuted as a plugin.
Since including it as part of libwireshark it has been
impossible to add support for changes in the data this
dissector decodes once Wireshark is released without patching
and compiling on your own (or possibly building a git dev branch).

This provides a mechanisim to add additional support to the
dissector via plugin without needing to rebuild Wireshark.

Change-Id: I1912ab497e0cfd34dcd92a893b819333665e23cd
Reviewed-on: https://code.wireshark.org/review/34063
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agof5ethtrailer - Collapsible-Header trailer header
Jason Cohen [Mon, 1 Jul 2019 19:07:04 +0000 (14:07 -0500)]
f5ethtrailer - Collapsible-Header trailer header

Brings some less needed info from the trailer header into
a tree collapsible tree.  This save several lines in the packet
decode tree.

Bug: 15880
Change-Id: I7a3330a0a870e1e10f115e26ad7923b46de41f2e
Reviewed-on: https://code.wireshark.org/review/34060
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agoSuqlech a -Wpointer-sign warning.
Guy Harris [Wed, 24 Jul 2019 08:46:28 +0000 (01:46 -0700)]
Suqlech a -Wpointer-sign warning.

Change-Id: I193ff3b2faf37930128bdc02b4da36e32e306b4a
Reviewed-on: https://code.wireshark.org/review/34067
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoInsert REPLACEMENT CHARACTER for various UTF-16 errors.
Guy Harris [Wed, 24 Jul 2019 08:19:15 +0000 (01:19 -0700)]
Insert REPLACEMENT CHARACTER for various UTF-16 errors.

Change-Id: I2f62a409548b2c743864ca8da5733f7a73872b3c
Reviewed-on: https://code.wireshark.org/review/34066
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoE1AP: upgrade dissector to v15.4.0
Pascal Quantin [Wed, 24 Jul 2019 07:19:04 +0000 (09:19 +0200)]
E1AP: upgrade dissector to v15.4.0

Change-Id: Ic9a19804b5e46ca63f3d1256e13173a92fc39f9b
Reviewed-on: https://code.wireshark.org/review/34065
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
4 years agoWindows+CMake: Updates for Visual Studio 2019.
Gerald Combs [Tue, 23 Jul 2019 18:26:29 +0000 (11:26 -0700)]
Windows+CMake: Updates for Visual Studio 2019.

Update our redistributable search logic for VS 2019.

Change-Id: Icccc550bbe062a91206d4ffddeef7bbfbdb8829b
Reviewed-on: https://code.wireshark.org/review/34064
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agoWSUG: Corrected keyboard shortcuts for Edit Menu
Moshe Kaplan [Tue, 23 Jul 2019 17:16:15 +0000 (13:16 -0400)]
WSUG: Corrected keyboard shortcuts for Edit Menu

Change-Id: Id65a56c179bdcf60772239f0f371efa4b79a652b
Reviewed-on: https://code.wireshark.org/review/34062
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoiso7816: link a transaction to a payload dissector
Martin Kaiser [Wed, 3 Jul 2019 21:30:24 +0000 (23:30 +0200)]
iso7816: link a transaction to a payload dissector

When an iso7816 request is forwarded to a payload dissector, store its
handle in the transaction info. Call the new helper function to get the
selected payload dissector's handle.

Use the stored dissector handle to pass the response to the same payload
dissector that handled the request.

Change-Id: Idc6f7fbee978c095719aea937ab3179eac17f2a7
Reviewed-on: https://code.wireshark.org/review/33934
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
4 years agoQt: Stop profile import when action pending
Roland Knall [Mon, 22 Jul 2019 15:03:46 +0000 (17:03 +0200)]
Qt: Stop profile import when action pending

When a reset/delete/add/rename action is pending, profiles
cannot be imported.

Change-Id: I4521b8a265ec4346b7028bc5a7173fd531be24c2
Reviewed-on: https://code.wireshark.org/review/34057
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoQt: Fix invalid characters for profiles
Roland Knall [Mon, 22 Jul 2019 14:42:32 +0000 (16:42 +0200)]
Qt: Fix invalid characters for profiles

Change-Id: Ic44f075b2723e2d5d95e29b485791e89134315e8
Reviewed-on: https://code.wireshark.org/review/34056
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoQt: Fix filename check
Roland Knall [Mon, 22 Jul 2019 14:17:54 +0000 (16:17 +0200)]
Qt: Fix filename check

On *nix only check for the separator, on Windows for all
invalid characters as defined in
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file

Change-Id: I5842ca9f0926cc9d6ce9b839be226051497cf647
Reviewed-on: https://code.wireshark.org/review/34055
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoQt: Cleanup data() method and interface
Roland Knall [Sat, 20 Jul 2019 21:38:24 +0000 (23:38 +0200)]
Qt: Cleanup data() method and interface

Interface resembles the old interface

Change-Id: I7301f8bb6e00d30c20d7e5fdc9252a6a1765ff97
Reviewed-on: https://code.wireshark.org/review/34054
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agowslua: pinfo: make p2p_dir accessible to lua dissectors
Martin Kaiser [Sat, 6 Jul 2019 13:27:20 +0000 (15:27 +0200)]
wslua: pinfo: make p2p_dir accessible to lua dissectors

Some dissectors populate pinfo->p2p_dir with a packet's direction
(incoming / outgoing). Make this info available to lua dissectors.

Add a simple test for Pinfo's new p2p_dir attribute to the wslua
test suite. It checks that p2p_dir is unknown for dhcp packets.
(The dhcp dissector does not set p2p_dir).

Change-Id: I8cc39a11cff840d10ef7fa94d30cbac8bf9b533f
Reviewed-on: https://code.wireshark.org/review/33935
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
4 years agohelper function to get a payload dissector table's current handle
Martin Kaiser [Sun, 14 Jul 2019 13:15:43 +0000 (15:15 +0200)]
helper function to get a payload dissector table's current handle

Add a simple helper function to get the dissector handle that's
currently selected in a given payload dissector table.

We have similar functions already for string and uint dissector tables.

Change-Id: Ia1092fe2b8d038bae2b26db99fd08cd9d6979fcd
Reviewed-on: https://code.wireshark.org/review/33933
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
4 years agoExtend epan library plugins with a tap registration callback
João Valverde [Thu, 18 Jul 2019 09:28:04 +0000 (10:28 +0100)]
Extend epan library plugins with a tap registration callback

tap_register_plugin() is not sufficient for an extension language
implementation because the epan plugin is initialized before
proto_init(), therefore before dissectors have registered taps.

Change-Id: Ief213f85ff4f7182f9af985e5f45476355cc2b86
Reviewed-on: https://code.wireshark.org/review/34048
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
4 years agoQt: Remove unwanted TABs
Stig Bjørlykke [Sun, 21 Jul 2019 21:10:37 +0000 (23:10 +0200)]
Qt: Remove unwanted TABs

Change-Id: Ia7ae4fb47dc0695fb5dadee2926516c38894c0e0
Reviewed-on: https://code.wireshark.org/review/34052
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
4 years agoQt: Improve profile import messages
Stig Bjørlykke [Sun, 21 Jul 2019 20:04:30 +0000 (22:04 +0200)]
Qt: Improve profile import messages

Only show the message "No profiles found for import" when no profiles
actually found, not when found but all are skipped.

Add correct numerus translation for imported and skipped counts.

Change-Id: I0425aafb09fc4722cc765ae4f20ce8248b767c44
Reviewed-on: https://code.wireshark.org/review/34050
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoQt: Fix deletion
Roland Knall [Sun, 21 Jul 2019 20:33:12 +0000 (22:33 +0200)]
Qt: Fix deletion

- If a profile, based on a system default, is being deleted the
selected profile should switch back to the default
- The default profile is not a system profile

Change-Id: I267a0e14b9f974fdabe5a9b21187ad0673265b01
Reviewed-on: https://code.wireshark.org/review/34051
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoLua: remove lua_data_handle
Peter Wu [Sat, 20 Jul 2019 21:24:56 +0000 (22:24 +0100)]
Lua: remove lua_data_handle

Use call_data_dissector directly for the same effect as lua_data_handle.

Remove the special case where DissectorTable.get_dissector() returns the
data dissector for an unsupported type. The documentation says that nil
is returned if the handle is not found, that seems more appropriate.

Change-Id: I128ef90b79bda925a4329202a0b9956e1cf16200
Reviewed-on: https://code.wireshark.org/review/34032
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
4 years agoQt: Fix copy-from menu
Roland Knall [Sat, 20 Jul 2019 20:53:33 +0000 (22:53 +0200)]
Qt: Fix copy-from menu

It stopped working after moving to the ProfileModel

Change-Id: I20d095ece8ce842e9ded4489fd8e062b35ffc968
Reviewed-on: https://code.wireshark.org/review/34030
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoQt: Allow profile import from directory
Roland Knall [Sun, 21 Jul 2019 10:03:25 +0000 (12:03 +0200)]
Qt: Allow profile import from directory

To allow for easy import of profiles, one can select a directory
to import profiles from

Change-Id: I12f66e3dc6bd272d34baa76093152dce412b0158
Reviewed-on: https://code.wireshark.org/review/34038
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoRemove ABI compliance checker code.
João Valverde [Wed, 30 Jan 2019 23:56:54 +0000 (23:56 +0000)]
Remove ABI compliance checker code.

It's broken, unmaintained, poorly implemented and obsoleted by saner
debug-info methods.

Note: To do the compliance check properly would require much more
extensive work to clearly define public and private interfaces (without
manual bookeeping of files or symbols either, of course, because who
would want that...).

Change-Id: Ib801f3c152ca2369f95ca1f4af4d37cd8cc7c47a
Reviewed-on: https://code.wireshark.org/review/33928
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
4 years agoQt: Fix iconsize of info label
Roland Knall [Sun, 21 Jul 2019 12:56:07 +0000 (14:56 +0200)]
Qt: Fix iconsize of info label

Fix the icon size of the info label

Change-Id: I46a156f567602f0e2da5a8697b798aa6b238483f
Reviewed-on: https://code.wireshark.org/review/34041
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoIEEE80211: handle symbol proprietary tag seperately
Jaap Keuter [Fri, 19 Jul 2019 20:31:06 +0000 (22:31 +0200)]
IEEE80211: handle symbol proprietary tag seperately

The contents of the Symbol Proprietary TLV was assumbed to be the same
as the Vendor Specific TLV. This proved not to be the case, at least for
Zebra Extreme networks nodes. This change implements the dissection of
the format as defined in the bug.

Bug: 15909
Change-Id: I4c14dde386d33302d187680f9f09f8b5bb1ef213
Reviewed-on: https://code.wireshark.org/review/34023
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
4 years ago[Automatic update for 2019-07-21]
Gerald Combs [Sun, 21 Jul 2019 08:23:24 +0000 (08:23 +0000)]
[Automatic update for 2019-07-21]

Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ia6332d213cbf2fdf0b52730fddadb7599c630f3a
Reviewed-on: https://code.wireshark.org/review/34035
Reviewed-by: Gerald Combs <gerald@wireshark.org>
4 years agoQt: Profile Treeview fix key navigation
Roland Knall [Sat, 20 Jul 2019 20:55:57 +0000 (22:55 +0200)]
Qt: Profile Treeview fix key navigation

Key navigation is now possible again

Change-Id: I5e19235a94c5a36a10cc07adf1de01d9c3fb04ff
Reviewed-on: https://code.wireshark.org/review/34031
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoDocumentation: convert http URLS to https
Peter Wu [Sat, 20 Jul 2019 15:13:59 +0000 (16:13 +0100)]
Documentation: convert http URLS to https

Remove some dead links or point them to archive.org while at it. All
updated links have been verified.

Change-Id: Icf02167a13d5fe9dfce39ea57525b3f185554c9d
Reviewed-on: https://code.wireshark.org/review/34028
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agoepan,packaging: convert http URLs to https
Peter Wu [Sat, 20 Jul 2019 15:11:39 +0000 (16:11 +0100)]
epan,packaging: convert http URLs to https

Ensure that public text in error messages and dialogs point to https.
Ensure that the generated PDML files include scripts over https.

Change-Id: I75d42704c2bbb33b05492261b3e1d45dc6e301f9
Reviewed-on: https://code.wireshark.org/review/34027
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agocopyright_info: convert GPL-2.0 URL to HTTP
Peter Wu [Sat, 20 Jul 2019 15:01:27 +0000 (16:01 +0100)]
copyright_info: convert GPL-2.0 URL to HTTP

Use a shorter URL and use HTTPS.

Change-Id: I9cfcd52775c95457e81694272dbe795d4eae4e58
Reviewed-on: https://code.wireshark.org/review/34026
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agoFix -Wpointer-sign warning.
Guy Harris [Sat, 20 Jul 2019 18:36:29 +0000 (11:36 -0700)]
Fix -Wpointer-sign warning.

Change-Id: I8e74e90f1383f01633343cd6e72ac2193bfb3e04
Reviewed-on: https://code.wireshark.org/review/34029
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agosmtp: add credentials to the tap.
Dario Lombardo [Thu, 27 Jun 2019 12:38:54 +0000 (14:38 +0200)]
smtp: add credentials to the tap.

Change-Id: I85afccd7e05efd9d293d6b8c1b5702faf8d34b14
Reviewed-on: https://code.wireshark.org/review/33764
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
4 years agowiretap: candump: Don't generate a temporary PCAP file
Maksim Salau [Thu, 18 Jul 2019 18:20:03 +0000 (21:20 +0300)]
wiretap: candump: Don't generate a temporary PCAP file

It's preferable to parse text files and generate packets on demand,
rather than generate a temporary PCAP file and dump all available
packets into it.

Parsing on the fly has a benefit of handling damaged files up to the
point of damage, while the approach with a temporary file doesn't
allow either to report that the original file is damaged or perform
conversion in the first place.

This version works faster than the previous one.

Command:
time ./run/tshark -r ./candump-2019-07-01_111120.log.gz > /dev/null

The test file is attached to the bug 15889

The current version:
real    0m0,597s
user    0m0,533s
sys     0m0,118s

The previous version:
real    0m2,176s
user    0m1,966s
sys     0m0,100s

Bug: 15889
Change-Id: I862ce47752531c2e9d9459f5d865c1fc08f32fea
Reviewed-on: https://code.wireshark.org/review/34007
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agoClean up the handling of the "friendly name".
Guy Harris [Fri, 19 Jul 2019 21:05:56 +0000 (14:05 -0700)]
Clean up the handling of the "friendly name".

Fetch it by adding it with proto_tree_add_item_ret_display_string(), and
then use the resulting displayable string to append to columns and
protocol tree items.  Given that the string in question is ISO 8859-1,
according to the KNXnet/IP spec, and that it must therefore be converted
to UTF-8, that's the right thing to do.

Use wmem string buffers to hold the strings to append - using a
fixed-length buffer isn't a good idea when you are dealing with UTF-8
strings, as you might cut a UTF-8 sequence short in the middle.

Don't consruct strings that we never use.

While we're at it, give a URL to find KNX specifications.

Change-Id: Ibec4f6c83a62e141bd8ce0e5dfd7dd45ff627fe4
Reviewed-on: https://code.wireshark.org/review/34024
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoUse proto_tree_add_item_ret_display_string() to add string items.
Guy Harris [Fri, 19 Jul 2019 20:34:16 +0000 (13:34 -0700)]
Use proto_tree_add_item_ret_display_string() to add string items.

It does all the work done by the calls it replaces, *and* it takes an
encoding argument, so the string data is converted, if necessary, to
UTF-8.  (Not necessary in this case, at least as I read the protocol
spec, but it's the right thing to do in any case.)

Plus, as we're using proto_tree_add_item_ret_display_string(), the
string we're displaying will be in a displayable format.

Change-Id: I7f5e46dcdbb8f3d3749ef539a31f6208371b72cd
Reviewed-on: https://code.wireshark.org/review/34022
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoProvide only one data rate per user for VHT frames.
Guy Harris [Fri, 19 Jul 2019 18:42:19 +0000 (11:42 -0700)]
Provide only one data rate per user for VHT frames.

Don't provide an extra not-per-user data rate equal to the data rate for
the highest user number; that makes no sense.

Bug: 15928
Change-Id: Ie6bf5853d630bbf33afd423dc7a8eca26abdf83a
Reviewed-on: https://code.wireshark.org/review/34018
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoXnAP: upgrade dissector to v15.4.0
Pascal Quantin [Fri, 19 Jul 2019 12:15:32 +0000 (14:15 +0200)]
XnAP: upgrade dissector to v15.4.0

Change-Id: Ia26593e7895709671a7a9d4a51bb6788e4059c94
Reviewed-on: https://code.wireshark.org/review/34015
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
4 years agopop3: add credentials to tap.
Dario Lombardo [Fri, 28 Jun 2019 21:33:06 +0000 (23:33 +0200)]
pop3: add credentials to tap.

Change-Id: I0779a4c11451ee63be8d10ee78a7f920f519f77a
Reviewed-on: https://code.wireshark.org/review/33799
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
4 years agoimap: add credentials to tap.
Dario Lombardo [Fri, 28 Jun 2019 11:59:32 +0000 (13:59 +0200)]
imap: add credentials to tap.

Change-Id: I6858e66dcda643a97e9f1b29b62edc5ceb8af064
Reviewed-on: https://code.wireshark.org/review/33765
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
4 years agoimap: dissect username and password from LOGIN command.
Dario Lombardo [Thu, 27 Jun 2019 11:44:00 +0000 (13:44 +0200)]
imap: dissect username and password from LOGIN command.

Change-Id: I84ff13cdda7af60bb6ce588b7ec3bccb1911ee97
Reviewed-on: https://code.wireshark.org/review/33756
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
4 years agoQt: Improve profiles import UI
Roland Knall [Fri, 19 Jul 2019 09:46:10 +0000 (11:46 +0200)]
Qt: Improve profiles import UI

This also allows for profile zips to have a different structure,
and only directories containign actual configuration files will
be part of the import

- Choosen path sticks and starts with current application path
- "Default" can no longer be imported as a profile
- skipped profiles count is being displayed

Change-Id: I0549a1ae81229940e573674a84f2912119d6ee21
Reviewed-on: https://code.wireshark.org/review/34013
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoNGAP: upgrade dissector to v15.6.0
Pascal Quantin [Fri, 19 Jul 2019 10:51:45 +0000 (12:51 +0200)]
NGAP: upgrade dissector to v15.6.0

Change-Id: Iac53380ba1a6ba105103db7104d44688bbbe383d
Reviewed-on: https://code.wireshark.org/review/34014
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
4 years agoQt: Delete copied profile proper
Roland Knall [Thu, 18 Jul 2019 21:06:59 +0000 (23:06 +0200)]
Qt: Delete copied profile proper

If a profile is a copy of another profile and get's deleted
without being saved, the original profile got deleted

Change-Id: Iffccb2e29131f97ad6fe71362946aad4e076eb3f
Reviewed-on: https://code.wireshark.org/review/34011
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agodhcp: fix memleak on exceptions in dissect_dhcpopt_avaya_ip_telephone
Peter Wu [Wed, 17 Jul 2019 22:55:01 +0000 (23:55 +0100)]
dhcp: fix memleak on exceptions in dissect_dhcpopt_avaya_ip_telephone

Do not use g_malloc, it leaks when accessing the tvb throws an error.

Change-Id: I5c6515da2184e2bea496d352461784cf845c3e18
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15673
Fixes: v3.1.0rc0-136-gc28d8f937a ("packet-dhcp.c: Fix modification of a const char* string")
Reviewed-on: https://code.wireshark.org/review/33999
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agoCoAP: add frame support for CoAP over TCP, TLS, WebSockets (RFC 8323)
Peter Wu [Thu, 18 Jul 2019 01:10:45 +0000 (02:10 +0100)]
CoAP: add frame support for CoAP over TCP, TLS, WebSockets (RFC 8323)

Support is limited to message framing.

Bug: 15910
Change-Id: Ia27c0b8428842618af00720441a9ef9cf163fecb
Reviewed-on: https://code.wireshark.org/review/34001
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agoQt: Profile Dialog UI fixed
Roland Knall [Thu, 18 Jul 2019 20:39:03 +0000 (22:39 +0200)]
Qt: Profile Dialog UI fixed

Enter on dialog closes dialog only if filter textbox is not focused

Change-Id: I2d75c737ab2bd480f353340506be756edad5a9b9
Reviewed-on: https://code.wireshark.org/review/34010
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoQt: Use correct name for copy
Roland Knall [Thu, 18 Jul 2019 21:18:09 +0000 (23:18 +0200)]
Qt: Use correct name for copy

If the element to copy from has already been renamed, use the new (not
yet saved) name

Change-Id: I868c8ba18566adf9fbad4f1e42a22bdcd9fcbe99
Reviewed-on: https://code.wireshark.org/review/34012
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoQt: Profile import button shall not be small
Stig Bjørlykke [Thu, 18 Jul 2019 20:34:01 +0000 (22:34 +0200)]
Qt: Profile import button shall not be small

Don't set attribute Qt::WA_MacSmallSize on the Profile import button.

Also fix a typo: occured -> occurred.

Change-Id: Id14001e71605bab97fe8ac3f14ecbc8242bdda17
Reviewed-on: https://code.wireshark.org/review/34008
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoCMake: Use tab for indentation
Stig Bjørlykke [Thu, 18 Jul 2019 20:37:03 +0000 (22:37 +0200)]
CMake: Use tab for indentation

Change-Id: I9d08443169f6b0b87c37ff20babffee1e6769ae7
Reviewed-on: https://code.wireshark.org/review/34009
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
4 years agoprofile_model.cpp: add a missing break
Pascal Quantin [Thu, 18 Jul 2019 07:41:25 +0000 (09:41 +0200)]
profile_model.cpp: add a missing break

Change-Id: I08f6f0f02a637a1b6c532b5e41396f5ebcd1ed99
Reviewed-on: https://code.wireshark.org/review/34003
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoCoAP: add CoAP Signalling Codes (RFC 8323)
Peter Wu [Thu, 18 Jul 2019 01:46:20 +0000 (02:46 +0100)]
CoAP: add CoAP Signalling Codes (RFC 8323)

Update names and RFC references based on the IANA registry at
https://www.iana.org/assignments/core-parameters/core-parameters.xhtml

Bug: 15910
Change-Id: I56a4cc3c23fee321b09547254a33f6a76d46cc9d
Reviewed-on: https://code.wireshark.org/review/34002
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
4 years agofuzzshark: add usage documentation
Peter Wu [Wed, 17 Jul 2019 22:21:45 +0000 (23:21 +0100)]
fuzzshark: add usage documentation

For those running the 'fuzzshark' binary directly, try to show some
helpful usage information instead of crashing with an assertion failure.

This does not affect the oss-fuzz builds which use the 'fuzzshark_*'
targets instead of the 'fuzzshark' one.

Change-Id: I3eeb64f416a30abc7aee18a0d4505d4e8de446ce
Reviewed-on: https://code.wireshark.org/review/33998
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
4 years agoQt: Fix various issues for profile manager
Roland Knall [Fri, 12 Jul 2019 19:35:05 +0000 (21:35 +0200)]
Qt: Fix various issues for profile manager

- Fixing the fact, that the profile did not allways switch to the active profile
when pressing the OK button.
- Adding a new profile can be repeated, if the name "New Profile" is already in
use, a number is incremented and added to subsequently new profiles.
- Copying a profile multiple times, creates individual names each time
- Global profiles should come last in the statusbar popup
- Global profiles should be called "System profiles"
- Fix null-pointer that could happen while querying "DATA_IS_SELECTED"
- Renaming an existing profile was not correctly indicated
- Renaming the currently selected profile works now

Change-Id: Ifa47fd672a6976c07d3e80741cfd61b548a5e1f8
Reviewed-on: https://code.wireshark.org/review/33921
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoZigBee: Add Address fields
Kenneth Soerensen [Wed, 17 Jul 2019 18:55:22 +0000 (20:55 +0200)]
ZigBee: Add Address fields

Change-Id: I8b2f2b682f46b85230649e852f3fa70af6d237ef
Reviewed-on: https://code.wireshark.org/review/33992
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
4 years agoZigBee: Correct naming
Kenneth Soerensen [Wed, 17 Jul 2019 18:11:33 +0000 (20:11 +0200)]
ZigBee: Correct naming

Change-Id: Ide220a1899bba6327dc7fbfcc3ac9ac0113b929f
Reviewed-on: https://code.wireshark.org/review/33991
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
4 years agoQUIC: fix out-of-bounds write due to missing CID length check
Peter Wu [Wed, 17 Jul 2019 23:13:33 +0000 (00:13 +0100)]
QUIC: fix out-of-bounds write due to missing CID length check

The length was previously increased to max 255, but v1 limits it. Be
sure to check the bounds before doing anything.

Bug: 15919
Change-Id: I2ed8469d882d5ac2dc4c21e3f5486534e4bf32e6
Fixes: v3.1.0rc0-1289-g3967f60e45 ("QUIC: update for new Connection ID Lengths (draft -22)")
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15936
Reviewed-on: https://code.wireshark.org/review/34000
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
4 years agoDon't just grab raw string data with tvb_memcpy().
Guy Harris [Wed, 17 Jul 2019 21:48:09 +0000 (14:48 -0700)]
Don't just grab raw string data with tvb_memcpy().

Use proto_tree_add_item_ret_display_string() routines to add strings
if we want to display the string's value in a column, and just use
proto_tree_add_item() if we don't need the string's value.  That way,
all strings are fetched using an encoding value, to properly map to
UTF-8, and, if necessary, are formatted for display.

Add comments asking about encodings.

Change-Id: I32dbdf17c90e77cc080d6132c740c8c5d19ef4c5
Reviewed-on: https://code.wireshark.org/review/33997
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoClean up comments.
Guy Harris [Wed, 17 Jul 2019 21:27:51 +0000 (14:27 -0700)]
Clean up comments.

VisibleString does, in fact, mean ASCII in PROFINET.

Put a space after a comma.

Change-Id: I0b9da9599ddd5429736dff598e5c37e9cac88bc6
Reviewed-on: https://code.wireshark.org/review/33996
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoQt: Import Profile information
Roland Knall [Wed, 10 Jul 2019 22:25:45 +0000 (00:25 +0200)]
Qt: Import Profile information

Allow easy import of profiles. Profiles must be stored inside
a zip file, with no additional hierarchy.

Change-Id: I0ae77460c20ef6b3e447906e671b0cefa6b9b032
Reviewed-on: https://code.wireshark.org/review/33881
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
4 years agoDon't just grab raw string data with tvb_memcpy().
Guy Harris [Wed, 17 Jul 2019 14:26:54 +0000 (07:26 -0700)]
Don't just grab raw string data with tvb_memcpy().

Use proto_tree_add_item_ret_display_string() routines to add strings if
we want to display the string's value in a column, and just use
proto_tree_add_item() if we don't need the string's value.  That way,
all strings are fetched using an encoding value, to properly map to
UTF-8, and, if necessary, are formatted for display.

Add comments about fields that have type VisibleString, asking whether
that means "ASCII" or "just the "Basic" part of ISO 646", where the
latter is ENC_ISO_646_BASIC.

Add a comment about fields using "The definition of IETF RFC 5890" -
that means "Punycode", but I don't think we map Punycode to Unicode;
perhaps we should.  Also ask whether that also implies RFC 1035's
encoding of domain names as sequences of counted strings.

Change-Id: Ie8d5bc18d2846f8d723019b22f69a50ce55f9a9b
Reviewed-on: https://code.wireshark.org/review/33986
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agotvbuff_lz*: fix typo in comment
Aurelien Aptel [Wed, 17 Jul 2019 11:49:18 +0000 (13:49 +0200)]
tvbuff_lz*: fix typo in comment

Change-Id: Id2b36454e678151ea5948f8e068ef400dd562188
Reviewed-on: https://code.wireshark.org/review/33985
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoFix signedness warnings.
Guy Harris [Wed, 17 Jul 2019 07:33:47 +0000 (00:33 -0700)]
Fix signedness warnings.

Change-Id: I2a0d6f6e73c56eb3b531d6e805c9db435ceb72e7
Reviewed-on: https://code.wireshark.org/review/33983
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoCouchbase: Fix dissector for dcp prepare
Trond Norbye [Wed, 17 Jul 2019 09:32:36 +0000 (11:32 +0200)]
Couchbase: Fix dissector for dcp prepare

The timeout value was removed from the DCP PREPARE
message as it was never used (and will never occur
in a released version of Couchbase)

Change-Id: I95f5bb3a0878237bf0339da48476fda437740c25
Reviewed-on: https://code.wireshark.org/review/33984
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
4 years agoClean up string handling.
Guy Harris [Wed, 17 Jul 2019 04:43:15 +0000 (21:43 -0700)]
Clean up string handling.

Use tvb_get_string_enc() routines to fetch strings; all strings must
have an encoding value, to properly map to UTF-8.

Use format_text() when displaying string values in columns.

Show the interpretation of "character set" values.

Choose the encoding value based on the "character set" value.

While we're at it, use the XDLC_S_U_MASK #define, rather than a raw hex
value, when testing for S frames vs. U frames.

Change-Id: Idf9d6302473bbffdfa67341c381575aa525a6d84
Reviewed-on: https://code.wireshark.org/review/33982
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agoBGP: Update description for IE Flag (EVPN IGMP)
Uli Heilmeier [Tue, 16 Jul 2019 18:38:07 +0000 (20:38 +0200)]
BGP: Update description for IE Flag (EVPN IGMP)

Ping-Bug: 15911
Change-Id: I2607eb96e8a217451a493a301dc06b56a4db3081
Reviewed-on: https://code.wireshark.org/review/33966
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
4 years agoceph: remove unnecessary ifdef G_STATIC_ASSERT check
Peter Wu [Tue, 16 Jul 2019 23:05:22 +0000 (00:05 +0100)]
ceph: remove unnecessary ifdef G_STATIC_ASSERT check

Supported since GLib 2.20, we require at least 2.32.

Change-Id: I0bdeaaaf11dad5352aa2f6e4dc9e23be9dc93e3a
Reviewed-on: https://code.wireshark.org/review/33977
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agocapchild,ifaces: use g_get_monotonic_time
Peter Wu [Tue, 16 Jul 2019 22:51:32 +0000 (23:51 +0100)]
capchild,ifaces: use g_get_monotonic_time

Simplify timing code by relying on g_get_monotonic_time which has the
additional benefit that it is unaffected by clock jumps.

Change-Id: Ib61b848eb5e20d68d486a07e3528ccafb03f8814
Reviewed-on: https://code.wireshark.org/review/33976
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agofile: remove use of g_get_current_time
Peter Wu [Tue, 16 Jul 2019 22:11:59 +0000 (23:11 +0100)]
file: remove use of g_get_current_time

Replace g_get_current_time by g_get_monotonic_time (since GLib 2.28, we
require 2.32) to simplify code and ignore time jumps. Qt does not need
the elapsed time, so remove the parameter from the progress callback.

Change-Id: Icaad4b909b9cb4bb07d28fcdf3d383d64aa00127
Reviewed-on: https://code.wireshark.org/review/33975
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
4 years agoDon't just grab raw string data with tvb_memcpy().
Guy Harris [Wed, 17 Jul 2019 02:52:41 +0000 (19:52 -0700)]
Don't just grab raw string data with tvb_memcpy().

Use tvb_get_string_enc() to fetch strings.  That way, all strings are
fetched using an encoding value, to properly map to UTF-8.

While we're at it, add the RFC for the final version of the protocol.

Change-Id: If103d9464a313bd61948b931291a3763ea85d01b
Reviewed-on: https://code.wireshark.org/review/33981
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoDon't just grab raw string data with tvb_memcpy().
Guy Harris [Tue, 16 Jul 2019 23:42:35 +0000 (16:42 -0700)]
Don't just grab raw string data with tvb_memcpy().

Use tvb_get_string_enc() routines to fetch them; all strings must have
an encoding value, to properly map to UTF-8.

While we're at it, fix heuristic test to make sure we have a full TALI
header in the *captured* data.

Change-Id: Ia572707f8d7da89d3fe31e839e1cbe4dc5e23c43
Reviewed-on: https://code.wireshark.org/review/33980
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoAsk in a comment about DNS-style domain names.
Guy Harris [Tue, 16 Jul 2019 23:38:02 +0000 (16:38 -0700)]
Ask in a comment about DNS-style domain names.

Change-Id: Idcf5ed5db1d04f48849e458d85c3a04e6d1d8d43
Reviewed-on: https://code.wireshark.org/review/33979
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoDon't just grab raw string data with tvb_memcpy().
Guy Harris [Tue, 16 Jul 2019 22:55:23 +0000 (15:55 -0700)]
Don't just grab raw string data with tvb_memcpy().

Use proto_tree_add_item_ret_display_string() routines to add strings if
we want to display the string's value in a column.  That way, all
strings are fetched using an encoding value, to properly map to UTF-8,
and are formatted for display.

Change-Id: I4acd9ed7cfad3342be84a4773187dd531949f47b
Reviewed-on: https://code.wireshark.org/review/33974
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoClean up handling of the command parameter.
Guy Harris [Tue, 16 Jul 2019 22:08:02 +0000 (15:08 -0700)]
Clean up handling of the command parameter.

It's an unsigned int, as per the protocol spec.  Treat it as such.  (Add
a URL for the protocol spec while we're at it.)

Convert it from a string of ASCII hex digits to a number using
ws_hexstrtou32(); that routine does the appropriate checks.

Clean up blank lines while we're at it - add some and remove some.

Change-Id: I2c0832c4a57c121e2e64de49a8678b747025f35e
Reviewed-on: https://code.wireshark.org/review/33972
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
4 years agoX2AP: upgrade dissector to v15.6.0
Pascal Quantin [Tue, 16 Jul 2019 21:31:53 +0000 (23:31 +0200)]
X2AP: upgrade dissector to v15.6.0

Change-Id: Iffa23a10350ad8ef765401b50373a7d6aaf5d2bf
Reviewed-on: https://code.wireshark.org/review/33971
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
4 years agotvb_lz77huff: reduce stack memory usage
Aurelien Aptel [Tue, 16 Jul 2019 09:08:13 +0000 (11:08 +0200)]
tvb_lz77huff: reduce stack memory usage

clang errs about the stack frame size being too big.

* use indexes instead of pointers
* use guint8 instead of gboolean (== int)
* remplace hard coded 512 with #define

Change-Id: Idae70677f20e88ac8bba93899573e0137b9a3d7e
Fixes: 0db39ae59a ("smb2: add support for decompression")
Reviewed-on: https://code.wireshark.org/review/33965
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>