From: Alan T. DeKok Date: Wed, 25 Jan 2012 13:44:14 +0000 (+0100) Subject: Use non-zero timeout in pcap_open_live X-Git-Tag: release_2_2_0~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4bb61eeab62d73aa0c33b4a174df20b83b66c76;p=thirdparty%2Ffreeradius-server.git Use non-zero timeout in pcap_open_live http://www.tcpdump.org/pcap.html says: to_ms is the read time out in milliseconds (a value of 0 means no time out; on at least some platforms, this means that you may wait until a sufficient number of packets arrive before seeing any packets, so you should use a non-zero timeout) Nice.. --- diff --git a/src/main/radsniff.c b/src/main/radsniff.c index c5d5db410d4..5da57c505af 100644 --- a/src/main/radsniff.c +++ b/src/main/radsniff.c @@ -527,7 +527,7 @@ int main(int argc, char *argv[]) exit(1); } else { - descr = pcap_open_live(dev, 65536, 1, 0, errbuf); + descr = pcap_open_live(dev, 65536, 1, 1, errbuf); } if (descr == NULL) {