diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2013-01-31 22:30:56 +0000 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2013-01-31 22:30:56 +0000 |
commit | b451f267b680323deacb25fbea0b6256c16cd1d6 (patch) | |
tree | 775f012d4f01537278cfa9249706bdd5ec24e32f /ui | |
parent | 414b0c09e653e52d5437996f4d6dab296d018389 (diff) |
for an interface that does not support monitor mode, make sure that
monitor mode is not enabled
(this fixes the gui part but there's probably more to do)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8283
svn path=/trunk/; revision=47399
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/capture_dlg.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c index 5d92627581..80a97f8f07 100644 --- a/ui/gtk/capture_dlg.c +++ b/ui/gtk/capture_dlg.c @@ -2490,7 +2490,10 @@ save_options_cb(GtkWidget *win _U_, gpointer user_data _U_) g_assert(filter_text != NULL); device.cfilter = filter_text; #ifdef HAVE_PCAP_CREATE - device.monitor_mode_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(monitor_cb)); + /* if dumpcap reported that the interface does not support monitor + mode, we disable monitor mode even if the user explicitly selected it */ + device.monitor_mode_enabled = device.monitor_mode_supported ? + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(monitor_cb)) : FALSE; #endif g_array_insert_val(global_capture_opts.all_ifaces, marked_interface, device); window_destroy(opt_edit_w); |