diff options
Diffstat (limited to 'cucumber/features/support/helpers/sniffing_helper.rb')
-rw-r--r-- | cucumber/features/support/helpers/sniffing_helper.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/cucumber/features/support/helpers/sniffing_helper.rb b/cucumber/features/support/helpers/sniffing_helper.rb index 213411eb..38b13820 100644 --- a/cucumber/features/support/helpers/sniffing_helper.rb +++ b/cucumber/features/support/helpers/sniffing_helper.rb @@ -22,8 +22,18 @@ class Sniffer end def capture(filter="not ether src host #{@vmnet.bridge_mac} and not ether proto \\arp and not ether proto \\rarp") - job = IO.popen(["/usr/sbin/tcpdump", "-n", "-i", @vmnet.bridge_name, "-w", - @pcap_file, "-U", filter, :err => ["/dev/null", "w"]]) + job = IO.popen( + [ + "/usr/sbin/tcpdump", + "-n", + "-U", + "--immediate-mode", + "-i", @vmnet.bridge_name, + "-w", @pcap_file, + filter, + :err => ["/dev/null", "w"] + ] + ) @pid = job.pid end |