metze/wireshark/wip.git
5 years agoRecognize -zfollow,ssl,ascii,0 for compatibility
Peter Wu [Thu, 4 Oct 2018 21:33:33 +0000 (23:33 +0200)]
Recognize -zfollow,ssl,ascii,0 for compatibility

Instead of reporting it as unsupported, silently map ssl to tls.

Change-Id: I4c7436872137749634590a99201f2b8222c69fb4
Fixes: v2.9.0rc0-1819-gcd95e197ca ("Start renaming SSL to TLS.")
Reviewed-on: https://code.wireshark.org/review/30025
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agogprscdr: Update to 3GPP TS 32.298 V15.4.0
Joakim Karlsson [Thu, 4 Oct 2018 17:09:38 +0000 (01:09 +0800)]
gprscdr: Update to 3GPP TS 32.298 V15.4.0

Change-Id: I3f374191d6494fd77e3cb81299b8aed1eb926131
Reviewed-on: https://code.wireshark.org/review/30022
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agopfcp: Update to 3GPP TS 29.244 V15.3.0
Joakim Karlsson [Thu, 4 Oct 2018 16:22:28 +0000 (00:22 +0800)]
pfcp: Update to 3GPP TS 29.244 V15.3.0

Change-Id: I5aa129de90e3f249c42e2fe563e105f26002977d
Reviewed-on: https://code.wireshark.org/review/30021
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoRevert "Use CMAKE_EXE_LINKER_FLAGS to set link flags on executables."
Guy Harris [Thu, 4 Oct 2018 18:09:14 +0000 (18:09 +0000)]
Revert "Use CMAKE_EXE_LINKER_FLAGS to set link flags on executables."

This reverts commit 84447550efdad68acfc69281750ed016f7f96716.

Reason for revert: CMake's documentation for the flags variables is
close to content-free, giving no indication what the link flags used
in the link will be, given a combination of various CMAKE.*LINKER_FLAGS
variables and LINK_FLAGS properties.  That makes it extremely difficult
to determine why this change happens to cause some executables to
be linked with "/INCREMENTAL" and others to be linked with
"/INCREMENTAL:YES", even though we add "/INCREMENTAL:NO" to
WS_LINK_FLAGS and add WS_LINK_FLAGS to CMAKE_EXE_LINKER_FLAGS - or
why *not* setting CMAKE_EXE_LINKER_FLAGS and instead using LINK_FLAGS
*doesn't* cause that to happen.

Maybe it's an issue of CMAKE_EXE_LINKER_FLAGS vs.
CMAKE_EXE_LINKER_FLAGS_<CONFIG>, but the documentation doesn't
clearly indicate whether, for example, the link flags for a particular
executable target are a combination of CMAKE_EXE_LINKER_FLAGS, the
CMAKE_EXE_LINKER_FLAGS_<CONFIG> flag for the configuration of this
build, and the LINK_FLAGS property of the target, if any.  That's
the most *obvious* behavior to implement, but if that's the behavior
that's implemented, I'm not sure why the change being reverted had the
effect it did.

Change-Id: I6a73fe88be65378d506a89460f7362076233f319
Reviewed-on: https://code.wireshark.org/review/30023
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
5 years agoieee80211: register some etts.
Jeff Morriss [Thu, 4 Oct 2018 14:19:14 +0000 (10:19 -0400)]
ieee80211: register some etts.

Unregistered etts will lead to an assertion/abort when used.

Change-Id: I0322559358b1e286666322fef093e5b5123253a1
Reviewed-on: https://code.wireshark.org/review/30018
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoh248_3gpp: register an ett.
Jeff Morriss [Thu, 4 Oct 2018 14:07:36 +0000 (10:07 -0400)]
h248_3gpp: register an ett.

Unregistered etts will lead to an assertion/abort when used.

Change-Id: I2837311fcf472417ba36670e42073d15d475afd6
Reviewed-on: https://code.wireshark.org/review/30017
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoPFCP: Join flags in Usage Report Trigger and Reporting Triggers
slavka [Thu, 4 Oct 2018 10:56:13 +0000 (12:56 +0200)]
PFCP: Join flags in Usage Report Trigger and Reporting Triggers

Change-Id: Iab281fb3a12344a6a767a64c967f40cf2fc31427
Reviewed-on: https://code.wireshark.org/review/30012
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoIEEE 1909.3: Add PSID values value_string.
AndersBroman [Thu, 4 Oct 2018 10:49:51 +0000 (12:49 +0200)]
IEEE 1909.3: Add PSID values value_string.

Bug: 13766
Change-Id: Ib0635d0748224f673f5349b83bca74a918000cab
Reviewed-on: https://code.wireshark.org/review/30011
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoLTE RRC: fix RLC configuration for NB-IoT UE
Pascal Quantin [Thu, 4 Oct 2018 11:26:30 +0000 (13:26 +0200)]
LTE RRC: fix RLC configuration for NB-IoT UE

R15 introduced UM mode for DRBs.

Change-Id: Ifd9030a46bcb237d6e6c1909f2dbad3be3a4eb86
Reviewed-on: https://code.wireshark.org/review/30014
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agoCMP: adding p10cr PKIbody dissection
Martin Peylo [Wed, 3 Oct 2018 11:19:52 +0000 (14:19 +0300)]
CMP: adding p10cr PKIbody dissection

Enabled by now-existing PKCS#10 dissector

Change-Id: Ia4b7e998f2c61d482daf3f8b45c141bed31e6653
Reviewed-on: https://code.wireshark.org/review/30009
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoRevert "gsm-a-common: Use expert info on "to few bytes left""
Anders Broman [Thu, 4 Oct 2018 11:15:40 +0000 (11:15 +0000)]
Revert "gsm-a-common: Use expert info on "to few bytes left""

This test does not work when looking for optional elements.
This reverts commit 0cc8feb4b6bd5c2576ae5f11e947d172fe1e6cb1.

Change-Id: Ib6794c647f6e1541b7257a59c4717a6a497c3a8a
Reviewed-on: https://code.wireshark.org/review/30013
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoXDMCP: fix assertion failure due to tvb not being passed
Ian Chard [Thu, 4 Oct 2018 09:58:34 +0000 (10:58 +0100)]
XDMCP: fix assertion failure due to tvb not being passed

Bug: 15161
Change-Id: I9884e793fa40dde8c3c097b8d46b92ea012d8fef
Reviewed-on: https://code.wireshark.org/review/30010
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoQt: show more infos about why interfaces are not loaded.
Dario Lombardo [Mon, 1 Oct 2018 20:09:33 +0000 (22:09 +0200)]
Qt: show more infos about why interfaces are not loaded.

Change-Id: Ie5a28587f711282fd5d83b5513b42594c73ca514
Reviewed-on: https://code.wireshark.org/review/29996
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAdd new PKCS#10 support to release notes
Martin Peylo [Thu, 4 Oct 2018 06:15:16 +0000 (09:15 +0300)]
Add new PKCS#10 support to release notes

Added in commit 2d8e3939616afbcf1a8adc300b2e3e334a0bd768

Change-Id: I9a0daa0eaf24384da3b0ed9d0bc92fe868d02229
Reviewed-on: https://code.wireshark.org/review/30007
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoCMP: cleaning out excessive exports
Martin Peylo [Wed, 3 Oct 2018 10:42:29 +0000 (13:42 +0300)]
CMP: cleaning out excessive exports

Change-Id: Icd238a2be0978e02dfd0b3e7bee21c30ebbde6d4
Reviewed-on: https://code.wireshark.org/review/30002
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAdd new file formats to the release notes.
Gerald Combs [Wed, 3 Oct 2018 23:35:40 +0000 (16:35 -0700)]
Add new file formats to the release notes.

Change-Id: Ib46ce218063cb09a277ca0642a532120c9f27b2a
Reviewed-on: https://code.wireshark.org/review/30006
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoQt: Show global profiles in Italic
Stig Bjørlykke [Wed, 3 Oct 2018 07:39:50 +0000 (09:39 +0200)]
Qt: Show global profiles in Italic

The Configuration Profiles dialog shows global profiles in Italic.
Align the profiles popup menu to also do this.

Change-Id: Ifc22f1bb905cd407682adbdc5e4cbee4c42cb961
Reviewed-on: https://code.wireshark.org/review/29989
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoLPP: upgrade dissector to v15.1.0
Pascal Quantin [Wed, 3 Oct 2018 20:27:47 +0000 (22:27 +0200)]
LPP: upgrade dissector to v15.1.0

Change-Id: Id11d25be9a86693b61be7dba04f86a4b222cf9d4
Reviewed-on: https://code.wireshark.org/review/30005
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agoCRMF: cleaning out excessive exports
Martin Peylo [Wed, 3 Oct 2018 10:33:21 +0000 (13:33 +0300)]
CRMF: cleaning out excessive exports

Change-Id: If0e95b6114d5a8d94b30d5d6e4bc330d8f43b939
Reviewed-on: https://code.wireshark.org/review/30001
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoIEEE 1909.3: Add version 3 dissection.
AndersBroman [Wed, 3 Oct 2018 15:05:10 +0000 (17:05 +0200)]
IEEE 1909.3: Add version 3 dissection.

Bug: 13766
Change-Id: Ia4d7856d6692961cf0dab773c2a33b4f319add50
Reviewed-on: https://code.wireshark.org/review/29998
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoUse CMAKE_EXE_LINKER_FLAGS to set link flags on executables.
Guy Harris [Wed, 3 Oct 2018 20:03:17 +0000 (13:03 -0700)]
Use CMAKE_EXE_LINKER_FLAGS to set link flags on executables.

Just set CMAKE_EXE_LINKER_FLAGS to include ${WS_LINK_FLAGS}, and also
set it to include setargv.obj on Windows.

This is a bit simpler.

Change-Id: Idf9c632d9d3bff1ec6e70396641319155e08aa4f
Reviewed-on: https://code.wireshark.org/review/30004
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoTools: Add systemd-devel to rpm-setup.sh.
Gerald Combs [Wed, 3 Oct 2018 16:38:44 +0000 (09:38 -0700)]
Tools: Add systemd-devel to rpm-setup.sh.

Change-Id: Ib6599926146b58cff66dda978c61b6a705f7565d
Reviewed-on: https://code.wireshark.org/review/30000
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoMAC-NR: Update to current RAR PDU format
Martin Mathieson [Wed, 3 Oct 2018 17:24:41 +0000 (18:24 +0100)]
MAC-NR: Update to current RAR PDU format

Change-Id: I802a74148386e972153b3cb9e2a25adb117811d6
Reviewed-on: https://code.wireshark.org/review/30003
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
5 years agodebian: add libsystemd-journal-dev as alternative.
Dario Lombardo [Mon, 1 Oct 2018 11:58:24 +0000 (13:58 +0200)]
debian: add libsystemd-journal-dev as alternative.

Required for building on ubuntu 14.04.

Change-Id: I2ebdceb1c73d093458adc05cf38629ac0b50c9e4
Reviewed-on: https://code.wireshark.org/review/29990
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoDebian: Add a missing symbol.
Gerald Combs [Wed, 3 Oct 2018 16:30:55 +0000 (09:30 -0700)]
Debian: Add a missing symbol.

Change-Id: Id6135a51a25e22a03de6fd396786658cac9a25a0
Reviewed-on: https://code.wireshark.org/review/29999
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoNew PKCS#10 CertificationRequest dissector
Martin Peylo [Wed, 3 Oct 2018 06:53:43 +0000 (09:53 +0300)]
New PKCS#10 CertificationRequest dissector

Specified in RFC2986
PEM header from RFC 7468
MIME type and .p10 file extension from RFC 5967
.csr file extension from common practice

Change-Id: I7dfe0a19b70eaf3352af2463759a342277d53db6
Reviewed-on: https://code.wireshark.org/review/29994
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoPROFINET: ARServerblock is correctly dissected.
moguz [Fri, 28 Sep 2018 16:44:37 +0000 (09:44 -0700)]
PROFINET: ARServerblock is correctly dissected.

ARServerBlock function causes MalformedPacket error.
Padding in the function is fixed.

Change-Id: I498b1f15abcaab2a0be19096939fae5402747b68
Reviewed-on: https://code.wireshark.org/review/29899
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
(cherry picked from commit c3b0bcaed51b80faaed1bdfbfae111ef162f9672)
Reviewed-on: https://code.wireshark.org/review/29993

5 years agoMGCP: added NCS ResourceID
Bruno Verstuyft [Wed, 3 Oct 2018 09:14:04 +0000 (11:14 +0200)]
MGCP: added NCS ResourceID

Change-Id: I561df5159243910356abb57624b20e630a2460d7
Reviewed-on: https://code.wireshark.org/review/29992
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoepan: add missing comment for function parameter on register_tap_listener
Nick Calus [Wed, 3 Oct 2018 12:34:44 +0000 (14:34 +0200)]
epan: add missing comment for function parameter on register_tap_listener

Added parameter documentation that was missing for parameter tap_finish
on function register_tap_listener in epan/tap.h

Bug: 15162
Change-Id: I2b9f2a8816c049647128b317433b7dc21cc44f91
Reviewed-on: https://code.wireshark.org/review/29995
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
5 years agoTLS: support RFC 8449 - record_size_limit (28)
Peter Wu [Wed, 3 Oct 2018 08:43:41 +0000 (10:43 +0200)]
TLS: support RFC 8449 - record_size_limit (28)

As seen in a capture from Firefox Nightly.

Change-Id: I0bb69b716c02df565f91afa2606d0957c79ee6fc
Reviewed-on: https://code.wireshark.org/review/29991
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>
5 years agoPROFINET: Decoding of DCP SetResBlock
basakkal [Wed, 3 Oct 2018 06:49:18 +0000 (23:49 -0700)]
PROFINET: Decoding of DCP SetResBlock

At SetResBlock, the field "Response" should be "Option"
according to specification. It is corrected.

Moreover, hf and display filter are changed.

Change-Id: Ieae38616b130efc118673814f9fcee4241e75f05
Reviewed-on: https://code.wireshark.org/review/29988
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years ago.mailmap: update of September (2018)
Alexis La Goutte [Sun, 16 Sep 2018 19:07:14 +0000 (19:07 +0000)]
.mailmap: update of September (2018)

Change-Id: Id7a13ba71feb78c87ac87f0acd7a63de15aaf7e3
Reviewed-on: https://code.wireshark.org/review/29684
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoQt/ByteViewTab: document potential pitfall
Peter Wu [Sat, 29 Sep 2018 17:05:45 +0000 (19:05 +0200)]
Qt/ByteViewTab: document potential pitfall

If ByteViewTab is related to a use-after-free crash, then the issue is
probably related to the backing buffer becoming invalid. Document this.

Change-Id: I7f7c8daaf86b42f00b7886de54507d425e5312f6
Reviewed-on: https://code.wireshark.org/review/29924
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agos7comm dissector infinite loop error is fixed.
basakkal [Tue, 2 Oct 2018 11:59:23 +0000 (04:59 -0700)]
s7comm dissector infinite loop error is fixed.

When list_count and list_len are large numbers, their
multiplication exceeds guint16. The multiplication is casted to
guint32. list_len was controlled whether it is 0 or not. However,
list_count should also have been controlled. The control for
list_count is also added to the code. Moreover, if their
multiplication is equal to zero, it should be checked before or in
for loop since it causes infinite loop and it adds more than expected
szl data trees.

Change-Id: I4bb2c076ef830581e529fea05a1d9175feab171c
Reviewed-on: https://code.wireshark.org/review/29979
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAdding string for "anyPolicy" OID to x509ce
Martin Peylo [Tue, 2 Oct 2018 14:08:38 +0000 (17:08 +0300)]
Adding string for "anyPolicy" OID to x509ce

Commonly used in the certificate policies extension of X.509 CA certificates.
Standardized in X.509 (and RFC 5280), existing in CertificateExtensions.asn

Change-Id: I788127e7ccea7a31f9f3419aa425e607e772b97b
Reviewed-on: https://code.wireshark.org/review/29981
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAdding dissector for OIDs used in TCG X.509 Certificates
Martin Peylo [Tue, 2 Oct 2018 14:03:08 +0000 (17:03 +0300)]
Adding dissector for OIDs used in TCG X.509 Certificates

OIDs used in Trusted Computing Group X.509 Certificate Profiles are available in
https://www.trustedcomputinggroup.org/wp-content/uploads/Credential_Profile_EK_V2.0_R14_published.pdf
Example Certificates in PEM format are in Appendix A.

The relevant TCG OIDs are mostly used in certificate extensions like:
- subjectAltName
- extKeyUsage
- subjectDirectoryAttributes

Change-Id: Ifd44f598bea0b32b4471dfec2fd3af74f7a9e33e
Reviewed-on: https://code.wireshark.org/review/29983
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agowsutil: get_datafile_dir: avoid hard-coded build directory
Peter Wu [Tue, 2 Oct 2018 17:00:01 +0000 (19:00 +0200)]
wsutil: get_datafile_dir: avoid hard-coded build directory

With autotools, it was possible that the binary was located in a .libs
directory, but with CMake the executables directory and data directory
are the same (except macOS with app bundles). Use this property to get
rid of the hard-coded build directory. Helps with reproducible builds.

Bug: 15163
Change-Id: I5b8807a03783a9919fba7b0cc83f5c162caa8052
Reviewed-on: https://code.wireshark.org/review/29984
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoYou have to add setargv.obj as a link flag, not as a library.
Guy Harris [Tue, 2 Oct 2018 21:06:21 +0000 (14:06 -0700)]
You have to add setargv.obj as a link flag, not as a library.

Change-Id: Iab00c28b8fdb5649a115fb7f006ba176d4a4223e
Reviewed-on: https://code.wireshark.org/review/29986
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoWe should only link executables with setargv.obj.
Guy Harris [Tue, 2 Oct 2018 20:33:02 +0000 (13:33 -0700)]
We should only link executables with setargv.obj.

Libraries shouldn't be linked with it.

See if this fixes the weird problems I'm having with mergecap -
including, apparently, the mergecap from the buildbots - when run with
wildcard arguments, terminating before it gets to main() (making it hard
to try to debug bug 15151).

Change-Id: Ie793b0ea8157186a121106636ac8b782457c09f5
Reviewed-on: https://code.wireshark.org/review/29985
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agollc.c: Check ethertype 0x88DC and call the ethertype dissector.
AndersBroman [Tue, 2 Oct 2018 14:59:58 +0000 (16:59 +0200)]
llc.c: Check ethertype 0x88DC and call the ethertype dissector.

Bug: 13766
Change-Id: I9e3527cd1a535e08b547925a0f2606da25520386
Reviewed-on: https://code.wireshark.org/review/29982
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agofile-pcapng.c: Add the names of block types we know about.
AndersBroman [Mon, 1 Oct 2018 12:52:50 +0000 (14:52 +0200)]
file-pcapng.c: Add the names of block types we know about.

Change-Id: I2c4edbac1cda370b0079492c5775330f9553d5a6
Reviewed-on: https://code.wireshark.org/review/29958
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoClean up some things.
Guy Harris [Tue, 2 Oct 2018 11:20:19 +0000 (04:20 -0700)]
Clean up some things.

Rename ascend_seek() to ascend_find_next_packet(), to indicate what it
does; it doesn't seek to an arbitrary place, it tries to find the
starting offset of the next packet when reading sequentially.

Don't have it set the header type - that's the job of the parser.

Don't set the "next packet seek start" when doing random access I/O -
that field is only for sequential I/O, and we don't want random I/O
happening at the same time (which can happen in Wireshark) interfering.

Clean up comments.

Change-Id: I2808479eeec074afa16945ffb577b91d8cb356f7
Reviewed-on: https://code.wireshark.org/review/29975
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoDon't return TRUE with *err or *err_info set.
Guy Harris [Tue, 2 Oct 2018 11:03:28 +0000 (04:03 -0700)]
Don't return TRUE with *err or *err_info set.

Read and seek-read routines shouldn't do that; it causes TShark to
report an error when there was no error.

Change-Id: If564348fa01dce83c6a2317ac56ac8716d514bf7
Reviewed-on: https://code.wireshark.org/review/29972
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoTLS: fix reassembly regression when extending a PDU
Peter Wu [Mon, 1 Oct 2018 22:00:16 +0000 (00:00 +0200)]
TLS: fix reassembly regression when extending a PDU

The fragment identifier was changed, but fragment_set_partial_reassembly
was left unchanged which broke reassembly/decryption when a subdissector
finishes reassembly, but then requests further reassembly (like HTTP
with chunked encoding). This bug results in a faulty "Reassembly error,
protocol TLS: New fragment past old data limits" message.

Bug: 15158
Change-Id: I636ef623dd65c3feb58da29adf7125d8458f038f
Fixes: v2.9.0rc0-2003-gbe16d87c60 ("TLS: fix broken reassembly with multiple PDUs in the same frame")
Reviewed-on: https://code.wireshark.org/review/29967
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoCMake: Add a systemd RPM check.
Gerald Combs [Mon, 1 Oct 2018 23:28:03 +0000 (16:28 -0700)]
CMake: Add a systemd RPM check.

Change-Id: Ib679994f5af129254865daad211913a6b068de12
Reviewed-on: https://code.wireshark.org/review/29968
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>
5 years agoRDP: Changed some RDP info text to better indicate which packet type
Émilio Gonzalez [Mon, 1 Oct 2018 14:05:25 +0000 (10:05 -0400)]
RDP: Changed some RDP info text to better indicate which packet type
     we're dealing with.

Change-Id: I2cafefbdbaf6a4235afbae41969ed53f9c2e24c2
Reviewed-on: https://code.wireshark.org/review/29961
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAdd .idea/ and cmake-build-*/ to gitignore (for jetbrains IDEs)
Émilio Gonzalez [Mon, 1 Oct 2018 13:56:38 +0000 (09:56 -0400)]
Add .idea/ and cmake-build-*/ to gitignore (for jetbrains IDEs)

Change-Id: I70d8203cfa0a0c14f4df65d3a4bc9d5a1fbf12ae
Reviewed-on: https://code.wireshark.org/review/29959
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoFix handling of some ISDN calls.
Guy Harris [Mon, 1 Oct 2018 04:23:04 +0000 (21:23 -0700)]
Fix handling of some ISDN calls.

There's no guarantee that there will be two digits after PRI-XMIT or
PRI-RCV; the capture file in bug 3535, for exmaple, has "PRI-XMIT-0/1"
and "PRI-RCV-0".

Require a minimum of 1, not 2, non-{/(:} characters.  Leave the maximum
of 20 in place.

Change-Id: Ie8f8f4ff5eb04baf0ee61bf28015e59a1fa43948
Reviewed-on: https://code.wireshark.org/review/29947
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agopcapng: Fix a buffer length.
Gerald Combs [Mon, 1 Oct 2018 17:44:16 +0000 (10:44 -0700)]
pcapng: Fix a buffer length.

In pcapng_read_systemd_journal_export_block, increase our buffer length
before appending to it.

Change-Id: I7e0f695c9bf1a6f80bc7e65661bfd5c70cda7d31
Reviewed-on: https://code.wireshark.org/review/29964
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoRelease note updates.
Gerald Combs [Mon, 1 Oct 2018 17:20:38 +0000 (10:20 -0700)]
Release note updates.

Switch the Capture Interfaces section to paragraphs and add one for
sdjournal.

Change-Id: I677a403bf2ea377214c6179f9f22facc9a4ff091
Reviewed-on: https://code.wireshark.org/review/29963
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agowtap: fix regression in wtap_read_packet_bytes
Peter Wu [Sat, 29 Sep 2018 11:14:18 +0000 (13:14 +0200)]
wtap: fix regression in wtap_read_packet_bytes

The "first_free" pointer is currently only increaseed by
ws_buffer_increase_length (unused) and ws_buffer_append (for writes).
Reading into the buffer should not reduce the available space. Otherwise
the next wtap_read_packet_bytes call will reallocate the buffer.

This reallocation is unexpected by some users of cf_read_record and
results in a use-after-free crash following these steps:
1. Open packet capture.
2. Ignore packet.
3. Open context menu, twice.

This crashes because the ByteViewText class points to the buffer which
is reallocated after calling PacketList::getFilterFromRowAndColumn.

Change-Id: I4f1264a406a28c79491dcd77c552193bf3cdf62d
Fixes: v2.9.0rc0-2001-g123bcb0362 ("Make systemd journal entries events.")
Reviewed-on: https://code.wireshark.org/review/29915
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee80211: Display always tag when it is ELEMENT_ID_EXTENSION
Alexis La Goutte [Sun, 30 Sep 2018 13:15:37 +0000 (15:15 +0200)]
ieee80211: Display always tag when it is ELEMENT_ID_EXTENSION

and following packet order for field

Change-Id: I724f3d87e02d182021e53eb9f78644420843e593
Reviewed-on: https://code.wireshark.org/review/29936
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoQt: Update UAT clear button enabling
Stig Bjørlykke [Mon, 1 Oct 2018 08:28:04 +0000 (10:28 +0200)]
Qt: Update UAT clear button enabling

Check for enabling the clear button when loading a UatDialog.

Also move setting enabled property to false for deleteToolButton,
copyToolButton, moveUpToolButton, moveDownToolButton and clearToolButton
to uat_dialog.ui.

Change-Id: I1ff3ed9906eb541e929297b34abcce2bee4a062c
Reviewed-on: https://code.wireshark.org/review/29953
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoAdd a systemd Journal Export extcap.
Gerald Combs [Wed, 5 Sep 2018 23:29:34 +0000 (16:29 -0700)]
Add a systemd Journal Export extcap.

Add an sdjournal extcap, which reads journal entries using the
sd-journal API and dumps them as journal Export Format records.

Change-Id: I17ccfa88ab5d053c16c869cd26e580d84022502e
Reviewed-on: https://code.wireshark.org/review/29479
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoQt: Set enabled properties in Filter Dialog
Stig Bjørlykke [Mon, 1 Oct 2018 08:14:19 +0000 (10:14 +0200)]
Qt: Set enabled properties in Filter Dialog

Default set enabled property to false for deleteToolButton and
copyToolButton because no item is selected.

Change-Id: I99bfb572abb9bc38cbf49c6b1fabdeefac4f8d90
Reviewed-on: https://code.wireshark.org/review/29951
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
5 years agoQt: Set enabled properties in Coloring Rules Dialog
Stig Bjørlykke [Mon, 1 Oct 2018 07:56:49 +0000 (09:56 +0200)]
Qt: Set enabled properties in Coloring Rules Dialog

Default set enabled property to false for deleteToolButton and
copyToolButton because no item is selected.

Change-Id: I6ead2fa17cf1fd5bc165526fb76d104af6d5234d
Reviewed-on: https://code.wireshark.org/review/29949
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
5 years agoDOCSIS: Fix UCC-REQ
Adrian Simionov [Mon, 1 Oct 2018 05:46:50 +0000 (15:46 +1000)]
DOCSIS: Fix UCC-REQ

* UCC-REQ does not contain any Annex C TLVs
* Align INFO field for UCC REQ and RSP to similar DOCSIS packets

Change-Id: I2cdad12aaf5036b9130c8af3d131ee3a6b317923
Reviewed-on: https://code.wireshark.org/review/29948
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee80211: fix addresses for ToDS=1|FromDS=1 case
Peter Wu [Sun, 30 Sep 2018 10:07:49 +0000 (12:07 +0200)]
ieee80211: fix addresses for ToDS=1|FromDS=1 case

For Data frames with ToDs=1|FromDS=1 and a Frame body containing A-MSDU,
the Addr3 and Addr4 fields are not Destination/Source addresses (DA/SA),
but BSSID/BSSID. Use the RA/TA fields for the Hw Dest/Src columns and
add another BSSID field for Addr4 (should match Addr3, but in theory the
wire format could have different values).

While at it, fix the A-MSDU case for other cases to match 802.11-2016
Table 9-26 Address field contents. The "Short A-MSDU" case as used by
DNG STAs are not handled here though.

Tested against a capture with MSDU frames (all but ToDS=1|FromDS=1) and
the test case from the linked bug.

Bug: 15144
Change-Id: Ic832d7cd7b8e05a1408353cb79c07efed0fb19cc
Reviewed-on: https://code.wireshark.org/review/29935
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoQUIC: fix trailing data after VN packet
Peter Wu [Sun, 30 Sep 2018 22:42:21 +0000 (00:42 +0200)]
QUIC: fix trailing data after VN packet

The returned offset must be non-zero or the data dissector is invoked.

Change-Id: Iaff6e1f19fc94e17b41ad06a8be491fbec4835ba
Fixes: v2.9.0rc0-1797-g91c5942c93 ("QUIC: implement packet coalescing (draft >= 11)")
Reviewed-on: https://code.wireshark.org/review/29945
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoPut the FILE_T first in the arguments to parse_dbs_etherwatch_packet().
Guy Harris [Mon, 1 Oct 2018 00:57:39 +0000 (17:57 -0700)]
Put the FILE_T first in the arguments to parse_dbs_etherwatch_packet().

That puts the two arguments to fill in - the wtap_rec and the Buffer -
together.

Change-Id: I8850a7aaccc98e5acd292e3cebc1f37cee8a6ce7
Reviewed-on: https://code.wireshark.org/review/29946
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoFix the type of the packet data argument to get_xdlc_control().
Guy Harris [Sun, 30 Sep 2018 21:27:45 +0000 (14:27 -0700)]
Fix the type of the packet data argument to get_xdlc_control().

It's a blob of bytes, so the right type is guint8 *, not guchar *.

Change-Id: I74afa95da1e14866af68f1580cfbccd55f08ed65
Reviewed-on: https://code.wireshark.org/review/29944
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoFix the type of the packet buffer argument to a capture dissector.
Guy Harris [Sun, 30 Sep 2018 21:24:48 +0000 (14:24 -0700)]
Fix the type of the packet buffer argument to a capture dissector.

It's a blob of bytes, so the right type is guint8 *, not guchar *.
(Yes, in practice, they're both typedefs for "unsigned char" - sadly,
C's data types didn't make a distinction between "byte-sized integral
value" and "character" - but given that we have different names, let's
use them to make it clearer what's being done.)

Change-Id: Idb10a208877c84df0432043d69d4aff5a2b2f803
Reviewed-on: https://code.wireshark.org/review/29943
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoShow the *per-file* encapsulation in the __tostring method.
Guy Harris [Sun, 30 Sep 2018 21:06:37 +0000 (14:06 -0700)]
Show the *per-file* encapsulation in the __tostring method.

We use the per-file encapsulation everywhere else; use it there as well.

Change-Id: I3e3df234a9f541a9d90e54a3c0f41b5019e00bb3
Reviewed-on: https://code.wireshark.org/review/29940
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoRemove unnecessary clearing of *err.
Guy Harris [Sun, 30 Sep 2018 19:40:48 +0000 (12:40 -0700)]
Remove unnecessary clearing of *err.

wtap_read() clears it for you.

Change-Id: I736509d54ff385e5b80e9393aeb91c6473b02824
Reviewed-on: https://code.wireshark.org/review/29939
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoieee80211: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Sun, 30 Sep 2018 13:34:02 +0000 (15:34 +0200)]
ieee80211: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I357728e347fca35c73864f4ba81949183d5ba34d
Reviewed-on: https://code.wireshark.org/review/29937
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoMPLS: add dissector for Management Communication Channel
Christoph Portner [Sat, 29 Sep 2018 14:23:46 +0000 (16:23 +0200)]
MPLS: add dissector for Management Communication Channel

Management communication channel described in RFC 5718

Change-Id: I5ed95d0d6f25754c50a97457679d08b99db6f527
Reviewed-on: https://code.wireshark.org/review/29920
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoSmall cleanup of the sequential read routine.
Guy Harris [Sun, 30 Sep 2018 19:05:21 +0000 (12:05 -0700)]
Small cleanup of the sequential read routine.

There's no need to set *err to 0; it's set by stanag4607_read_file().

There's no need for an intermediate variable to hold the current file
offset; just assign it directly to *data_offset.

Change-Id: I24bd1c349dd48576a65cc36228a680134427bba5
Reviewed-on: https://code.wireshark.org/review/29938
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoQt/FrameInformation: read packet record in private buffer
Peter Wu [Sat, 29 Sep 2018 16:56:46 +0000 (18:56 +0200)]
Qt/FrameInformation: read packet record in private buffer

To prevent potential interference with other users of the capture file,
read data in a private buffer instead of reusing the one from capFile.

Change-Id: I6d689440e0cc13ef522e874fd8e5795a97a6aca7
Reviewed-on: https://code.wireshark.org/review/29922
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoQt/PacketList: read packet record in private buffer
Peter Wu [Fri, 28 Sep 2018 11:03:22 +0000 (13:03 +0200)]
Qt/PacketList: read packet record in private buffer

To prevent potential interference with other users of the capture file,
read data in a private buffer instead of reusing the one from capFile.

An accidental (?) change in commit v2.9.0rc0-2001-g123bcb0362 resulted
in "cf_read_record" reallocating the capture_file->buf buffer. That
issue combined with the current behavior would result in a crash when
ignoring a packet followed by two times opening a context menu:

    ==32187==ERROR: AddressSanitizer: heap-use-after-free on address 0x7fda91642800 at pc 0x55a98f3faaa7 bp 0x7fffa2807860 sp 0x7fffa2807858
    READ of size 1 at 0x7fda91642800 thread T0
        #0 0x55a98f3faaa6 in QByteArray::operator[](int) const /usr/include/qt/QtCore/qbytearray.h:476:47
        #1 0x55a9901006eb in ByteViewText::drawLine(QPainter*, int, int) ui/qt/widgets/byte_view_text.cpp:370:35
        #2 0x55a9900fd109 in ByteViewText::paintEvent(QPaintEvent*) ui/qt/widgets/byte_view_text.cpp:217:9
        ...
        #50 0x55a98e9fd32a in PacketList::contextMenuEvent(QContextMenuEvent*) ui/qt/packet_list.cpp:614:15
        ...

    0x7fda91642800 is located 0 bytes inside of 3038371-byte region [0x7fda91642800,0x7fda919284a3)
    freed by thread T0 here:
        #0 0x55a98e65fd99 in __interceptor_realloc (run/wireshark+0x1019d99)
        #1 0x7fdac6e1bb88 in g_realloc /build/src/glib/glib/gmem.c:164
        #2 0x7fdaac12c908 in wtap_read_packet_bytes wiretap/wtap.c:1368:2
        #3 0x7fdaabf01e5a in libpcap_read_packet wiretap/libpcap.c:789:7
        #4 0x7fdaabef887d in libpcap_seek_read wiretap/libpcap.c:690:7
        #5 0x7fdaac12d5f5 in wtap_seek_read wiretap/wtap.c:1431:7
        #6 0x55a98e6c8611 in cf_read_record_r file.c:1566:8
        #7 0x55a98e6c88c5 in cf_read_record file.c:1576:10
        #8 0x55a98ea0b725 in PacketList::getFilterFromRowAndColumn() ui/qt/packet_list.cpp:1041:14
        #9 0x55a98e94e4a1 in MainWindow::setMenusForSelectedPacket() ui/qt/main_window_slots.cpp:1175:39

    previously allocated by thread T0 here:
        #0 0x55a98e65fd99 in __interceptor_realloc (run/wireshark+0x1019d99)
        #1 0x7fdac6e1bb88 in g_realloc /build/src/glib/glib/gmem.c:164
        #2 0x7fdaac12c908 in wtap_read_packet_bytes wiretap/wtap.c:1368:2
        #3 0x7fdaabf01e5a in libpcap_read_packet wiretap/libpcap.c:789:7
        #4 0x7fdaabef887d in libpcap_seek_read wiretap/libpcap.c:690:7
        #5 0x7fdaac12d5f5 in wtap_seek_read wiretap/wtap.c:1431:7
        #6 0x55a98e6c8611 in cf_read_record_r file.c:1566:8
        #7 0x55a98e6c88c5 in cf_read_record file.c:1576:10
        #8 0x55a98e6e0bde in cf_select_packet file.c:3777:8
        #9 0x55a98e9ea2ff in PacketList::selectionChanged(QItemSelection const&, QItemSelection const&) ui/qt/packet_list.cpp:420:9

This should be fixed now by I4f1264a406a28c79491dcd77c552193bf3cdf62d,
but let's avoid the shared buffer. It's not exactly a hot code path
anyway.

Change-Id: I548d7293a822601f4eb882672477540f066a066b
Reviewed-on: https://code.wireshark.org/review/29921
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years ago[Automatic update for 2018-09-30]
Gerald Combs [Sun, 30 Sep 2018 08:30:43 +0000 (08:30 +0000)]
[Automatic update for 2018-09-30]

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

Change-Id: Ic15ad719f659fe7365c9e652af18507a5d050e6b
Reviewed-on: https://code.wireshark.org/review/29932
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoTLS: Add compress_certificate Handshaketype (25)
Alexis La Goutte [Sun, 23 Sep 2018 18:32:21 +0000 (20:32 +0200)]
TLS: Add compress_certificate Handshaketype (25)

    See https://tools.ietf.org/html/draft-ietf-tls-certificate-compression-03

    the value is TEMPORARY registered to IANA (registered 2018-05-23, expires 2019-05-23

Change-Id: I5a91ad4f1366cd7f0fa077677f227a66591494b6
Reviewed-on: https://code.wireshark.org/review/29796
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>
5 years agoFix comment.
Guy Harris [Sun, 30 Sep 2018 00:39:28 +0000 (17:39 -0700)]
Fix comment.

Change-Id: I0517424a19d31a6df50c843689e97600f0bb5a0e
Reviewed-on: https://code.wireshark.org/review/29931
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoClean up the epan_dissect_t in the normal code path.
Guy Harris [Sat, 29 Sep 2018 23:52:22 +0000 (16:52 -0700)]
Clean up the epan_dissect_t in the normal code path.

We initialized it, but only cleaned it up in an error code path, not in
the regular code path.  That could leak memory.

Change-Id: Ic6689163ca58990fa5091b23e7ab2e0292eed76c
Reviewed-on: https://code.wireshark.org/review/29930
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoClean up the epan_dissect_t in the normal code path.
Guy Harris [Sat, 29 Sep 2018 21:05:27 +0000 (14:05 -0700)]
Clean up the epan_dissect_t in the normal code path.

We initialized it, but only cleaned it up in an error code path, not in
the regular code path.  That could leak memory.

Change-Id: Icb5aa5b1a2df8919d8a4e54d88a5d865320bd279
Reviewed-on: https://code.wireshark.org/review/29929
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoDefine the wtap_rec next to the Buffer.
Guy Harris [Sat, 29 Sep 2018 20:12:57 +0000 (13:12 -0700)]
Define the wtap_rec next to the Buffer.

They are used together; put them together.

Change-Id: I13ec1f37a9a141d3717bfde4db6f1b7e501fb794
Reviewed-on: https://code.wireshark.org/review/29928
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoQt/FrameInformation: do not use file-scoped memory for temporary data
Peter Wu [Sat, 29 Sep 2018 17:01:24 +0000 (19:01 +0200)]
Qt/FrameInformation: do not use file-scoped memory for temporary data

Let QByteArray own the memory instead of wmem to allow memory to be
released earlier.

Change-Id: Ibf6d1a56120d30daea76924b8006480854dcfbd3
Reviewed-on: https://code.wireshark.org/review/29923
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
5 years agowiretap: remove redundant ws_buffer_assure_space
Peter Wu [Sat, 29 Sep 2018 11:33:23 +0000 (13:33 +0200)]
wiretap: remove redundant ws_buffer_assure_space

wtap_read_packet_bytes already calls ws_buffer_assure_space.

Change-Id: Ib5c9f7d05ee9f7ba5faa716e941e4c999aa9704f
Reviewed-on: https://code.wireshark.org/review/29916
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoDHCP: For IPv4 options, append address to option root
Martin Mathieson [Fri, 28 Sep 2018 19:50:52 +0000 (20:50 +0100)]
DHCP: For IPv4 options, append address to option root

Change-Id: I739db9d841394582b3ff2f296050a9a1d350f9bc
Reviewed-on: https://code.wireshark.org/review/29907
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoQt: Show "unknown colorfilters" warning when opening the dialog
Stig Bjørlykke [Fri, 28 Sep 2018 22:00:19 +0000 (00:00 +0200)]
Qt: Show "unknown colorfilters" warning when opening the dialog

Show the warning about unknown colorfilters being disabled when
opening the "Coloring Rules..." dialog to make the user aware of
this before starting editing the rules.

The user may have corrected the filter and enabled it while having
the dialog open, and then this warning would be misleading.

Change-Id: Ic7f10495e5561bc2fea413c89cf9ebd187c8f113
Reviewed-on: https://code.wireshark.org/review/29909
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoprefs: Don't remove unknown coloring rules.
Stig Bjørlykke [Fri, 28 Sep 2018 21:45:35 +0000 (23:45 +0200)]
prefs: Don't remove unknown coloring rules.

When saving the colorfilters file, keep and disable unknown coloring
rules instead of removing them. The user may want to correct the syntax.

Change-Id: Ib27612a0601276b6ebbb467d7d253f3f72103d1c
Reviewed-on: https://code.wireshark.org/review/29908
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoprefs: Reset prefs.unknown_colorfilters before reading colorfilters
Stig Bjørlykke [Fri, 28 Sep 2018 17:47:33 +0000 (19:47 +0200)]
prefs: Reset prefs.unknown_colorfilters before reading colorfilters

Reset prefs.unknown_colorfilters in the beginning of read_filters_file()
to avoid a situation when the preference is set and never cleared.
This will end up with an error message in UI even when not having
unknown color filters.

Change-Id: I835dbc2a57f0be6889eb5bce250987dabd796e30
Reviewed-on: https://code.wireshark.org/review/29904
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoAdd a mechanism to register aliases for preference modules.
Guy Harris [Sat, 29 Sep 2018 03:23:39 +0000 (20:23 -0700)]
Add a mechanism to register aliases for preference modules.

That way, we don't need a chunk of code in epan/prefs.c that knows about
various preference module mappings; individual dissectors can register
aliases as appropriate.

(The Nortel Discovery Protocol never *had* any preferences, even when
it was the SynOptics Network Management Protocol, so there's no need for
it to register an alias.)

Change-Id: I4a718dac6bb06801cc06a6ee5a28d7ed81e67e5d
Reviewed-on: https://code.wireshark.org/review/29914
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoClean up indentation.
Guy Harris [Sat, 29 Sep 2018 01:38:57 +0000 (18:38 -0700)]
Clean up indentation.

Change-Id: Ib88054f7fa3d69faf78f889e3c7fed723055b4d4
Reviewed-on: https://code.wireshark.org/review/29913
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoGet rid of some no-longer-supported GUI preferences.
Guy Harris [Sat, 29 Sep 2018 01:22:19 +0000 (18:22 -0700)]
Get rid of some no-longer-supported GUI preferences.

Make them obsolete preferences; if they had any use, it was with the
now-removed GTK+ UI.

Change-Id: I2b514148c8066c5c79cb402493f47a21d3679819
Reviewed-on: https://code.wireshark.org/review/29912
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoGet rid of the printing preferences.
Guy Harris [Sat, 29 Sep 2018 00:30:41 +0000 (17:30 -0700)]
Get rid of the printing preferences.

They're no longer used by any of the printing code; mark them as
obsolete.

Change-Id: Iceaf14f48f1bd35757a9a158a5348f6202b90fc7
Reviewed-on: https://code.wireshark.org/review/29911
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoFrame: Fixup whitespace.
Gerald Combs [Fri, 28 Sep 2018 22:22:50 +0000 (15:22 -0700)]
Frame: Fixup whitespace.

Change-Id: I8f377b016501975883dab3abae8b5a1050007dd9
Reviewed-on: https://code.wireshark.org/review/29910
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agodumpcap: fix some warnings and add some debugs
James Ko [Fri, 28 Sep 2018 19:02:42 +0000 (12:02 -0700)]
dumpcap: fix some warnings and add some debugs

Ping-Bug: 15149
Change-Id: Ifa530fbdcbffbc188343c03fc7b518325a511f5f
Reviewed-on: https://code.wireshark.org/review/29906
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoRRC: upgrade dissector to v15.4.0
Pascal Quantin [Fri, 28 Sep 2018 17:06:39 +0000 (19:06 +0200)]
RRC: upgrade dissector to v15.4.0

Change-Id: Iee9dd7b4c5a2d0f7d0ed9dceefcef8825ca8443c
Reviewed-on: https://code.wireshark.org/review/29903
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agoLTE RRC: upgrade dissector to v15.3.0
Pascal Quantin [Fri, 28 Sep 2018 11:10:05 +0000 (13:10 +0200)]
LTE RRC: upgrade dissector to v15.3.0

Change-Id: I8ca861fb8cffe457780165c64dc3e6fcbc47ba8b
Reviewed-on: https://code.wireshark.org/review/29900
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agogsmtap: Fix parsing of FPC field
Pau Espin Pedrol [Thu, 27 Sep 2018 17:33:48 +0000 (19:33 +0200)]
gsmtap: Fix parsing of FPC field

Issue was spotted because the bit used by wireshark in this field
didn't make sense, as same bit was being used by MS Power field.

According to spec "3GPP TS 44.004" section "7.2 SACCH uplink block format",
the field is located in bit 6 of the 1st octet.

Change-Id: Ia4390b79d9d2b3966c4ca69eda0bf1ae10be7398
Reviewed-on: https://code.wireshark.org/review/29893
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agohttp2: fix build without nghttp2
Peter Wu [Thu, 27 Sep 2018 22:56:09 +0000 (00:56 +0200)]
http2: fix build without nghttp2

current_stream_id is only defined when built with HAVE_NGHTTP2. One
option is to create the session with stream ID unconditionally. As the
subdissector (DoH) is chosen based on the Content-Type header and
parsing of such headers is only possible with nghttp2, don't bother.

Change-Id: Iefee65210974bf5b8b75c6870a0476567b6830e5
Fixes: v2.9.0rc0-2007-gcc69e09981 ("HTTP2: allow subdissectors to query the Stream ID")
Reviewed-on: https://code.wireshark.org/review/29896
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agosharkd: remove compiler warning.
Dario Lombardo [Thu, 27 Sep 2018 07:49:21 +0000 (09:49 +0200)]
sharkd: remove compiler warning.

../sharkd_session.c: In function ‘json_puts_string’:
../sharkd_session.c:125:20: warning: array subscript has type ‘char’ [-Wchar-subscripts]
    fputs(json_cntrl[str[i]], stdout);

Change-Id: I03a07b8cb42692f636491fad9b15ac71ac0c03f4
Reviewed-on: https://code.wireshark.org/review/29883
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agosharkd: cast string to be encoded to unsigned char *.
Jakub Zawadzki [Wed, 26 Sep 2018 19:20:34 +0000 (21:20 +0200)]
sharkd: cast string to be encoded to unsigned char *.

It should fix warning reported by Stig:
[...]/wireshark/sharkd_session.c:125:20: warning: array subscript is of type 'char' [-Wchar-subscripts]
                        fputs(json_cntrl[str[i]], stdout);
                                        ^~~~~~~

Change-Id: I9352174223644394ba2bf76f10ff3bf6b6abcad5
Reviewed-on: https://code.wireshark.org/review/29877
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDiameter: add a bunch more AVPs from RFC 5777.
Jeff Morriss [Fri, 28 Sep 2018 01:55:11 +0000 (21:55 -0400)]
Diameter: add a bunch more AVPs from RFC 5777.

Add enough AVPs to get the Diameter XML validating again.

Also some whitespace and indentation cleanup.

Change-Id: Ibebfc8832d50f6347e371ca4b8c5b81548e061a8
Reviewed-on: https://code.wireshark.org/review/29898
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoRPM: obsolete the gnome and gtk packages; allow user to set prefix.
Jeff Morriss [Thu, 27 Sep 2018 15:59:24 +0000 (11:59 -0400)]
RPM: obsolete the gnome and gtk packages; allow user to set prefix.

Obsoleting the gtk packages allows a clean upgrade to the Qt version (without
requiring the user to manually remove those packages).

Set the install prefix based on what the user set when running cmake (like
we did with autotools).

Change-Id: Ica283f40bc002951af4ff1f9d719295c0a598c3b
Reviewed-on: https://code.wireshark.org/review/29892
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agosystemd Journal: Handle empty lines.
Gerald Combs [Thu, 27 Sep 2018 23:31:52 +0000 (16:31 -0700)]
systemd Journal: Handle empty lines.

Continue dissecting if we find an empty line. Add an entry for the
_SYSTEMD_USER_SLICE field.

Change-Id: Id6e970b785e359095fbd8101e071f2d8cabcaf53
Reviewed-on: https://code.wireshark.org/review/29897
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agopcapng: Fix a copy/paste error.
Gerald Combs [Thu, 27 Sep 2018 21:02:10 +0000 (14:02 -0700)]
pcapng: Fix a copy/paste error.

We shouldn't set any rec_header.syscall_header fields in
pcapng_read_systemd_journal_export_block.

Change-Id: I920accdbcdcdbf6d71324c8d9d6d562511f6a9d1
Reviewed-on: https://code.wireshark.org/review/29895
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoDNS: fix DNS transaction tracking for DoH
Peter Wu [Thu, 27 Sep 2018 11:00:45 +0000 (13:00 +0200)]
DNS: fix DNS transaction tracking for DoH

Handle DoH messages specially, use the HTTP/2 Stream ID for matching
requests with responses. Fixes misleading "retransmission" expert infos
and properly link (successive) requests with (out-of-order) responses.

Change the "Protocol" column to "DoH" while at it.

Change-Id: I42b22c5c8560ee029051dcb3561e188572a4245f
Ping-Bug: 14433
Reviewed-on: https://code.wireshark.org/review/29889
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoMAC-NR: Fix up some small issues while viewing SDUs, some of which are dissected...
Martin Mathieson [Thu, 27 Sep 2018 16:01:07 +0000 (17:01 +0100)]
MAC-NR: Fix up some small issues while viewing SDUs, some of which are dissected as RLC PDUs

Change-Id: I6df7ab99197fccb9a014df272c2791a2df1a3dc9
Reviewed-on: https://code.wireshark.org/review/29891
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
5 years agoPROFINET: DynamicFramePacking subframes are decoded.
basakkal [Thu, 27 Sep 2018 06:35:25 +0000 (23:35 -0700)]
PROFINET: DynamicFramePacking subframes are decoded.

Last version of Wireshark can not decode DynamicFramePacking
subframes. Changes are implemented to decode subframes.

Change-Id: Ifba011418a5211d9599c48d37597a16733dfafa8
Reviewed-on: https://code.wireshark.org/review/29882
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>