From jslagle@mail.tacorp.net  Sat Oct 25 10:01:50 2003
Return-Path: <jslagle@mail.tacorp.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8737516A4B3
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 25 Oct 2003 10:01:50 -0700 (PDT)
Received: from mail.tacorp.net (mail.tacorp.net [208.20.58.199])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B8F9643F3F
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 25 Oct 2003 10:01:49 -0700 (PDT)
	(envelope-from jslagle@mail.tacorp.net)
Received: from mail.tacorp.net (jslagle@localhost [127.0.0.1])
	by mail.tacorp.net (8.12.9/8.12.9) with ESMTP id h9PH7VfQ001443
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 25 Oct 2003 13:07:31 -0400 (EDT)
	(envelope-from jslagle@mail.tacorp.net)
Received: (from jslagle@localhost)
	by mail.tacorp.net (8.12.9/8.12.9/Submit) id h9PH7VG8001442;
	Sat, 25 Oct 2003 13:07:31 -0400 (EDT)
Message-Id: <200310251707.h9PH7VG8001442@mail.tacorp.net>
Date: Sat, 25 Oct 2003 13:07:31 -0400 (EDT)
From: Jason Slagle <jslagle@mail.tacorp.net>
Reply-To: Jason Slagle <jslagle@mail.tacorp.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Patch for RDWR bpf in pcap.	
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         58529
>Category:       kern
>Synopsis:       [libpcap] [patch] RDWR bpf in pcap.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    dwmalone
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 25 10:10:17 PDT 2003
>Closed-Date:    Tue Feb 24 17:01:18 UTC 2009
>Last-Modified:  Tue Feb 24 17:01:18 UTC 2009
>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:
State-Changed-From-To: open->feedback 
State-Changed-By: kris 
State-Changed-When: Thu Oct 30 01:09:05 PST 2003 
State-Changed-Why:  
Feedback requested 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58529 

From: Kris Kennaway <kris@obsecurity.org>
To: Jason Slagle <jslagle@mail.tacorp.net>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: misc/58529: Patch for RDWR bpf in pcap.
Date: Thu, 30 Oct 2003 01:08:43 -0800

 --+pHx0qQiF2pBVqBT
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Sat, Oct 25, 2003 at 01:07:31PM -0400, Jason Slagle wrote:
 
 > >Description:
 > FreeBSD does not open BPF socket R/W
 
 Please explain why you think it should.
 
 Thanks,
 Kris
 
 --+pHx0qQiF2pBVqBT
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.3 (FreeBSD)
 
 iD8DBQE/oNUaWry0BWjoQKURAul3AKCaysmUPfIv9j3B1YgVGpsBVtstIACgpq1l
 oYzYh1CpgVhFbq6yIxE/9aw=
 =g7cq
 -----END PGP SIGNATURE-----
 
 --+pHx0qQiF2pBVqBT--

From: Jason Slagle <jslagle@tacorp.net>
To: Kris Kennaway <kris@obsecurity.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: misc/58529: Patch for RDWR bpf in pcap.
Date: Thu, 30 Oct 2003 09:53:41 -0500 (EST)

 There are some machine simulators which rely on the fact they can write to
 the socket to send data.  One of which is simh.
 
 NetBSD and Linux both have since made it writeable, so I'm not sure theres
 a downside to doing so.
 
 Jason
 
 On Thu, 30 Oct 2003, Kris Kennaway wrote:
 
 > On Sat, Oct 25, 2003 at 01:07:31PM -0400, Jason Slagle wrote:
 >
 > > >Description:
 > > FreeBSD does not open BPF socket R/W
 >
 > Please explain why you think it should.
 >
 > Thanks,
 > Kris
 >
Responsible-Changed-From-To: freebsd-bugs->dwmalone 
Responsible-Changed-By: dwmalone 
Responsible-Changed-When: Sun May 30 09:53:33 PDT 2004 
Responsible-Changed-Why:  
I've made this change on several machines before, and it seems 
harmless. I'll see if I can commit it. 

David. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58529 
State-Changed-From-To: feedback->suspended 
State-Changed-By: linimon 
State-Changed-When: Sat Mar 1 20:14:50 UTC 2008 
State-Changed-Why:  
It seems as though feedback was received quite some time ago.  Mark this as 
suspended since it does not seem as though this is being actively worked on. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58529 
State-Changed-From-To: suspended->closed 
State-Changed-By: bms 
State-Changed-When: Tue 24 Feb 2009 17:01:03 UTC 
State-Changed-Why:  
libpcap in base has opened bpf r/w for some time now 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58529 
>Unformatted:
