Snort mailing list archives

Re: [tcpdump-workers] Problem found for linux applications that use libpcap


From: Guy Harris <gharris () sonic net>
Date: Sat, 8 Dec 2001 19:40:13 -0800

On Sat, Dec 08, 2001 at 02:45:32PM -0700, Phil Wood wrote:
--- pcap-linux.c-2001.12.08   Sat Dec  8 20:22:32 2001
+++ pcap-linux.c      Sat Dec  8 21:05:23 2001
@@ -626,17 +626,45 @@
 pcap_stats(pcap_t *handle, struct pcap_stat *stats)
 {
 #ifdef HAVE_TPACKET_STATS
+    if (handle->fd > -1)
+    {

When would "handle->fd" be -1?  If "pcap_open_live()" fails to open a
socket, it'll return NULL, so the caller won't have a handle; if it
succeeds in opening the socket, it'll set "handle->fd" to that socket.

_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users


Current thread: