aboutsummaryrefslogtreecommitdiffstats
path: root/dumpcap.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-11-03 21:38:53 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-11-03 21:38:53 +0000
commit32d411be1d003e70becb211bef09e2b8f23e5717 (patch)
treee711aced7655297f48446e856aca63b8f140f032 /dumpcap.c
parentc0dd6c4ca979f3308e9082700aa257a5941f02a2 (diff)
Do not set buffer size for remote interfaces or when using default value.
Do not get link-layer for remote interfaces. svn path=/trunk/; revision=26683
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dumpcap.c b/dumpcap.c
index 3cfeeab994..1915c998b4 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -1228,7 +1228,8 @@ capture_loop_open_input(capture_options *capture_opts, loop_data *ld,
/* we've opened "iface" as a network device */
#ifdef _WIN32
/* try to set the capture buffer size */
- if (pcap_setbuff(ld->pcap_h, capture_opts->buffer_size * 1024 * 1024) != 0) {
+ if (capture_opts->buffer_size > 1 &&
+ pcap_setbuff(ld->pcap_h, capture_opts->buffer_size * 1024 * 1024) != 0) {
sync_secondary_msg_str = g_strdup_printf(
"The capture buffer size of %luMB seems to be too high for your machine,\n"
"the default of 1MB will be used.\n"