diff options
author | Ahmad Fatoum <ahmad.fatoum@siemens.com> | 2017-08-22 11:00:28 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-08-22 12:18:12 +0000 |
commit | be69761c78d0c285f88ea6b2da0399fcecf9d782 (patch) | |
tree | 3eb6fd63ca9f8ceafbb997b8ac70242b0e283e61 /ui | |
parent | a34445c1cf340a5e617464aec4042df447327de5 (diff) |
Fix requesting hardware timestamps without -k
The interface_options struct passed to dumpcap is populated
differently when running Wireshark with and without -k.
Previously, only with -k was there a valid pointer in
interface_opts.timestamp_type
Fixes: aca55a2 ("Add hardware timestamping support")
Signed-off-by: Ahmad Fatoum <ahmad.fatoum@siemens.com>
Change-Id: Ic7ecc5a1190c28197d6a7271f1b353f74d43ca61
Reviewed-on: https://code.wireshark.org/review/23160
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/capture_dlg.c | 3 | ||||
-rw-r--r-- | ui/iface_lists.c | 3 | ||||
-rw-r--r-- | ui/qt/manage_interfaces_dialog.cpp | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c index c79ff4d4d0..363746d2a3 100644 --- a/ui/gtk/capture_dlg.c +++ b/ui/gtk/capture_dlg.c @@ -1302,6 +1302,7 @@ insert_new_rows(GList *rlist) device.snaplen = global_capture_opts.default_options.snaplen; } device.cfilter = g_strdup(global_capture_opts.default_options.cfilter); + device.timestamp_type = g_strdup(global_capture_opts.default_options.timestamp_type); monitor_mode = prefs_capture_device_monitor_mode(if_string); if (roptions->remote_host_opts.auth_type == CAPTURE_AUTH_PWD) { auth_str = g_strdup_printf("%s:%s", roptions->remote_host_opts.auth_username, @@ -2656,6 +2657,7 @@ void options_interface_cb(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColum device.has_snaplen = FALSE; device.snaplen = WTAP_MAX_PACKET_SIZE_STANDARD; device.cfilter = NULL; + device.timestamp_type = NULL; #ifdef CAN_SET_CAPTURE_BUFFER_SIZE device.buffer = DEFAULT_CAPTURE_BUFFER_SIZE; #endif @@ -3507,6 +3509,7 @@ add_pipe_cb(gpointer w _U_) device.has_snaplen = global_capture_opts.default_options.has_snaplen; device.snaplen = global_capture_opts.default_options.snaplen; device.cfilter = g_strdup(global_capture_opts.default_options.cfilter); + device.timestamp_type = g_strdup(global_capture_opts.default_options.timestamp_type); device.addresses = NULL; device.no_addresses = 0; device.last_packets = 0; diff --git a/ui/iface_lists.c b/ui/iface_lists.c index dddecf4d27..bf02dc6765 100644 --- a/ui/iface_lists.c +++ b/ui/iface_lists.c @@ -80,6 +80,7 @@ fill_from_ifaces (interface_t *device) device->snaplen = interface_opts.snaplen; g_free(device->cfilter); device->cfilter = g_strdup(interface_opts.cfilter); + device->timestamp_type = g_strdup(interface_opts.timestamp_type); if (interface_opts.linktype != -1) { device->active_dlt = interface_opts.linktype; } @@ -304,6 +305,7 @@ scan_local_interfaces(void (*update_cb)(void)) device.snaplen = global_capture_opts.default_options.snaplen; } device.cfilter = g_strdup(global_capture_opts.default_options.cfilter); + device.timestamp_type = g_strdup(global_capture_opts.default_options.timestamp_type); #ifdef CAN_SET_CAPTURE_BUFFER_SIZE if ((device.buffer = capture_dev_user_buffersize_find(if_info->name)) == -1) { device.buffer = global_capture_opts.default_options.buffer_size; @@ -372,6 +374,7 @@ scan_local_interfaces(void (*update_cb)(void)) device.has_snaplen = interface_opts.has_snaplen; device.snaplen = interface_opts.snaplen; device.cfilter = g_strdup(interface_opts.cfilter); + device.timestamp_type = g_strdup(interface_opts.timestamp_type); device.active_dlt = interface_opts.linktype; device.addresses = NULL; device.no_addresses = 0; diff --git a/ui/qt/manage_interfaces_dialog.cpp b/ui/qt/manage_interfaces_dialog.cpp index 6e7714eb73..d36d5521a0 100644 --- a/ui/qt/manage_interfaces_dialog.cpp +++ b/ui/qt/manage_interfaces_dialog.cpp @@ -234,6 +234,7 @@ void ManageInterfacesDialog::on_addPipe_clicked() device.has_snaplen = global_capture_opts.default_options.has_snaplen; device.snaplen = global_capture_opts.default_options.snaplen; device.cfilter = g_strdup(global_capture_opts.default_options.cfilter); + device.timestamp_type = g_strdup(global_capture_opts.default_options.timestamp_type); #ifdef CAN_SET_CAPTURE_BUFFER_SIZE device.buffer = DEFAULT_CAPTURE_BUFFER_SIZE; #endif @@ -350,6 +351,7 @@ void ManageInterfacesDialog::updateRemoteInterfaceList(GList* rlist, remote_opti device.snaplen = global_capture_opts.default_options.snaplen; } device.cfilter = g_strdup(global_capture_opts.default_options.cfilter); + device.timestamp_type = g_strdup(global_capture_opts.default_options.timestamp_type); monitor_mode = prefs_capture_device_monitor_mode(if_string); if (roptions->remote_host_opts.auth_type == CAPTURE_AUTH_PWD) { auth_str = g_strdup_printf("%s:%s", roptions->remote_host_opts.auth_username, |