Fix bug #7178 reported by aparan

svn path=/trunk/; revision=42206
This commit is contained in:
ruengeler 2012-04-23 12:34:16 +00:00
parent 987ce281e4
commit 0819722ad8
2 changed files with 15 additions and 2 deletions

View File

@ -1010,7 +1010,7 @@ collect_ifaces(capture_options *capture_opts)
#ifdef HAVE_PCAP_CREATE
interface_opts.monitor_mode = device.monitor_mode_enabled;
#endif
if (!device.local) {
/* if (!device.local) {*/
#ifdef HAVE_PCAP_REMOTE
interface_opts.src_type = CAPTURE_IFREMOTE;
interface_opts.remote_host = g_strdup(device.remote_opts.remote_host_opts.remote_host);
@ -1026,7 +1026,7 @@ collect_ifaces(capture_options *capture_opts)
interface_opts.sampling_method = device.remote_opts.sampling_method;
interface_opts.sampling_param = device.remote_opts.sampling_param;
#endif
}
/* }*/
g_array_append_val(capture_opts->ifaces, interface_opts);
} else {
continue;

View File

@ -4111,7 +4111,20 @@ scan_local_interfaces(capture_options* capture_opts)
}
}
#ifdef HAVE_PCAP_REMOTE
device.local = TRUE;
device.remote_opts.src_type = CAPTURE_IFLOCAL;
device.remote_opts.remote_host_opts.remote_host = g_strdup(capture_opts->default_options.remote_host);
device.remote_opts.remote_host_opts.remote_port = g_strdup(capture_opts->default_options.remote_port);
device.remote_opts.remote_host_opts.auth_type = capture_opts->default_options.auth_type;
device.remote_opts.remote_host_opts.auth_username = g_strdup(capture_opts->default_options.auth_username);
device.remote_opts.remote_host_opts.auth_password = g_strdup(capture_opts->default_options.auth_password);
device.remote_opts.remote_host_opts.datatx_udp = capture_opts->default_options.datatx_udp;
device.remote_opts.remote_host_opts.nocap_rpcap = capture_opts->default_options.nocap_rpcap;
device.remote_opts.remote_host_opts.nocap_local = capture_opts->default_options.nocap_local;
#endif
#ifdef HAVE_PCAP_SETSAMPLING
device.remote_opts.sampling_method = capture_opts->default_options.sampling_method;
device.remote_opts.sampling_param = capture_opts->default_options.sampling_param;
#endif
linktype_count = 0;
device.links = NULL;