Commit Graph

5833 Commits

Author SHA1 Message Date
Stig Bjørlykke 19153cf911 wsutil: Add config_file_exists_with_entries()
The purpose of this function is to check if a configuration file exists
and has at least one entry which is not a comment.

Use this when building the list of profiles where the user can copy
configuration from, to avoid listing profiles with empty files or files
with only comments.

Change-Id: If45f52025959818fb1213ffac488cd59441e9fce
Reviewed-on: https://code.wireshark.org/review/30113
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-10-11 12:33:05 +00:00
Stig Bjørlykke e1fc60ddae Qt: Add back pathLabel in some dialogs
Add the pathLabel for Coloring Rules, Decode As, Display Filters
and Capture Filter. Put the absolute file path into the pathLabel
if the file exists. This aligns with UAT dialogs and frames.

Change-Id: I72bd06e31bab220de0a0ef8df99df9a4daed667c
Reviewed-on: https://code.wireshark.org/review/30089
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-10 04:46:28 +00:00
Stig Bjørlykke eade1c52cb Qt: Use regular size buttons on macOS
Use regular size buttons in dialogs on macOS.

Change-Id: Iad769190b7f62297343eea4299e3f03ea6be4b1e
Reviewed-on: https://code.wireshark.org/review/30099
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-10 04:45:55 +00:00
Stig Bjørlykke 420c4ecc56 Qt: Add copy from another profile for UAT frames
Add a new button to UAT frames to copy entries from another profile.

Change-Id: I9decb5ed5d67e97388ee7b22a15cacae4d5a3621
Reviewed-on: https://code.wireshark.org/review/30084
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-08 21:07:58 +00:00
Stig Bjørlykke 75c370fe54 Qt: Refactor copy from profile widget
Refactor CopyFromProfile class from Button to Menu to make it
usable for existing buttons, both QPushButton and QToolButton.

Change-Id: I7d23b4225dbe45f961fb05e73dbb4dd51e6f8ea1
Reviewed-on: https://code.wireshark.org/review/30083
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-08 21:07:49 +00:00
Stig Bjørlykke 07e91bbf32 Qt: Fix a typo in a tooltip
Change-Id: I71c8193d5352f9ac58541dc56b58cf3e85275f6e
Reviewed-on: https://code.wireshark.org/review/30068
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-08 08:30:13 +00:00
Stig Bjørlykke b3cb942dbc Qt: Add clear all button to Decode As
Add a clear all button to easily remove all existing entries.

Change-Id: I76e7ee2b7b85a9b4e5f9f5a788a89f38f70ee8ce
Reviewed-on: https://code.wireshark.org/review/30052
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-08 07:12:34 +00:00
Stig Bjørlykke 6e22ecbc20 Qt: Remove unused pathLabel
Change-Id: Id1c40f231f49f75210af43fa2a5cfbe3937d9ca1
Reviewed-on: https://code.wireshark.org/review/30055
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-08 07:12:08 +00:00
Guy Harris bce13644e9 Bring back arg_list_utf_16to8(), but have it just do UTF-16-to-UTF-8 mapping.
Call it from wmain() in the command-line tools, passing it the input
argument count and vector, and call it from main() in Wireshark, after
getting a UTF-16 argument vector from passing the result of
GetCommandLineW() to CommandLineToArgvW().

Change-Id: I0e51703c0a6c92f7892d196e700ab437bd702514
Reviewed-on: https://code.wireshark.org/review/30063
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-08 03:05:45 +00:00
Stig Bjørlykke 9388bd0436 Qt: Clean up indentation
Change-Id: Idbae503b44c207d71431159a3eaf762e1dc79977
Reviewed-on: https://code.wireshark.org/review/30056
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-07 20:27:09 +00:00
Stig Bjørlykke 44c290efcd Qt: Fix Coloring Rules apply as filter button size
Change-Id: I3847f10b8b337b6df4f86b920dcf11b73b35b869
Reviewed-on: https://code.wireshark.org/review/30054
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-07 20:04:26 +00:00
Guy Harris a679ae6f79 Use wsetargv.obj, and wmain() rather than main(), on Windows.
Doing so for command-line programs means that the argument list doesn't
ever get converted to the local code page; converting to the local code
page can mangle file names that *can't* be converted to the local code
page.

Furthermore, code that uses setargv.obj rather than wsetargv.obj has
issues in some versions of Windows 10; see bug 15151.

That means that converting the argument list to UTF-8 is a bit simpler -
we don't need to call GetCommandLineW() or CommandLineToArgvW(), we just
loop over the UTF-16LE argument strings in argv[].

While we're at it, note in Wireshark's main() why we discard argv on
Windows (Qt does the same "convert-to-the-local-code-page" stuff); that
means we *do* need to call GetCommandLineW() and CommandLineToArgvW() in
main() (i.e., we duplicate what Qt's WinMain() does, but converting to
UTF-8 rather than to the local code page).

Change-Id: I35b57c1b658fb3e9b0c685097afe324e9fe98649
Ping-Bug: 15151
Reviewed-on: https://code.wireshark.org/review/30051
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-07 18:57:54 +00:00
Gerald Combs c195ab320d [Automatic update for 2018-10-07]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I2d18df70f52949eda05f0b490870fd133866e6cd
Reviewed-on: https://code.wireshark.org/review/30046
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-10-07 08:29:21 +00:00
Stig Bjørlykke d7cf0086fc Qt: Add copy from another profile for IO Graphs
Add a new button to the IO Graphs dialog to copy entries from
another profile. Add a clear all button to easily remove all
existing entries before copying.

Change-Id: I66cb27163663e5f2223d0dd3f8566f0fbebb553c
Reviewed-on: https://code.wireshark.org/review/30043
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-07 05:37:48 +00:00
Stig Bjørlykke 3e78bdccce Qt: Use ActionRole for the "copy from profile" button
The correct role for the newly introduced copy from profile button is
ActionRole because it "causes changes to the elements within the dialog".

Change-Id: I8613d00c0fdb33f2873e999aea9a54ea1f49dffb
Reviewed-on: https://code.wireshark.org/review/30044
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-07 05:37:24 +00:00
Stig Bjørlykke af392b873a Qt: Call createIOGraph() when duplicating an existing IO Graph
Call createIOGraph() when adding a new graph by duplicating
an existing to actually create the new graph.

This is a regression from g5b3e3ee5.

Change-Id: If1d8e4386a44dc4867d75fbad2d9ebb2e4b22307
Reviewed-on: https://code.wireshark.org/review/30034
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-06 06:09:31 +00:00
Uli Heilmeier 8dfaa8fa7c *shark: Update help and manpage for name resolving
Add 'v' option for VLAN ID resolving and get rid of
deprecated 'C' option.

Bug: 14826
Change-Id: I63104f4a465d251048693ad02882ea7eb2c4d926
Reviewed-on: https://code.wireshark.org/review/30029
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-05 13:19:05 +00:00
Stig Bjørlykke 75c46e80bf Qt: Add copy from another profile in UAT dialogs
Add a new button to UAT dialogs to copy entries from another profile.

Change-Id: I641ba764d8738f738466529d74d4a21ff13075a0
Reviewed-on: https://code.wireshark.org/review/30028
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-05 12:38:32 +00:00
Stig Bjørlykke 84a0eccebd Qt: Add copy from another profile for colorfilters
Add a new button to the Coloring Rules dialog to copy entries from
another profile, or system defaults. The "copy from profile" button
will also be used for other dialogs.

Add a clear all button to easily remove all existing entries before
importing or copying from another profile.

Change-Id: Ia1e66444731018372b4354164c5a722fd73d403b
Reviewed-on: https://code.wireshark.org/review/30008
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-05 12:38:22 +00:00
Dario Lombardo 4e38af0e74 Qt: add an hint to no interfaces label.
Change-Id: Ifae80b5e3d56ddbea93164ff778196358976360d
Reviewed-on: https://code.wireshark.org/review/30030
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-05 10:57:20 +00:00
Dario Lombardo c21ecc1308 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>
2018-10-04 07:50:54 +00:00
Stig Bjørlykke 736f92eff9 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>
2018-10-03 21:53:16 +00:00
Peter Wu 29fbbfb3d3 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>
2018-10-03 03:52:43 +00:00
Stig Bjørlykke 6f8ee143f7 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>
2018-10-01 09:05:48 +00:00
Stig Bjørlykke e1ef8f6a40 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>
2018-10-01 08:16:15 +00:00
Stig Bjørlykke ee10686089 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>
2018-10-01 08:06:49 +00:00
Peter Wu 6ca646efc8 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>
2018-09-30 16:35:05 +00:00
Peter Wu 9118d959a4 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>
2018-09-30 16:30:04 +00:00
Gerald Combs 5a401ccad9 [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>
2018-09-30 08:30:47 +00:00
Guy Harris 88f74fb626 Fix comment.
Change-Id: I0517424a19d31a6df50c843689e97600f0bb5a0e
Reviewed-on: https://code.wireshark.org/review/29931
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-30 00:40:10 +00:00
Guy Harris 9be5c2fae3 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>
2018-09-29 23:53:59 +00:00
Guy Harris b59cadb313 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>
2018-09-29 21:05:59 +00:00
Peter Wu 91030a16aa 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>
2018-09-29 19:12:13 +00:00
Stig Bjørlykke 45be966822 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>
2018-09-29 10:30:11 +00:00
Guy Harris 09698df0b4 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>
2018-09-29 01:24:27 +00:00
Guy Harris 586ad18159 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>
2018-09-29 00:33:20 +00:00
Stig Bjørlykke 0e87371fac prefs: Remove trailing dot from UI text
Change-Id: I6eaef762a523260dce2a380257111721ddf48811
Reviewed-on: https://code.wireshark.org/review/29865
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-26 18:22:53 +00:00
Dario Lombardo 7a07832712 prefs: add the option not to load interfaces on startup.
Change-Id: I2ade0647a8c32b76aebd60117b4317cd005aff91
Reviewed-on: https://code.wireshark.org/review/29854
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-26 17:11:47 +00:00
Dario Lombardo 56c1ec5208 Qt: don't load the interfaces list if a capture file is used.
Bug: 15126
Change-Id: I4c190879541db94637ad88ffe99f10479caa4a43
Reviewed-on: https://code.wireshark.org/review/29549
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-26 15:07:58 +00:00
Gerald Combs 50dbe4df7f 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>
2018-09-25 13:24:17 +00:00
Roland Knall 70e340aaaf 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>
2018-09-25 09:01:16 +00:00
Stig Bjørlykke 4d697b55be 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>
2018-09-24 07:47:57 +00:00
Gerald Combs f5da393991 [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>
2018-09-23 08:30:49 +00:00
Gerald Combs cd95e197ca Start renaming SSL to TLS.
Rename the "ssl" protocol to "tls" and add an "ssl" alias. Prefer "TLS"
over "SSL" in user interface text and in the documentation.

Fix the test_tls_master_secret test while we're here.

Bug: 14922
Change-Id: Iab6ba2c7c4c0f8f6dd0f6d5d90fac5e9486612f8
Reviewed-on: https://code.wireshark.org/review/29649
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-09-13 22:37:52 +00:00
Stig Bjørlykke 4df2fcb0ee Qt: Replace $HOME with ~ in window title %F variable
Replace $HOME with ~ in window title %F variable.
Optimize code to check if variable is used before doing replacement.

Change-Id: I95ef8505e50379d98fdb1661e09394d1ded7ecca
Reviewed-on: https://code.wireshark.org/review/29597
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-11 09:19:56 +00:00
Stig Bjørlykke 400f748b04 Qt: Add some window title variables
Add some new variables to be used in custom window title.

%F = file path of the capture file
%S = a conditional separator (" - ") that only shows when surrounded
     by variables with values or static text

Change-Id: I20a60a3018cc86236f4991030eadb7f51681cc32
Reviewed-on: https://code.wireshark.org/review/29534
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-10 19:50:55 +00:00
Peter Wu ad0de0ffbc prefs,ui: properly migrate old filter expressions
When legacy filter expressions preferences are present, be sure to
(1) save the dfilter_buttons file when updating the preferences file and
(2) save the preferences file after updating the dfilter_buttons file.

Without doing (1), the old buttons will be lost. Without (2), restarting
Wireshark will result in duplicate buttons. Only write the files if the
user actually made other changes to avoid breaking profiles by just
opening Wireshark.

Bug: 15114
Bug: 15121
Change-Id: I5b9417c34146c4450526781a20308c9c98fb44a1
Reviewed-on: https://code.wireshark.org/review/29488
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-09-10 09:27:34 +00:00
Stig Bjørlykke 7d7175a130 Qt: Restore column visibility when loading packets
Always restore column visibility when loading packets to avoid some
situations where the column hidden state was incorrect.

This fixes the following scenario:
 - Apply a column and hide it using the column popup menu
 - Apply another column and remove it using the column popup menu
 - Close and reopen the capture file
 - Observe the hidden column is shown, but with wrong width

Change-Id: I00531907b2383c6605a2d62e8243092906037d0c
Reviewed-on: https://code.wireshark.org/review/29516
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-10 07:26:00 +00:00
Guy Harris aa0c067529 Avoid warnings about a format string being a variable.
This also avoids issues if this isn't called in packet scope.

Change-Id: I7dbf5b49c9f7c1b442a1104156b004b339076c26
Reviewed-on: https://code.wireshark.org/review/29527
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-10 03:01:35 +00:00
João Valverde a93698a4ff Remove the tshark -z compare feature
- It cannot support IPv6.
  - Non-standard use (specifically recommended against in the RFCs)
of the IPv4 fragment ID field.
  - Has a narrow and non-obvious use case, IMO.
  - It is not supported in the Qt GUI.
  - Significant maintenance burden for an obscure feature.

Change-Id: Icaf429269dc42f78c38b8d20001508132499faf8
Reviewed-on: https://code.wireshark.org/review/29239
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>
2018-09-09 23:55:19 +00:00