metze/wireshark/wip.git
5 years agoOnly use "libpcap" to refer to the library.
Guy Harris [Wed, 26 Sep 2018 00:33:31 +0000 (17:33 -0700)]
Only use "libpcap" to refer to the library.

For file formats, say "pcap/pcapng" or "pcap and pcapng" instead; this
code handles both formats.  Use just "pcap_" in structure types.

Change-Id: I2c0e096855ac3736bbfd72480ed4221b3a2f25d1
Reviewed-on: https://code.wireshark.org/review/29835
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoRename the pseudo-header for X.25, V.120, and Frame Relay.
Guy Harris [Wed, 26 Sep 2018 00:12:43 +0000 (17:12 -0700)]
Rename the pseudo-header for X.25, V.120, and Frame Relay.

It's not just for X.25, it's for anything that has the notion of Data
Terminal Equipment and Data Communications Equipment; call it "dte_dce",
not "x25".

Change-Id: I3d51fec8b424e91ffd6d59895f50fc5ece791b08
Reviewed-on: https://code.wireshark.org/review/29834
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoGet rid of unused flag argument.
Guy Harris [Tue, 25 Sep 2018 23:20:00 +0000 (16:20 -0700)]
Get rid of unused flag argument.

We always tell pcap_process_pseudo_header() to check to make sure the
pseudo-header isn't bigger than the captured data; no need for a flag
argument to tell it to do so.

Change-Id: I8310bb06a390a7f4a7a232ad140ae07955d52da1
Reviewed-on: https://code.wireshark.org/review/29833
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoAdd obsolete ssl[._]port preferences.
Gerald Combs [Tue, 25 Sep 2018 16:23:09 +0000 (09:23 -0700)]
Add obsolete ssl[._]port preferences.

gcd95e197ca renamed a bunch of "<proto>.ssl.port" preferences to
"<proto>.tls.port" but neglected to add obsolete entries for the old
preferences. Do so here.

Rename couchbase.tls_port to couchbase.tls.port to be in line with the
other TLS port preferences.

Change-Id: Ie23d6be0a5cb3616f37e41dbfbf13ad1b7206473
Reviewed-on: https://code.wireshark.org/review/29829
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>
5 years agoFlag invalid markers.
Guy Harris [Tue, 25 Sep 2018 18:57:09 +0000 (11:57 -0700)]
Flag invalid markers.

Change-Id: I8d99fa2b46ffb96100ea0e47273761d9c47e14cb
Reviewed-on: https://code.wireshark.org/review/29831
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agosharkd: cleanup printf() usage during JSON generation (part V).
Jakub Zawadzki [Tue, 25 Sep 2018 17:20:54 +0000 (19:20 +0200)]
sharkd: cleanup printf() usage during JSON generation (part V).

Replace remaining printf()s.

Change-Id: I42e2e7f0cbc70612eea80efc0b5831702fc7ec7d
Reviewed-on: https://code.wireshark.org/review/29830
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
5 years agoevs: Fix comments.
AndersBroman [Tue, 25 Sep 2018 13:44:12 +0000 (15:44 +0200)]
evs: Fix comments.

Change-Id: I28b17ebb9bc7f5cb26a79da4424c1b38ca662746
Reviewed-on: https://code.wireshark.org/review/29825
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoS1AP: upgrade dissector to v15.3.0
Pascal Quantin [Tue, 25 Sep 2018 12:52:45 +0000 (14:52 +0200)]
S1AP: upgrade dissector to v15.3.0

Change-Id: I949665dd7b26775f3f9a3e704f7e8b815a419165
Reviewed-on: https://code.wireshark.org/review/29824
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDOCSIS: showing components of UCD OFDMA Timestamp Snapshot
Bruno Verstuyft [Tue, 25 Sep 2018 09:02:32 +0000 (11:02 +0200)]
DOCSIS: showing components of UCD OFDMA Timestamp Snapshot

Change-Id: I23eb862010b9e1fc10470058b562b8961ddc55a1
Reviewed-on: https://code.wireshark.org/review/29820
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoRename packet-ssl* to packet-tls*
Gerald Combs [Fri, 14 Sep 2018 15:30:31 +0000 (08:30 -0700)]
Rename packet-ssl* to packet-tls*

Rename packet-ssl{,-utils}.[ch] to packet-tls{,-utils}.[ch].

Change-Id: I4732162ec131ddf0734b3dd191ccc9e48a76ce06
Reviewed-on: https://code.wireshark.org/review/29659
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 agoRadius: cablelabs dictionary: typo fix
Bruno Verstuyft [Tue, 25 Sep 2018 12:48:31 +0000 (14:48 +0200)]
Radius: cablelabs dictionary: typo fix

Change-Id: Ieec530c82096c1f1a6d1e9b5943964a02e5d3ddf
Reviewed-on: https://code.wireshark.org/review/29823
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoevs: Dissect CMR for compact AMR-WB IO mode.
AndersBroman [Mon, 24 Sep 2018 08:44:50 +0000 (10:44 +0200)]
evs: Dissect CMR for compact AMR-WB IO mode.

Change-Id: I9023ed82abc3dcdeb94cb7205d721cc463eac948
Reviewed-on: https://code.wireshark.org/review/29822
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoXRA: added extra PLC timestamp info
Bruno Verstuyft [Mon, 24 Sep 2018 13:25:40 +0000 (15:25 +0200)]
XRA: added extra PLC timestamp info

Change-Id: I1d576ffa703d62af9dd5f8cd0701a129e9029ab3
Reviewed-on: https://code.wireshark.org/review/29805
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agosharkd: cleanup printf() usage during JSON generation (part IV).
Jakub Zawadzki [Tue, 25 Sep 2018 09:06:12 +0000 (11:06 +0200)]
sharkd: cleanup printf() usage during JSON generation (part IV).

Many printf()s generates only key, value is generated by
json_puts_string() or json_print_base64().

Add helper functions sharkd_json_value_string, sharkd_json_value_base64
to generate key with a string, or base64 as a value.

It lower number of printf() from 156 to 105 (32% reduction).

Change-Id: I22901d9759534a4fab7bcdefd66242fd6c5b20cc
Reviewed-on: https://code.wireshark.org/review/29821
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
5 years agoQt: Create directories if they should be opened
Roland Knall [Fri, 21 Sep 2018 13:43:29 +0000 (15:43 +0200)]
Qt: Create directories if they should be opened

In the about dialog, create directories within the folders tab
if the user wants them to open and they do not exist yet

Change-Id: Ia95692dabef92392714c329c868abc78e3bcec6e
Reviewed-on: https://code.wireshark.org/review/29782
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
5 years agosharkd: cleanup printf() usage during JSON generation (part III).
Jakub Zawadzki [Mon, 24 Sep 2018 20:47:42 +0000 (22:47 +0200)]
sharkd: cleanup printf() usage during JSON generation (part III).

Most of sharkd printf()'s are used to output formatted value with given key.
Add two formatting-function helpers: sharkd_json_value_anyf and sharkd_json_value_stringf.

Conversion printf to these function lower number of printf() from 300 to 156 (48% reduction).

Change-Id: Ied538cc5b84d48d942e2140ff6b93969579d6132
Reviewed-on: https://code.wireshark.org/review/29816
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
5 years agoUpdate URL.
Guy Harris [Tue, 25 Sep 2018 06:16:30 +0000 (23:16 -0700)]
Update URL.

A funny thing happened on the way to the Frame Relay Forum.

Change-Id: Ia58e55645ab6ee16fb077cde4496c25352c7e08d
Reviewed-on: https://code.wireshark.org/review/29819
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoUpdate URLs.
Guy Harris [Tue, 25 Sep 2018 04:58:49 +0000 (21:58 -0700)]
Update URLs.

A funny thing happened on the way to the {ATM, MPLS} Forum.

Change-Id: I8159f9191737febe3e5c4618bbb72ecb4bfc300b
Reviewed-on: https://code.wireshark.org/review/29818
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoTLS: support encrypted_server_name extension (0xffce) (esni-01)
Peter Wu [Mon, 24 Sep 2018 22:30:23 +0000 (00:30 +0200)]
TLS: support encrypted_server_name extension (0xffce) (esni-01)

Dissect the ESNI TLS 1.3 extension in CH and EE.

Bug: 14984
Change-Id: I95bb5ef0313aefdab7c09dbeb60556d9574c2a00
Reviewed-on: https://code.wireshark.org/review/29817
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoPMT, DVB-CI: remove packet-mpeg-pmt.h
Martin Kaiser [Mon, 24 Sep 2018 19:19:35 +0000 (21:19 +0200)]
PMT, DVB-CI: remove packet-mpeg-pmt.h

packet-mpeg-pmt.h is included only by DVB-CI. All it contains is
the definition of a value string for stream types in the ca_pmt.
Move the definition into packet-dvbci.c and remove the include file.

Change-Id: I7d63e49804c936284f6a9c5218e0fd9b4fa469a6
Reviewed-on: https://code.wireshark.org/review/29813
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoRevert "Stop advertising support for Solaris."
Gerald Combs [Mon, 24 Sep 2018 20:48:52 +0000 (20:48 +0000)]
Revert "Stop advertising support for Solaris."

This reverts commit 5dd0c8daa5578bc748424005630e970c2a871dc4.

Reason for revert: As Guy pointed out, Oracle ships a recent version.

Change-Id: I9689dfd0656d95f7ae57ae86c2bea7d09afddc70
Reviewed-on: https://code.wireshark.org/review/29815
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoRPM: optionally use ccache to speed up (re)builds.
Jeff Morriss [Mon, 24 Sep 2018 19:45:18 +0000 (15:45 -0400)]
RPM: optionally use ccache to speed up (re)builds.

Installing and enabling ccache makes testing RPM builds (which always do a
complete build) much less painful.

Change-Id: Ie9ab1794614701cdbe261089f81398c2b7d1f027
Reviewed-on: https://code.wireshark.org/review/29812
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoNetmon+Message Analyzer: Fix a couple of lengths.
Gerald Combs [Mon, 24 Sep 2018 18:02:11 +0000 (11:02 -0700)]
Netmon+Message Analyzer: Fix a couple of lengths.

Set the length of the Network Monitor Event and ETW Ndis protocols to
that of their respective headers instead of the remaining TVB length.

Add packet-netmon.c and packet-messageanalyzer.c to .editorconfig.

Change-Id: I50c23c63a74190cebf760fa6b374cc1b78c0191e
Reviewed-on: https://code.wireshark.org/review/29810
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agosharkd: cleanup printf() usage during JSON generation (part II).
Jakub Zawadzki [Mon, 24 Sep 2018 18:34:30 +0000 (20:34 +0200)]
sharkd: cleanup printf() usage during JSON generation (part II).

Lot of printf()s in sharkd are caused from:
 - opening array with a key, like: printf(",\"eo\":[");
 - opening object with comma separator, like: printf("%s{", i ? "," : "");

Add argument to sharkd_json_{array,object}_open() to specify if there need to be a separator,
and key argument to sharkd_json_array_open().

Replace printf() with these functions.

This change lower number of printf() from 365 to 300 (17% reduction).

Change-Id: Id84259ae0fed47d9d7d84709e554a03c97d6ed98
Reviewed-on: https://code.wireshark.org/review/29811
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
5 years agoRPM: Make the (optional) maxminddb dependencies actually work.
Jeff Morriss [Mon, 24 Sep 2018 16:20:01 +0000 (12:20 -0400)]
RPM: Make the (optional) maxminddb dependencies actually work.

Move the maxminddb dependencies out of if(qt) and above the RPM's
description; this makes them actually work and takes the RPM code for
those dependencies out of the Qt RPM's Description (where they clearly
weren't doing any good).

Change-Id: I01705f8f5f6435571cf521b68f8450730ddaa383
Reviewed-on: https://code.wireshark.org/review/29808
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
5 years agocheckhf.pl: speed up find_remove_ei_defs and remove_if0_code
Peter Wu [Sun, 23 Sep 2018 15:33:09 +0000 (17:33 +0200)]
checkhf.pl: speed up find_remove_ei_defs and remove_if0_code

Remove leading spaces early such that the regex in find_remove_ei_defs
can avoid (falsely) matching every line (saves 97% for packet-rrc.c).
Copy the improved remove_if0_code from checkAPIs.pl (saves 600ms).

packet-ieee80211.c used to spend 240ms and now completes in 165ms.
packet-rrc.c used to spend 53.7s and now completes in 0.85s.

Change-Id: I6469f7c11839fab2f33c49d3c839473f1d4902d2
Reviewed-on: https://code.wireshark.org/review/29795
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoUpdate the X11 dissector to use the latest mesa and xcbproto.
Jeff Morriss [Mon, 24 Sep 2018 14:34:18 +0000 (10:34 -0400)]
Update the X11 dissector to use the latest mesa and xcbproto.

Change-Id: I6a72ec73c31c851723ba93e85cab3173d72c6a6b
Reviewed-on: https://code.wireshark.org/review/29806
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agosharkd: cleanup printf() usage during JSON generation (part I).
Jakub Zawadzki [Mon, 24 Sep 2018 16:55:27 +0000 (18:55 +0200)]
sharkd: cleanup printf() usage during JSON generation (part I).

Lower number of printf()s by adding some function wrappers.

Replace:
  printf("]");   with  sharkd_json_array_close();
  printf("}");   with  sharkd_json_object_close();
  printf("\[");  with  sharkd_json_array_open();
  printf("{");   with  sharkd_json_object_open();

These replaces lower number of printf() from 434 to 365 (15% reduction).

Change-Id: I44f2244a7c1f8992a38c56c64759ed039aafaedc
Reviewed-on: https://code.wireshark.org/review/29809
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
5 years agoRPM packaging: maxminddb is optional.
Jeff Morriss [Mon, 24 Sep 2018 15:42:48 +0000 (11:42 -0400)]
RPM packaging: maxminddb is optional.

Don't require the RPM to include maxminddb if we couldn't find it.  Treat it
like the other optional packages: enable it in the RPM iff we found it.

IOW if cmake ran and will build Wireshark [without maxminddb] you'll also be
able to build an RPM [without maxminddb].

Change-Id: I012b75ae44e9289275b68db2eb804fc45bb0d330
Reviewed-on: https://code.wireshark.org/review/29807
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
5 years agonettrace: Improve error printout at parse error.
AndersBroman [Mon, 24 Sep 2018 12:43:10 +0000 (14:43 +0200)]
nettrace: Improve error printout at parse error.

Change-Id: I193301cb041ad2d513baa2806fd2168b95b17a3f
Reviewed-on: https://code.wireshark.org/review/29804
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agosharkd: fix setting last reference frame number.
Jakub Zawadzki [Mon, 24 Sep 2018 07:56:16 +0000 (09:56 +0200)]
sharkd: fix setting last reference frame number.

Change-Id: Ia1f60dbe9dfbbceff06a586bcfed68c8f848a390
Reviewed-on: https://code.wireshark.org/review/29802
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
5 years agosharkd: add field checking in check request.
Jakub Zawadzki [Mon, 24 Sep 2018 07:24:55 +0000 (09:24 +0200)]
sharkd: add field checking in check request.

Change-Id: I5467dda6eaa931e0648ce178bf6412fcd1b9661c
Reviewed-on: https://code.wireshark.org/review/29801
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
5 years agoevs: add DISSECTOR_ASSERT_NOT_REACHED (CID: 1439591)
Dario Lombardo [Fri, 21 Sep 2018 07:06:58 +0000 (09:06 +0200)]
evs: add DISSECTOR_ASSERT_NOT_REACHED (CID: 1439591)

Change-Id: Idf90a697c0653c8573511e970f1d35da70cc7957
Reviewed-on: https://code.wireshark.org/review/29777
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoQt: Don't append a empty custom window title
Stig Bjørlykke [Mon, 24 Sep 2018 07:02:31 +0000 (09:02 +0200)]
Qt: Don't append a empty custom window title

The recently introduced %F in custom window title is empty when no
capture file is loaded. Check for this to avoid having a trailing
UTF8_EM_DASH or "[]" in the title.

Change-Id: I5fb0832a2898501cb128bd52b22a4dc5f3ad4f4e
Reviewed-on: https://code.wireshark.org/review/29800
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoradius(travelping): sync with FreeRADIUS
Alexis La Goutte [Wed, 12 Sep 2018 06:00:29 +0000 (06:00 +0000)]
radius(travelping): sync with FreeRADIUS

commit c5efe46d43c107b82fac4c758c81ad707c892596
Author: Yury Gargay <yury.gargay@gmail.com>
Date:   Thu Jun 22 14:49:43 2017 +0200

    Add TP-Trace-Id to Travelping dictionary

    May be used to share some OpenTracing id between components.

commit 6926d38d187318b971d26c0aa54b90b89c81e161
Author: 0xAX <kuleshovmail@gmail.com>
Date:   Tue Apr 5 20:20:33 2016 +0600

    Add new travelping attributes to dictionary

commit c81e3508ba906fe87855dde93a27956d8a0946b9
Author: Andreas Schultz <aschultz@tpip.net>
Date:   Thu Feb 19 16:59:18 2015 +0100

    add vendor values for Framed-Protocol and Service-Type

commit 333ed048d2dda4342c3af5d9036a0f2c86a3ae30
Author: Andreas Schultz <aschultz@tpip.net>
Date:   Thu Feb 5 10:57:15 2015 +0100

    fix case of CAPWAP Power attributes in Travelping dictionary

Change-Id: I472dd7b63ebb6e69acd8d1d33ff959771d302771
Reviewed-on: https://code.wireshark.org/review/29626
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agotools: add libjson-glib to macos-setup.
Dario Lombardo [Fri, 3 Aug 2018 21:19:09 +0000 (23:19 +0200)]
tools: add libjson-glib to macos-setup.

Change-Id: I3cb83065da67891903559c1da1b45f772e656de9
Reviewed-on: https://code.wireshark.org/review/28946
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoradius(verizon): sync with FreeRADIUS
Alexis La Goutte [Wed, 12 Sep 2018 06:10:53 +0000 (06:10 +0000)]
radius(verizon): sync with FreeRADIUS

commit d3ea6dd565a1836314814d258efc19054d3e6a45
Author: Alan T. DeKok <aland@freeradius.org>
Date:   Mon Sep 10 13:43:24 2018 -0400

    added verizon dictionary

Change-Id: I162aa1d08845fc39b068ef2a49c582ce0e29fee3
Reviewed-on: https://code.wireshark.org/review/29627
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoWiretap isn't meant to be a packet-capture library [any more].
Jeff Morriss [Fri, 21 Sep 2018 19:12:51 +0000 (15:12 -0400)]
Wiretap isn't meant to be a packet-capture library [any more].

Wiretap was originally being writen to be a packet-capture library which
might eventually replace libpcap but that's no longer the case: it's now
meant to be a library for accessing multiple types of files.

As such, don't describe it in the README as a packet-capture-library-to-be;
in fact since it's really internal to Wireshark don't mention it at all.

Don't discuss the fact that ancient (pre-2003) versions of zlib don't work
for Wireshark's purposes.

Change-Id: I2387d0ecc65a66c21dd7db3a38b8fee7d32add7f
Reviewed-on: https://code.wireshark.org/review/29786
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agosharkd: minor code style fixes.
Jakub Zawadzki [Sun, 23 Sep 2018 22:03:58 +0000 (00:03 +0200)]
sharkd: minor code style fixes.

Change-Id: I0cb87f124fb9cb377250adab125a593ddcd9ba44
Reviewed-on: https://code.wireshark.org/review/29799
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agocheckAPIs.pl: speed up check_value_string_arrays and remove_if0_code
Peter Wu [Sun, 23 Sep 2018 14:41:09 +0000 (16:41 +0200)]
checkAPIs.pl: speed up check_value_string_arrays and remove_if0_code

The initial execution time on packet-ieee80211.c was 940ms. Optimize:
- Assume that "static const value_string ... = { ... };" does not have
  other preceding stuff (including optional whitespace). This speeds up
  check_value_string_arrays and reduces runtime by 440ms to 500ms.
- Rewrite remove_if0_code to avoid invoking a substitution for every
  line. This reduces runtime by 130ms to 370ms.

packet-rrc.c used to take 9.4s. The fixes improved it to 3.0s and 2.8s.

Change-Id: Ifc7efa447d64dccba3e211f0741099451b61b95a
Reviewed-on: https://code.wireshark.org/review/29794
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoFP: Fix comments
Darien Spencer [Sun, 23 Sep 2018 20:48:14 +0000 (23:48 +0300)]
FP: Fix comments

Rephrasing, remove commented code/irrelevant
remarks

Change-Id: I4da5bae1b87cce97595d20ab8634a4c0f600536b
Reviewed-on: https://code.wireshark.org/review/29798
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoQUIC: support CRYPTO_ERROR (draft -13)
Peter Wu [Wed, 19 Sep 2018 10:55:05 +0000 (12:55 +0200)]
QUIC: support CRYPTO_ERROR (draft -13)

Append a corresponding TLS alert description if available.

Change-Id: Ief6f458f1c1e623cb7e0b0f57333b72890f48d91
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29740
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 agoQUIC: shorten labels for transport error codes
Peter Wu [Wed, 19 Sep 2018 10:45:09 +0000 (12:45 +0200)]
QUIC: shorten labels for transport error codes

Use short names (and add a missing one for INVALID_MIGRATION), otherwise
columns and lines become too long. Use range_string to prepare for
addition of CRYPTO_ERROR.

Change-Id: I9c2742cdc8010443a456e8cfff2fc9012b1efe7e
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29739
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agomswsp: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Fri, 21 Sep 2018 06:05:34 +0000 (06:05 +0000)]
mswsp: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: Id521ecbdbaa1818b6480d9fcd4257104dc3699bb
Reviewed-on: https://code.wireshark.org/review/29774
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agosharkd: Fix check request for empty "" filter
Jakub Zawadzki [Sun, 23 Sep 2018 20:14:21 +0000 (22:14 +0200)]
sharkd: Fix check request for empty "" filter

For empty filters dfilter_compile() return success but with NULL dfcode.
NULL dfcode cannot be used in dfilter_deprecated_tokens().

Request: {"req":"check","filter":""} was crashing sharkd.

Change-Id: Id677fc84251ab27bf691ec8aaee4c5bdf55e4d6c
Reviewed-on: https://code.wireshark.org/review/29797
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
5 years agoFP: Fix Sub-Frame number dissection
Darien Spencer [Sun, 23 Sep 2018 10:43:21 +0000 (13:43 +0300)]
FP: Fix Sub-Frame number dissection

For E-DCH TYPE 1 frames, the field showed in the tree
was showing  1 bit instead of 3.

Change-Id: Ia28b2a8381f02a0f636ccb47b95b707915b90ff8
Reviewed-on: https://code.wireshark.org/review/29793
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years ago[Automatic update for 2018-09-23]
Gerald Combs [Sun, 23 Sep 2018 08:30:45 +0000 (08:30 +0000)]
[Automatic update for 2018-09-23]

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

Change-Id: I8a70ff9590e5adb3d0bdcd504b3f2886a314548c
Reviewed-on: https://code.wireshark.org/review/29790
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agofix-encoding-args.pl: fix terrible performance with large files
Peter Wu [Sat, 22 Sep 2018 11:47:22 +0000 (13:47 +0200)]
fix-encoding-args.pl: fix terrible performance with large files

"fix-encoding-args.pl epan/dissectors/packet-ieee80211.c" used to take
over 12 seconds to complete. After this change it is reduced to 400ms.
Profiling with Devel::NYTProf showed two issues:
- find_hf_array_entries (5 seconds): matching leading whitespace
  triggers a candidate match against every line. Fix this by removing
  whitespace prior to matching.
- fix_encoding_args_by_hf_type (7.5 seconds): executing 2131 different
  substitution patterns is slow. Fix this by grouping field names and
  execute the substitution only once afterwards (in total 6 calls).

packet-rrc.c is by far the largest file with 215k lines, this used to
take forever (321s) and now completes in 1.3s.

Regression tested by removing "ENC_ASCII" and "ENC_UTF_8" in
dissect_venue_name_info, the expected warnings are still visible.

Change-Id: I071038e8fcb56474ac41223568ce6724258c059d
Reviewed-on: https://code.wireshark.org/review/29789
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoTFTP: Use a GByteArray.
Gerald Combs [Fri, 21 Sep 2018 18:27:07 +0000 (11:27 -0700)]
TFTP: Use a GByteArray.

Replace the file_block_t struct with GByteArray.

Change-Id: I95c2a92b91aa7248e45722b1d06dcb0cd6b1c0c3
Reviewed-on: https://code.wireshark.org/review/29788
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>
5 years agortp-ed137: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Fri, 21 Sep 2018 06:06:03 +0000 (06:06 +0000)]
rtp-ed137: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: If45175162c249308747de2a27451993f44a2349d
Reviewed-on: https://code.wireshark.org/review/29775
Reviewed-by: Jirka Novak <j.novak@netsystem.cz>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agombim: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Fri, 21 Sep 2018 06:04:34 +0000 (06:04 +0000)]
mbim: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I3455235e54e2a166e812c743bccf09fee8b22d88
Reviewed-on: https://code.wireshark.org/review/29773
Reviewed-by: Jano Svitok <jan.svitok@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoRemove packet-gnutella.h
Gerald Combs [Fri, 21 Sep 2018 17:12:52 +0000 (10:12 -0700)]
Remove packet-gnutella.h

packet-gnutella.h doesn't export any functions and nothing appears to
depend on it. Pull its contents into packet-gnutella.c.

Change-Id: I9bab0bfed87af3ac520fb8d8daa89d3fa3dc6f17
Reviewed-on: https://code.wireshark.org/review/29785
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 agoRemove some unneeded headers.
Gerald Combs [Fri, 21 Sep 2018 17:41:03 +0000 (10:41 -0700)]
Remove some unneeded headers.

Move the contents of packet-clearcase.h, packet-fcp.h, packet-klm.h,
packet-rquota.h, packet-rwall.h, and packet-spray.h to their respective
.c files. packet-pktc.h didn't contain anything so just remove it.

Change-Id: I019db0cb14bf527c5d73c6d18bee922dd822bc43
Reviewed-on: https://code.wireshark.org/review/29787
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 agoevs: remove double semicolon.
Dario Lombardo [Fri, 21 Sep 2018 14:50:50 +0000 (16:50 +0200)]
evs: remove double semicolon.

Change-Id: I7760fd8dede9f40e3f626e42b4f33bb8f0507b06
Reviewed-on: https://code.wireshark.org/review/29783
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoREADME.md: remove autotools (./configure) references.
Jeff Morriss [Fri, 21 Sep 2018 15:14:08 +0000 (11:14 -0400)]
README.md: remove autotools (./configure) references.

Also remove some, extra, commas and fix some other minor issues.

Change-Id: Idfd45bba26ad9d1dc55d2f0ca241fc4c70fabbb6
Reviewed-on: https://code.wireshark.org/review/29784
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoProfiNet: Fix order in AssetManagment
Roland Knall [Fri, 21 Sep 2018 12:35:03 +0000 (14:35 +0200)]
ProfiNet: Fix order in AssetManagment

According to the current Profinet specification in regard
to the coding of the AM_DeviceIdentification field, the
dissection order of DeviceId and VendorId is in the wrong
order.

Bug: 15140
Change-Id: I9954619a938db382967104de91e2b905677cc171
Reviewed-on: https://code.wireshark.org/review/29780
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
5 years agoieee802154: Make a variable volatile
Stig Bjørlykke [Fri, 21 Sep 2018 12:09:58 +0000 (14:09 +0200)]
ieee802154: Make a variable volatile

This fixes a warning:
[...]/epan/dissectors/packet-ieee802154.c:3196:17: error: variable ‘length’ might
be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
         guint16 length = (guint16) (ie_header & IEEE802154_PAYLOAD_IE_LENGTH_MASK);

Change-Id: I556b2199f8ab028e87e4c9d868da9831f7076402
Reviewed-on: https://code.wireshark.org/review/29779
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
5 years agoQUIC: improve Info column and packet details when decryption fails
Peter Wu [Thu, 20 Sep 2018 19:44:31 +0000 (21:44 +0200)]
QUIC: improve Info column and packet details when decryption fails

If decryption is not possible due to missing keys, say so rather than a
vague "packet number decryption failed". Ensure that the Info column is
populated for a protected packet even if decryption fails. Show the
remaining unprocessed data as a tree item.

Change-Id: I47294d7af20836976cb619ccab45e2b379a863cb
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29762
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoStop advertising support for Solaris.
Gerald Combs [Thu, 20 Sep 2018 23:35:54 +0000 (16:35 -0700)]
Stop advertising support for Solaris.

Stop listing Solaris as a supported platform. I'm not sure if you can
compile Wireshark out of the box on it any more and the available binary
packages I can find are ancient.

Change-Id: I89afef01abe05986ce660327731c5504c6622ff7
Reviewed-on: https://code.wireshark.org/review/29764
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoGet rid of unused variable, update a comment.
Guy Harris [Fri, 21 Sep 2018 05:27:22 +0000 (22:27 -0700)]
Get rid of unused variable, update a comment.

We no longer use red.libssh.org, so the file number isn't needed any
more.

Change-Id: I4cc6eb242eac51219742731cfa82a7bfe9fff2c3
Reviewed-on: https://code.wireshark.org/review/29771
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoTry downloading libssh directly from www.libssh.org.
Guy Harris [Fri, 21 Sep 2018 05:20:48 +0000 (22:20 -0700)]
Try downloading libssh directly from libssh.org.

Downloading from red.libssh.org got "curl: (51) SSL: no alternative
certificate subject name matches target host name 'red.libssh.org'" on
my Mojave virtual machine.

Change-Id: Iab8016c4dc5200c80bff3c0cdc776bc922f4dd59
Reviewed-on: https://code.wireshark.org/review/29768
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoUpdate the URLs for GnuPG.
Guy Harris [Fri, 21 Sep 2018 04:43:10 +0000 (21:43 -0700)]
Update the URLs for GnuPG.

Use HTTP rather than FTP; the FTP server appears no longer to be
available.

Change-Id: I4446cc48818f419a341880da53db8670170794ae
Reviewed-on: https://code.wireshark.org/review/29765
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agocheckAPIs: Add a max termout count for TRANSUM.
Gerald Combs [Thu, 20 Sep 2018 22:57:02 +0000 (15:57 -0700)]
checkAPIs: Add a max termout count for TRANSUM.

Change-Id: I241da2d1c2e46947c31743f9527faa5884767ed9
Reviewed-on: https://code.wireshark.org/review/29763
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoDTN: updated dissection of confidentiality and integrity blocks
Patricia Lindner [Mon, 17 Sep 2018 13:22:32 +0000 (09:22 -0400)]
DTN: updated dissection of confidentiality and integrity blocks

Bug: 15137
Change-Id: I544c46030bfb74caa64c82f88b41f9d2a3c3d7de
Reviewed-on: https://code.wireshark.org/review/29695
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agocheckAPIs.pl: improve value_string validation in field definitions
Peter Wu [Wed, 19 Sep 2018 22:23:14 +0000 (00:23 +0200)]
checkAPIs.pl: improve value_string validation in field definitions

Use of 32-bit value_string for 64-bit fields currently results in a
runtime error during use, better catch it earlier. Use of 64-bit
val64_string without BASE_VAL64_STRING will probably crash.

Since many dissectors use no macro for value_string_ext, accept both
VALS_EXT_PTR(x) and &x forms.

Change-Id: I59a3f67425e7c00bdd54cbffd91e498ee0b078cd
Reviewed-on: https://code.wireshark.org/review/29756
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agocheckAPIs.pl: recognize fields with spaces in display
Peter Wu [Wed, 19 Sep 2018 22:21:36 +0000 (00:21 +0200)]
checkAPIs.pl: recognize fields with spaces in display

Fields with display values such as "BASE_RANGE_STRING | BASE_DEC" used
to be ignored, make sure that the regex detects such fields.

Change-Id: I80d4331e3fb75092ffd768dabb85c5f13c9b5462
Reviewed-on: https://code.wireshark.org/review/29755
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agocheckAPIs.pl: support for new-style dissectors in check_hf_entries
Peter Wu [Wed, 19 Sep 2018 22:19:27 +0000 (00:19 +0200)]
checkAPIs.pl: support for new-style dissectors in check_hf_entries

Tested with dissectors like epan/dissectors/packet-netlink-sock_diag.c.

Change-Id: Icb43892d68896a8f61f4c0caf413327f0479f007
Reviewed-on: https://code.wireshark.org/review/29754
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoskinny: remove comment that matches field label (callState)
Peter Wu [Wed, 19 Sep 2018 21:38:08 +0000 (23:38 +0200)]
skinny: remove comment that matches field label (callState)

Fixes checkAPIs error:

    Error: the blurb for hf_skinny_callState ("CallState") matches the
    field name ("callState") in epan/dissectors/packet-skinny.c

Change-Id: Id12396eb101bf66e148aed95d5c773b90d06ff34
Fixes: v1.99.0-rc1-1511-g276a697a6b ("[RFC] Skinny: Rewrite using automatic code generation")
Reviewed-on: https://code.wireshark.org/review/29747
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoproto.h: add type checks for VALS/VALS64/VALS_EXT_PTR/TFS/RVALS
Peter Wu [Wed, 19 Sep 2018 22:29:35 +0000 (00:29 +0200)]
proto.h: add type checks for VALS/VALS64/VALS_EXT_PTR/TFS/RVALS

These macros were evil as they silently ignored bad casts. Together with
an updated checkAPIs.pl, this should reduce the likelihood of errors.

Change-Id: I40ecc48a57b2061b4c65db4f4f7fffff21f159a8
Reviewed-on: https://code.wireshark.org/review/29757
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoFP: Show E-DCH entity in tree
Darien Spencer [Thu, 20 Sep 2018 14:45:13 +0000 (17:45 +0300)]
FP: Show E-DCH entity in tree

Change-Id: I28755b38b168bc30ea4dc1addba3d9b5b31b3870
Reviewed-on: https://code.wireshark.org/review/29761
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agorawshark: avoid RVALS for casting hfinfo->strings
Peter Wu [Thu, 20 Sep 2018 09:48:21 +0000 (11:48 +0200)]
rawshark: avoid RVALS for casting hfinfo->strings

No functional change, it just makes gcc -Wc++-compat happy.

Change-Id: I9001373686ccafd3252089ced8e5b630efbcaca2
Reviewed-on: https://code.wireshark.org/review/29760
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoerf: do not use VALS to cast a void pointer
Peter Wu [Thu, 20 Sep 2018 09:25:03 +0000 (11:25 +0200)]
erf: do not use VALS to cast a void pointer

No functional change, but makes gcc -Wc++-compat happy.

Change-Id: I3e90b6b1fdc6d558dfd410dffff3abc7cc3df10e
Reviewed-on: https://code.wireshark.org/review/29759
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agonetlink-*: fix various VALS/TFS misuse
Peter Wu [Wed, 19 Sep 2018 21:40:33 +0000 (23:40 +0200)]
netlink-*: fix various VALS/TFS misuse

No functional change, this just updates the annotations.

Change-Id: I5517a6fd65452db128cdaaa6a90df8c578b5e8d0
Reviewed-on: https://code.wireshark.org/review/29753
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agolte-rrc: avoid BASE_EXT_STRING field without strings
Peter Wu [Wed, 19 Sep 2018 21:35:52 +0000 (23:35 +0200)]
lte-rrc: avoid BASE_EXT_STRING field without strings

Change-Id: Ifb2b721972de8d80af20f24a6bfd3b17d593e0bd
Fixes: v2.5.0rc0-2357-gc634a73c95 ("LTE RRC: upgrade dissector to v15.0.1")
Reviewed-on: https://code.wireshark.org/review/29746
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agoepan: fix various misannotations of VALS/RVALS/VALS64/TFS
Peter Wu [Wed, 19 Sep 2018 22:11:28 +0000 (00:11 +0200)]
epan: fix various misannotations of VALS/RVALS/VALS64/TFS

No functional change, just using the correct macro for value_strings.
Other fixes: Taking the address of the first element of an array gives
the same address as the array itself. An array of a structure with a
single element is the same as the single element itself (packet-sprt.c).

Change-Id: I08bc9de49fbd1659a6700ace863e5f05144c7b3e
Reviewed-on: https://code.wireshark.org/review/29752
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agosimple: fix value_string type mismatch with simple.link16.rc
Peter Wu [Wed, 19 Sep 2018 22:07:07 +0000 (00:07 +0200)]
simple: fix value_string type mismatch with simple.link16.rc

Due to alignment, mapping a range_string as value_string happens to work
on 64-bit systems. On 32-bit systems it will treat it as an empty list.
In either case, this type confusion is undesired, fix accordingly.

Change-Id: I6f1a249caf822acae2628e7f2df492bab6cc1c5c
Fixes: v2.1.0rc0-1726-geeae61bc93 ("packet-simple: SIMPLE dissector")
Reviewed-on: https://code.wireshark.org/review/29751
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoospf: avoid BASE_EXT_STRING without strings
Peter Wu [Wed, 19 Sep 2018 22:02:32 +0000 (00:02 +0200)]
ospf: avoid BASE_EXT_STRING without strings

dissect_ospf_lsa_mpls uses gmpls_sonet_signal_type_str_ext to map the
first byte, so do the same for the field definition. The function
actually uses proto_tree_add_uint_format, so this does not make much of
a difference though.

Change-Id: Idba0c1b882ce81512bac221f98464f1322986fa8
Fixes: v1.99.6rc0-12-g4afaad75d5 ("Remove proto_tree_add_text from packet-ospf.c")
Reviewed-on: https://code.wireshark.org/review/29750
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoieee80211: fix potential crash due to value_string type mismatch
Peter Wu [Wed, 19 Sep 2018 21:51:10 +0000 (23:51 +0200)]
ieee80211: fix potential crash due to value_string type mismatch

Mixing 32-bit and 64-bit value_strings could lead to a crash.

Change-Id: Iedfae66103046a478ce5198416247d256dc1840e
Fixes: v2.9.0rc0-1769-gad6eb33684 ("WIP:ieee80211.c: Add support for D3.0 of 802.11ax")
Reviewed-on: https://code.wireshark.org/review/29749
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agonfapi: fix potential crash with nfapi.csi.rs.flag due to type mismatch
Peter Wu [Wed, 19 Sep 2018 21:46:33 +0000 (23:46 +0200)]
nfapi: fix potential crash with nfapi.csi.rs.flag due to type mismatch

Pass a "true_false_string" instead of a "value_string".

Change-Id: I371b344fd56925ce242467e37a68ca6e3eb61b93
Fixes: v2.5.0rc0-1331-g1dd0111f5e ("Initial submission of the nfapi dissector")
Reviewed-on: https://code.wireshark.org/review/29748
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoQUIC: use application error codes for some frames
Peter Wu [Wed, 19 Sep 2018 10:35:12 +0000 (12:35 +0200)]
QUIC: use application error codes for some frames

Since draft -07, the application/transport error code space was split.
RST_STREAM and APPLICATION_CLOSE use application-specific error codes.
Likewise for STOP_SENDING, but the value zero is not special there. See
https://tools.ietf.org/html/draft-ietf-quic-transport-14#section-11.4

Change-Id: I8ed9ce66b248c638921212dc7de03ae1168ca2ae
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29738
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoQUIC: simplify and fix frame item length in some cases
Peter Wu [Tue, 18 Sep 2018 19:40:51 +0000 (21:40 +0200)]
QUIC: simplify and fix frame item length in some cases

Some frames (like ACK) did not update the frame type tree size. Fix this
and reduce code duplication. Remove extra empty lines while at it.

Change-Id: If2e8d616af4ea6067c5901b96ad2d4dd7a9fbfdd
Reviewed-on: https://code.wireshark.org/review/29723
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoQUIC: simplify PADDING frame
Peter Wu [Mon, 17 Sep 2018 11:03:52 +0000 (13:03 +0200)]
QUIC: simplify PADDING frame

Report the correct amount of padding (including the "Frame Type" field)
and remove the explicit padding field.

Change-Id: I4ecfb0daae0bca727400b9db5ac9881d404120cf
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29692
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoTry to discourage the use of APIs via counting.
Gerald Combs [Tue, 18 Sep 2018 17:09:31 +0000 (10:09 -0700)]
Try to discourage the use of APIs via counting.

Add the ability to specify maximum function counts for each group to
checkAPIs. Add maximum counts for the "termoutput" and "abort" groups
where needed. Show summaries in various checkAPI targets.

Switch uses of ws_g_warning back to plain g_warning.

Change-Id: I5cbddc8c671729e424eed8551f69116d16491976
Reviewed-on: https://code.wireshark.org/review/29721
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoXRA: Display length information in XRA protocol description. Set correct length of...
Bruno Verstuyft [Wed, 19 Sep 2018 12:14:24 +0000 (14:14 +0200)]
XRA: Display length information in XRA protocol description. Set correct length of XRA header.

Change-Id: I8bde77dca812f2d4eeb21c8d502799894e93c463
Reviewed-on: https://code.wireshark.org/review/29741
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoNBAP: Change E-DCH type choosing condition
Darien Spencer [Wed, 19 Sep 2018 12:58:50 +0000 (15:58 +0300)]
NBAP: Change E-DCH type choosing condition

Change-Id: If6f07db858c92cd82ff2049c631606a00aba13dc
Reviewed-on: https://code.wireshark.org/review/29742
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoquic: put quic_connection_add_cid into ifdef.
Dario Lombardo [Wed, 19 Sep 2018 10:39:09 +0000 (12:39 +0200)]
quic: put quic_connection_add_cid into ifdef.

It's used by dissect_quic_frame_type only, that is defined within
HAVE_LIBGCRYPT_AEAD.

Change-Id: Ib670930fcc0f8334c99884a0d6c45dbd00777e87
Reviewed-on: https://code.wireshark.org/review/29737
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoNAS-5GS: Add dissection of Parameters content and bug fixes.
AndersBroman [Wed, 19 Sep 2018 10:29:23 +0000 (12:29 +0200)]
NAS-5GS: Add dissection of Parameters content and bug fixes.

Change-Id: Ie7d51a2dba425072407217340f96c70831277cd8
Reviewed-on: https://code.wireshark.org/review/29736
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoquic: mark unused parameter in quic_process_payload.
Dario Lombardo [Wed, 19 Sep 2018 09:26:51 +0000 (11:26 +0200)]
quic: mark unused parameter in quic_process_payload.

Change-Id: I60b9d2aee936f2ff0b6d3ef414ce1a5f825b2762
Reviewed-on: https://code.wireshark.org/review/29735
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoGTPv2: Update 8.38 MM Context.
AndersBroman [Wed, 19 Sep 2018 08:30:02 +0000 (10:30 +0200)]
GTPv2: Update  8.38 MM Context.

Change-Id: Ie04878b92133c00a668fea74736c694d4e9a87dc
Reviewed-on: https://code.wireshark.org/review/29732
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoQUIC: recognize short header packets after connection migration
Peter Wu [Tue, 18 Sep 2018 22:42:44 +0000 (00:42 +0200)]
QUIC: recognize short header packets after connection migration

Improve QUIC heuristics to detect Short Header packets that have a DCID
matching with an earlier connection. Tested with "picoquicdemo -f".

Change-Id: I0c28e527ffa29784f8752a695e2d22bdea9797c4
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29728
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoQUIC: small connection tracking optimization
Peter Wu [Tue, 18 Sep 2018 22:40:12 +0000 (00:40 +0200)]
QUIC: small connection tracking optimization

Track valid CID lengths, this makes it possible to detect whether any
valid QUIC long packet is present in the capture and allows for skipping
some hash-table lookups.

Change-Id: I20db2ca1d40af2a9b34fffe24b4b636f358d5795
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29727
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoQUIC: use NCI to improve connection tracking
Peter Wu [Tue, 18 Sep 2018 20:53:00 +0000 (22:53 +0200)]
QUIC: use NCI to improve connection tracking

Short packets failed to be decrypted because no connection could be
matched after connection migration. Slightly refactor addition of new
connections (keyed by CID) to prepare for further changes.

Tested with "picoquicdemo -f" (5ecdabd9e31d, draft -14). Requires Decode
As QUIC since heuristics does not detect QUIC short header packets).

Change-Id: I0309f077d7d190c51e8998016ed513f8bac8c301
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29726
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoQUIC: Add new initial_max_stream_* TP (draft -14)
Alexis La Goutte [Tue, 18 Sep 2018 19:31:56 +0000 (21:31 +0200)]
QUIC: Add new initial_max_stream_* TP (draft -14)

Split initial_max_stream_data (0) into
* initial_max_stream_data_bidi_local (0),
* initial_max_stream_data_bidi_remote (10),
* initial_max_stream_data_uni (11)

Change-Id: I4ab7785059391f91703c9cdee9fcd111ad7e88a6
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29722
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agomake-manuf.py: Add response headers.
Gerald Combs [Wed, 19 Sep 2018 00:31:49 +0000 (17:31 -0700)]
make-manuf.py: Add response headers.

Add comments containing the resonse headers for the URLs we fetch.
standards-oui.ieee.org currently returns inconsistent results depending
on which host you happen to resolve.

Change-Id: I4adba7e51628d0350ba8e091523807ec85009700
Reviewed-on: https://code.wireshark.org/review/29729
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoupdate-tx: Fix our file list.
Gerald Combs [Tue, 18 Sep 2018 21:57:33 +0000 (21:57 +0000)]
update-tx: Fix our file list.

LUPDATE_FILES is a string, not an array.

Change-Id: Ibeef6fd45805f82eeff8c26f7110779603d9d30a
Reviewed-on: https://code.wireshark.org/review/29724
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoQUIC: Add frame type on Connection Close (draft -13)
Alexis La Goutte [Mon, 17 Sep 2018 14:41:04 +0000 (16:41 +0200)]
QUIC: Add frame type on Connection Close (draft -13)

Change-Id: I94fe93236f5ff93ce15d80665ac13294d3a993ba
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29698
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agodocsis: minor improvements in displaying MDD TLV 22.4.2
Andrii Vladyka [Tue, 18 Sep 2018 14:20:13 +0000 (07:20 -0700)]
docsis: minor improvements in displaying MDD TLV 22.4.2

Change-Id: I29d74f5e940c07fb59453391bd26ee1bd9409143
Reviewed-on: https://code.wireshark.org/review/29717
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoQUIC: Remove old Hello Extension (26)
Alexis La Goutte [Tue, 18 Sep 2018 16:41:04 +0000 (18:41 +0200)]
QUIC: Remove old Hello Extension (26)

Remove in draft-13

Ping-Bug: 13881
Change-Id: I572dfded151569ddce3c0c90f8775a3b4a2052ba
Reviewed-on: https://code.wireshark.org/review/29720
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoFix a checkAPIs warning.
Gerald Combs [Tue, 18 Sep 2018 16:04:09 +0000 (09:04 -0700)]
Fix a checkAPIs warning.

Switch a g_warning to ws_g_warning in packet.c.

Change-Id: I3191bc7d66e1de782b45bfaac1173dbd27a346e4
Reviewed-on: https://code.wireshark.org/review/29718
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoTRANSUM: fix crash with current top of tree
Pascal Quantin [Tue, 18 Sep 2018 08:23:45 +0000 (10:23 +0200)]
TRANSUM: fix crash with current top of tree

ssl filters were renamed to tls.
Also protect against not found fields to avoid a crash in the future.

Change-Id: I181a252557b8261fa134b1331c31096a6205635f
Reviewed-on: https://code.wireshark.org/review/29715
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>