diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-11-03 21:38:53 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-11-03 21:38:53 +0000 |
commit | 32d411be1d003e70becb211bef09e2b8f23e5717 (patch) | |
tree | e711aced7655297f48446e856aca63b8f140f032 /dumpcap.c | |
parent | c0dd6c4ca979f3308e9082700aa257a5941f02a2 (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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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" |