misc/58529: Patch for RDWR bpf in pcap.

Jason Slagle jslagle at mail.tacorp.net
Sat Oct 25 10:10:19 PDT 2003


>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:


More information about the freebsd-bugs mailing list