Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Mar 1999 11:22:09 -0800
From:      "Gregory P. Smith" <greg@nas.nasa.gov>
To:        Archie Cobbs <archie@whistle.com>
Cc:        cmsedore@maxwell.syr.edu (Christopher Sedore), freebsd-net@FreeBSD.ORG
Subject:   Re: bpf bug? 
Message-ID:  <199903261922.LAA16350@ryouko.nas.nasa.gov>
In-Reply-To: Your message of "Fri, 26 Mar 1999 10:19:22 PST." <199903261819.KAA86181@bubba.whistle.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

> 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




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