aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-06-19 08:47:48 +0000
committerGuy Harris <guy@alum.mit.edu>2001-06-19 08:47:48 +0000
commit60d762a7c23368c1dc14ea193740283718dac511 (patch)
treecf86e1880100a87101328d40858eb3675dcf18c2 /gtk
parentdecbfd022609590e2ab85e89790a5cd3276b81b7 (diff)
In a capture child process, *completely ignore* the preference setting
for promiscuous mode; just do what the parent process told you, i.e. do a non-promiscuous capture iff a "-p" flag was specified. svn path=/trunk/; revision=3575
Diffstat (limited to 'gtk')
-rw-r--r--gtk/main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gtk/main.c b/gtk/main.c
index 230f4b441f..0a4068b553 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -1,6 +1,6 @@
/* main.c
*
- * $Id: main.c,v 1.200 2001/06/05 07:38:37 guy Exp $
+ * $Id: main.c,v 1.201 2001/06/19 08:47:48 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -937,6 +937,16 @@ main(int argc, char *argv[])
/* Read the preference files. */
prefs = read_prefs(&gpf_open_errno, &gpf_path, &pf_open_errno, &pf_path);
+#ifdef HAVE_LIBPCAP
+ /* If this is a capture child process, it should pay no attention
+ to the "prefs.capture_prom_mode" setting in the preferences file;
+ it should do what the parent process tells it to do, and if
+ the parent process wants it not to run in promiscuous mode, it'll
+ tell it so with a "-p" flag. */
+ if (capture_child)
+ prefs->capture_prom_mode = TRUE;
+#endif
+
/* Read the capture filter file. */
read_filter_list(CFILTER_LIST, &cf_path, &cf_open_errno);
@@ -1103,7 +1113,7 @@ main(int argc, char *argv[])
break;
case 'p': /* Don't capture in promiscuous mode */
#ifdef HAVE_LIBPCAP
- prefs->capture_prom_mode = 0;
+ prefs->capture_prom_mode = FALSE;
#else
capture_option_specified = TRUE;
arg_error = TRUE;