]> The Tcpdump Group git mirrors - libpcap/commitdiff
Treat a max_packets value of 0 the same way that we treat a max_packets
authorguy <guy>
Sat, 2 Feb 2008 20:57:04 +0000 (20:57 +0000)
committerguy <guy>
Sat, 2 Feb 2008 20:57:04 +0000 (20:57 +0000)
value of -1.

pcap-linux.c

index 3d9472643d89e016dc18ad1f974b9855ec5b19fe..942dca3f7c19347d94db86fe9c6ee011b9993e98 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.129.2.5 2008-01-24 20:21:34 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.129.2.6 2008-02-02 20:57:04 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -1803,9 +1803,9 @@ pcap_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback,
                } while (ret < 0);
        }
 
-       /* negative values of max_packets are used to require all 
-        * packets available in the ring */
-       while ((pkts < max_packets) || (max_packets <0)) {
+       /* non-positive values of max_packets are used to require all 
+        * packets currently available in the ring */
+       while ((pkts < max_packets) || (max_packets <0)) {
                int run_bpf;
                struct sockaddr_ll *sll;
                struct pcap_pkthdr pcaphdr;