PERFORCE change 137406 for review
Robert Watson
rwatson at FreeBSD.org
Tue Mar 11 15:09:01 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=137406
Change 137406 by rwatson at rwatson_cinnamon on 2008/03/11 15:08:32
Embed the size of struct xbpf_d in the structure so that userspace
can check that the run-time version is the same as the
compile-time version.
Affected files ...
.. //depot/projects/zcopybpf/src/sys/net/bpf.c#49 edit
.. //depot/projects/zcopybpf/src/sys/net/bpfdesc.h#10 edit
Differences ...
==== //depot/projects/zcopybpf/src/sys/net/bpf.c#49 (text+ko) ====
@@ -1959,6 +1959,7 @@
bzero(d, sizeof(*d));
BPFD_LOCK_ASSERT(bd);
+ d->bd_structsize = sizeof(*d);
d->bd_immediate = bd->bd_immediate;
d->bd_promisc = bd->bd_promisc;
d->bd_hdrcmplt = bd->bd_hdrcmplt;
==== //depot/projects/zcopybpf/src/sys/net/bpfdesc.h#10 (text+ko) ====
@@ -114,6 +114,7 @@
* External representation of the bpf descriptor
*/
struct xbpf_d {
+ u_int bd_structsize; /* Size of this structure. */
u_char bd_promisc;
u_char bd_immediate;
int bd_hdrcmplt;
More information about the p4-projects
mailing list