Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Oct 2003 13:07:31 -0400 (EDT)
From:      Jason Slagle <jslagle@mail.tacorp.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   misc/58529: Patch for RDWR bpf in pcap.	
Message-ID:  <200310251707.h9PH7VG8001442@mail.tacorp.net>
Resent-Message-ID: <200310251710.h9PHAHLA049051@freefall.freebsd.org>

index | next in thread | raw e-mail


>Number:         58529
>Category:       misc
>Synopsis:       Patch for RDWR bpf in pcap.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 25 10:10:17 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jason Slagle
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD mail.tacorp.net 5.1-CURRENT FreeBSD 5.1-CURRENT #13: Mon Aug 18 20:50:49 EDT 2003 root@:/usr/obj/usr/src/sys/MAIL i386


>Description:
FreeBSD does not open BPF socket R/W
>How-To-Repeat:
>Fix:

diff -uBN pcap-bpf.c.old pcap-bpf.c
--- pcap-bpf.c.old      Sat Oct 25 11:56:32 2003
+++ pcap-bpf.c  Sat Oct 25 11:49:10 2003
@@ -185,7 +185,7 @@
         */
        do {
                (void)snprintf(device, sizeof(device), "/dev/bpf%d", n++);
-               fd = open(device, O_RDONLY);
+               fd = open(device, O_RDWR);
        } while (fd < 0 && errno == EBUSY);

        /*


>Release-Note:
>Audit-Trail:
>Unformatted:


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310251707.h9PH7VG8001442>