From b451f267b680323deacb25fbea0b6256c16cd1d6 Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Thu, 31 Jan 2013 22:30:56 +0000 Subject: 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 --- ui/gtk/capture_dlg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ui') 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); -- cgit v1.2.3