From owner-freebsd-net Fri Mar 26 11:22:52 1999 Delivered-To: freebsd-net@freebsd.org Received: from ryouko.nas.nasa.gov (ryouko.nas.nasa.gov [129.99.34.113]) by hub.freebsd.org (Postfix) with ESMTP id BB09014D75 for ; Fri, 26 Mar 1999 11:22:46 -0800 (PST) (envelope-from greg@ryouko.nas.nasa.gov) Received: from ryouko.nas.nasa.gov (localhost [127.0.0.1]) by ryouko.nas.nasa.gov (8.8.7/NAS8.8.7n) with ESMTP id LAA16350; Fri, 26 Mar 1999 11:22:09 -0800 (PST) Message-Id: <199903261922.LAA16350@ryouko.nas.nasa.gov> To: Archie Cobbs Cc: cmsedore@maxwell.syr.edu (Christopher Sedore), freebsd-net@FreeBSD.ORG Subject: Re: bpf bug? In-reply-to: Your message of "Fri, 26 Mar 1999 10:19:22 PST." <199903261819.KAA86181@bubba.whistle.com> Date: Fri, 26 Mar 1999 11:22:09 -0800 From: "Gregory P. Smith" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Christopher Sedore writes: > > I noticed today that when sending a packet through the bpf interface, > > the kernel silently resets the ethernet source MAC to the MAC of the > > network card doing the send. My impression was that bpf writes should > > go direct to the interface without any edits in the kernel--am I wrong > > on this? > > My opinion on this is that yes it's a bug. However, it's not so > easy to fix, because other parts of the kernel surely rely on > this behavior. To fix it would probably require a new argument > to if_output() (or whatever it's called) or perhaps a new mbuf flag. > I suggest you file a PR and see what comes back :-) I made a patch for NetBSD 1.3 about a year ago that allowed you to stop this behavior using an ioctl as follows on your bpf file descriptor: ioctl(fd, BIOCSHDRCMPLT, (caddr_t) & one) I believe it got checked into the main NetBSD source tree by (thorpej@nas.nasa.gov) but if you don't see it there let me know and I'll can send the patch which shouldn't be too hard to fit into FreeBSD. Greg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message