cvs commit: src/sys/net bpf.h

Sam Leffler sam at errno.com
Sat Jun 3 15:06:35 UTC 2006


Christian S.J. Peron wrote:
> csjp        2006-06-03 06:37:00 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/net              bpf.h 
>   Log:
>   Make sure we don't try to dereference the the if_bpf pointer when bpf has
>   not been compiled into the the kernel.
>   
>   Submitted by:   benno

Another option that avoids #ifdef's in bpf.h is to point all if_bpf's at
a static structure that's initialized s.t. the list pointer is null.
OTOH if we embed the data structure in the ifnet then in the no bpf
config case the stub bpfattach code would just initialize the list head
and again there'd be no issue.

I think we can actually make bpf a loadable module now that bpf_if is
exposed; I'll look at that.  That should eliminate all these hacks we've
been carrying around.

	Sam


More information about the cvs-src mailing list