Commit Graph

74393 Commits

Author SHA1 Message Date
Anders Broman afeec6d646 NAS-5GS: Dissect more IEs
- 9.11.3.50A   SMS indication
- 9.11.3.51    SOR transparent container

Change-Id: I12bcb1ab1a94eb4fff1673979ff2862a2ec62654
Reviewed-on: https://code.wireshark.org/review/31839
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-31 14:39:49 +00:00
Stig Bjørlykke 6aad32583d tshark: Improve options help texts
Align the usage help text for '-' as filename for stdin and stdout
with the text used for wireshark.

Change-Id: I67011b8234616940b7878fd5768c9e2a9e79f9f0
Reviewed-on: https://code.wireshark.org/review/31838
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-31 13:16:54 +00:00
Peter Wu 3bbf2c5e64 CMake: describe purpose of MaxMindDB
Change-Id: I7a3ec64d772ee5fc0d3b040702dfc0de8da93250
Reviewed-on: https://code.wireshark.org/review/31836
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-31 13:16:12 +00:00
Peter Wu 298da5213b CMake: describe the purpose of NL
Change-Id: I9bfb2400445399088ff67eab39178e38daf85499
Reviewed-on: https://code.wireshark.org/review/31835
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-31 13:15:58 +00:00
Peter Wu 87e5269c69 CMake: rewrite FindSystemd.cmake file
Clarify that this is only needed for the sdjournal extcap interface and
report the found version in the CMake output.

Change-Id: I40bc540631bda32d0b92e4fcd59d8c1726606d86
Reviewed-on: https://code.wireshark.org/review/31834
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-31 13:15:47 +00:00
Peter Wu 9feb7fb522 Fix build without GnuTLS
The RSA Keys API and GUI are only functional when GnuTLS support is
available. Be sure to hide the functions in the header and hide the
preferences panel when GnuTLS support is missing.

Change-Id: I0a52ab142c4d45b8186780ea9b1645542dcc6305
Fixes: v2.9.1rc0-585-gec8f506c4b ("Qt: add initial RSA Keys preference frame")
Reviewed-on: https://code.wireshark.org/review/31837
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-31 13:14:22 +00:00
Peter Wu 7b04a4f797 QUIC: put coalesced packets in separate trees
Make the output of "tshark -Tjson --no-duplicate-keys" more useful.
Note: connection information is only available under the first QUIC item
to avoid duplication of information.

Bug: 13881
Change-Id: I5e25b1f3936e259d621002151f4d76a3538c9aa4
Reviewed-on: https://code.wireshark.org/review/31817
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-31 11:22:40 +00:00
Stig Bjørlykke 74f18bd005 bluetooth: Update Assigned Numbers
Change-Id: I88d063b5e41bedee746ebb4a6d5df2bc0424ef23
Reviewed-on: https://code.wireshark.org/review/31831
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-01-31 10:16:07 +00:00
Stig Bjørlykke 66c548fdb7 Qt: Restore column width and visibility when switching profiles
In some cases the column width and/or hidden setting is not correctly applied
when switching between profiles having different hidden settings.

Unhiding the column before applying width and hidden setting fixes this issue.

Bug: 15466
Change-Id: I09e3451612ba6dd0510b19f7f4d84d281b0188b5
Reviewed-on: https://code.wireshark.org/review/31812
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-01-31 10:15:56 +00:00
Guy Harris b5817dbda7 Also check whether we have nothing but DLCI bytes.
The two failure modes are 1) no byte has the low-order bit set, so we
didn't even find the end of the DLCI or 2) the byte at the end of the
packet has the low-order bit set, so that it's all DLCI with no control
byte after it.

Expand a comment.

Bug: 15463
Change-Id: Ib76686391213dd56c06d665aa87a188621fe6816
Reviewed-on: https://code.wireshark.org/review/31828
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-31 08:59:41 +00:00
Stig Bjørlykke 8cfad3fd56 btle: Add Version 5.1 to ll_version_number_vals
Change-Id: I777dcaa6bd7f161ecbdc7411c3f816480c76834d
Reviewed-on: https://code.wireshark.org/review/31827
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-01-31 08:17:37 +00:00
Guy Harris 498b64c95c Check whether you've hit the end of the packet data before going further.
If we found no bytes with the low-order bit set in the packet data,
there's no point in checking the non-existent "next" byte to see if it's
a HDLC-style UI control byte (0x03).

Bug: 15463
Change-Id: Ibfd186e5b81d8ce229362e23f00b31a27900831a
Reviewed-on: https://code.wireshark.org/review/31824
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-31 07:40:32 +00:00
Guy Harris 2a675c0d5b Use tvb_reported_length_remaining() to get the remaining data length.
Change-Id: If2930b772338a3a69fecb42102db2041df606e98
Reviewed-on: https://code.wireshark.org/review/31823
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-31 07:04:30 +00:00
Guy Harris 660e63aaf3 Rpcap authentication replies now have an optional payload.
Change-Id: Id1ac1e12feb69573bed9bc419c819235da053867
Reviewed-on: https://code.wireshark.org/review/31820
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-31 07:00:11 +00:00
Dario Lombardo 58698a7de3 ngsniffer: fix comment.
Change-Id: Ia25ce4841ee3831f995d1fa7cd2cb8a850f1c01e
Reviewed-on: https://code.wireshark.org/review/31818
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-30 21:38:15 +00:00
Anders Broman 08debda4fc NAS-5GS: Dissect more V15.2.1 IEs
Change-Id: I9084ad99748a9d53bdae238f29b4a9750ca08a92
Reviewed-on: https://code.wireshark.org/review/31816
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-30 16:17:00 +00:00
Joakim Karlsson 1a52ab9417 GTP: fix PDU Session Container
Change-Id: Iebe07b60cb03b2b149f8ce596333730558586fca
Reviewed-on: https://code.wireshark.org/review/31815
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-30 12:21:01 +00:00
Alexis La Goutte 7db343604a print: fix parameter 'data' not found in the function declaration
fix warning found with clang and -Wdocumentation CFLAG

Change-Id: I9fc122012161c5942c08cb90a9aeda1da6185180
Reviewed-on: https://code.wireshark.org/review/31808
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-30 09:15:01 +00:00
Anders Broman 03e1efd6fe NAS-5GS: Dissect more V15.2 IE's
Change-Id: I654b537b22776a599e4f2b2260c028d76ba5dfc2
Reviewed-on: https://code.wireshark.org/review/31805
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-30 09:13:48 +00:00
Peter Wu fec117b99a Qt: Add support for RSA private key file selection
Update release notes now that this GUI is mostly functional.

Change-Id: I118fbbe879e366643084f0e7ac3e437a29f21d5f
Reviewed-on: https://code.wireshark.org/review/31797
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-29 23:34:14 +00:00
Peter Wu f3c869d3eb Qt: implement addition of a new pkcs11 token in the RSA Keys dialog
Load the list of key URIs, strip known keys, ask for a PIN, add valid
results to the list. Apply this list on pressing OK in the preferences
dialog or revert the changes on pressing Cancel.

Change-Id: Id48cd9b876b4d272eb6dbdadf8a0859190cc0ce8
Reviewed-on: https://code.wireshark.org/review/31796
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-29 23:34:08 +00:00
Peter Wu ec8f506c4b Qt: add initial RSA Keys preference frame
The RSA Keys frame is intended to configure RSA keys (both key files and
PKCS #11 tokens). Add a new "RSA Keys" item to the preferences menu.
Implement addition and removal of PKCS #11 libraries and add an initial
version that displays configured RSA keys.

The "Add new token…" button will be implemented later.

Change-Id: Ie5b9eb403afc7bebeb7be8bd53d4d4b30842204c
Reviewed-on: https://code.wireshark.org/review/31795
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-29 23:34:01 +00:00
Peter Wu 8c7ca0e884 secrets: add functions to query and validate pkcs11 tokens/key files
Provide a way to retrieve key URIs ("pkcs11:" and in the future maybe
"system:") and validate the PIN/password for such keys. Additionally
permit validation of a RSA key file.

This will be used for the RSA Keys GUI dialog.

Change-Id: I4177a11cb9f4758d7564daae509e20a4a42623fa
Reviewed-on: https://code.wireshark.org/review/31794
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-29 23:33:51 +00:00
Peter Wu f66cb9f7ef Qt: move method to apply/undo UAT changes to UatModel
UatModel could be constructed with a name instead of an epan_uat type.
To allow those users to save/revert the uat, make sure to expose a
method that does not require access to the underlying epan_uat type.

Change-Id: I1d1a5811c1025bd9c2a2ea1722f460e6ac33b9aa
Reviewed-on: https://code.wireshark.org/review/31793
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-29 23:33:46 +00:00
Stig Bjørlykke 58ffb7c306 Qt: Fix memory leak of QMenu.
Set the push button as parent to the save menu so it will be deleted
when that parent is destroyed.

Change-Id: Ic396dcf25092c90cd305a010be3d551d8ad8397c
Reviewed-on: https://code.wireshark.org/review/31802
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-29 21:56:34 +00:00
Dario Lombardo 8d599e1952 dissectors: use '/' when stacking protocols in COL_PROTOCOL.
A commoly used convention when adding more then 1 protocols in
COL_PROTOCOL (using col_set_fence) is to separate them using the
'/' character. Some dissectors use ' ', others use '|'. Make them
all use '/'.

Change-Id: Ibcddd7500f637d96313b264122d48ac6bff1e96c
Reviewed-on: https://code.wireshark.org/review/31804
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-29 21:49:09 +00:00
Dario Lombardo 30f8175303 column-utils: replace TAB with SPACE in prototypes.
In some functions the file showed

<ret_type><TAB><func name>

while in others

<ret_type><SPACE><func name>

All prototypes aligned to use the latter.

Change-Id: I47163824c9ae629c84df6d795192353eed5d5cca
Reviewed-on: https://code.wireshark.org/review/31803
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-29 21:49:02 +00:00
Pascal Quantin dbf436b67e MAC NR: add dissection of NR PHR and PCMAX,f,c fields
Change-Id: I86734442de4fcc4781fbee4517d6dccd87f8da30
Reviewed-on: https://code.wireshark.org/review/31806
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2019-01-29 21:47:15 +00:00
Stig Bjørlykke 5b6ba0c119 doc: Add custom window title enhancements to release notes
Change-Id: I8911a55e4f4952095b9ab64d373a6faa19729f63
Reviewed-on: https://code.wireshark.org/review/31801
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-29 20:38:52 +00:00
Guy Harris d58a3ffe4f Once we've identified a TCP segment as rpcap, use rpcap for the connection.
One reason to use Wireshark is to diagnose protocol errors, so don't,
for example, treat too-short packets, in a TCP connection where we've
already seen rpcap packets, as not being rpcap packets.  (Yes, that *is*
a bug, in the libpcap master, that I found and fixed.)

Change-Id: I9a81e5b9a2910331574164395302247a446e805b
Reviewed-on: https://code.wireshark.org/review/31809
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-29 20:02:43 +00:00
João Valverde 1260f3edea CMake: Minor standard output improvements
Change-Id: I7677220ec49d7b04f61e2a7287dac3a744f1c6c6
Reviewed-on: https://code.wireshark.org/review/31786
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-01-29 15:03:25 +00:00
Stig Bjørlykke ab13515315 lwm2mtlv: Fix memleaks in UAT subtree array handling
No need to allocate pointers for subtree indexes.

Change-Id: Ia1214e42d8220341454e1126878c217835788797
Reviewed-on: https://code.wireshark.org/review/31776
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-29 14:32:36 +00:00
Stig Bjørlykke 8b75b52254 wslua: Don't defer deletion of subtree indexes
The subtree indexes are only used in the dissector so it's not
needed to defer the deletion.

Change-Id: I33600897a186c078cc1021cde5a1d90054d475c8
Reviewed-on: https://code.wireshark.org/review/31800
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-29 14:30:37 +00:00
Marko Hrastovec 187b587589 ASTERIX Category 020 Ed. 1.9 and Reserved Expansion Field Ed. 1.3
ASTERIX dissector now supports Category 020 Edition 1.9, which is used for
Multilateration Target Reports, and Reserved Expansion Field for
Category 020 Edition 1.3.

Specifications for Category 020 are:
https://www.eurocontrol.int/publications/cat020-multilateration-mlt-messages-part-14
https://www.eurocontrol.int/publications/cat020-coding-rule-reserved-expansion-field-part14-appendix

Change-Id: I867f48c3d4299c22f68edf1e3f9cdbcfabc47eb4
Reviewed-on: https://code.wireshark.org/review/31766
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-29 08:10:34 +00:00
Stig Bjørlykke 469d7bf9d9 btmesh: Fix memleaks in UAT handling
Free allocated strings before allocating new and in free callback.

Change-Id: If7bd0ee8455cf3c3e0c6300ce79e20557256eb8e
Reviewed-on: https://code.wireshark.org/review/31773
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-01-29 07:40:51 +00:00
James Ko 7592c1dd98 Fix: WiSUN Explicit Channel Plan parsing
The Unicast Schedule IE (US-IE) and Broadcast Schedule IE (BS-IS) may
define an explicit channel plan with the following fields in the channel
information fields:
    24-bits - channel 0 frequency in kHz (little endian byte-order),
     4-bits - channel spacing enumeration,
     4-bits - reserved (must be set to 0), and
    2-bytes - number of channels

Bug: 15451
Change-Id: If6923faca777343e17b0cb9012bb07d98b9bc194
Reviewed-on: https://code.wireshark.org/review/31745
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-29 06:11:59 +00:00
Stig Bjørlykke 2b7875b905 wslua: Update wslua_register_menu() documentation
Add missing group values. Update regex to match TELEPHONY_MTP3.

Change-Id: I709a416e30d79c2de69887548015a3c1ecfe5bab
Reviewed-on: https://code.wireshark.org/review/31779
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-29 05:47:05 +00:00
Guy Harris 7d4b47a073 Further improve that error message.
Put the function name in quotes.

Change-Id: I09be392a9bac3b56c13b82a554d17ea29695657c
Reviewed-on: https://code.wireshark.org/review/31790
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-28 22:23:45 +00:00
Guy Harris e8f54b8aed Fix an error message.
I guess "s" in "The function s" was supposed to be "%s", giving the
function name.  Make it so, and properly fetch the function name.

Change-Id: I67287f24626fa0a2816fb2cf574e5d9ff58713bf
Reviewed-on: https://code.wireshark.org/review/31787
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-28 22:08:41 +00:00
Vasil Velichkov 311dc2f14a tests: Skip Lua related tests when Lua is not present
Change-Id: I46ea83c0295d53f3b0b1d7f372c4fef2fb292e6c
Reviewed-on: https://code.wireshark.org/review/31785
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-28 21:03:04 +00:00
Guy Harris 90cf075016 Update a column to reflect the underlying issue.
See

    https://code.wireshark.org/review/c/31755/#message-d73e5c7c_eed569dc

for the details.

Change-Id: Ib4f28d843a96ec30daa263f49ac2620bfecba718
Reviewed-on: https://code.wireshark.org/review/31780
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-28 18:50:13 +00:00
Dario Lombardo 77b7b021b9 epan: add missing include.
Fix broken compilation on fedora28.

Change-Id: Ib2c4ec3b2437bab0b8bf35e8a3c8072cf1c0f996
Reviewed-on: https://code.wireshark.org/review/31772
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Vasil Velichkov <vvvelichkov@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2019-01-28 16:43:47 +00:00
Anders Broman d90806a9b4 IEEE1609dot2: Use GUINT_TO_POINTER/GPOINTER_TO_UINT to store a guint32
This should be changed so that ieee1609dot2 is called with a struct as
data containing the psid. If needed it can be stored in actx->private
data.

Change-Id: Iccef08a93fd090eb586401b2999684eee2afb382
Reviewed-on: https://code.wireshark.org/review/31775
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-28 15:24:54 +00:00
Dario Lombardo 3cd5ac36e2 BER: don't use invalid time offsets.
4 digits values could overflow the destination buffer. Skip them
since they're invalid and can only from tainted data.

Bug: 15447
Change-Id: Ice6d4f144597499483160ecaa63702025ab86f61
Reviewed-on: https://code.wireshark.org/review/31751
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-28 15:00:33 +00:00
Sergey Avseyev 7a06a66eb8 couchbase: update list of HELLO features
Change-Id: I323c54faaeaf951e284fa3b64c19e9e6671d36ec
Reviewed-on: https://code.wireshark.org/review/31767
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-28 14:12:55 +00:00
Stig Bjørlykke 8b684769a8 wslua: Improve syntax error message
The filename is included in the error message from Lua so we don't
need to display this twice.

Change-Id: I00aa7255ff24b07b9f45a8e814a97b61c35936e1
Reviewed-on: https://code.wireshark.org/review/31768
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-01-28 13:22:22 +00:00
João Valverde 21cbfef532 doc: Fix sdjournal podpath warning
Use the perpod syntax for manpages to remove this warning:

  Cannot find "tail" in podpath: cannot find suitable replacement
  path, cannot resolve link

Change-Id: I90cb4fe7d3b019e4bc5f5a8fbc7df347f966badb
Reviewed-on: https://code.wireshark.org/review/31770
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-28 12:24:10 +00:00
Peter Wu 8003c0dd75 lua: fix build with Lua 5.1 due to missing LUA_OK macro
Change-Id: If367f79172c8222c65fd9d95a050e75194df852d
Fixes: v2.9.1rc0-556-g6a49c72974 ("wslua: include Lua stack trace in startup error messages")
Reviewed-on: https://code.wireshark.org/review/31771
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-28 11:54:08 +00:00
Peter Wu eec3ce3bb2 dfilter: fix memory leaks on dfilter compile errors involving a set
If a display filter contains a set for the set membership operator and
an error occurs, then gen_relation_in() (called via dfw_gencode() will
not take ownership of the set and a memory leak occurs.

Fix this by implementing a free callback for STTYPE_SET nodes which
frees unclaimed data. Add tests to verify the effectiveness, ASAN no
longer complains after this fix.

Bug: 15442
Change-Id: If37cf047660464b2d0304748034d0bc22111e5d6
Reviewed-on: https://code.wireshark.org/review/31758
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-28 11:09:35 +00:00
Peter Wu e8e60df4ce dfilter: fix memory leaks if a dfilter fails to compile
A display filter can contain values such as strings, numbers, etc. These
are internally stored in a fvalue_t structure. While compiling a display
filter, it will store a fvalue_t in a node of type STTYPE_FVALUE.

These nodes are created while parsing the dfilter in dfilter_compile().
If the semantic check and conversion (dfw_semcheck()) succeeds, it will
transfer the values of the parsed tree to dfw_gencode(). After that,
dfwork_free will dispose the tree while a compiled dfilter code remains.
When the dfilter code is destroyed, it will free the values too.

However, when dfw_semcheck() fails (for example, due to an illegal
filter such as "len(badname)==1"), it will skip "dfw_gencode()" and
consequently the fvalue data is not transferred nor freed. Fix this by
always freeing the data (unless the data was stolen by dfw_gencode()).

Fixes a memory leak reported for case_dfunction_string::test_fail_2
which was detected by ASAN.

Bug: 15442
Change-Id: I9b1cb613659890c8ddcfa57f11f9d3f61a51a3f9
Reviewed-on: https://code.wireshark.org/review/31757
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-28 11:09:17 +00:00