diff options
author | bz <bz@FreeBSD.org> | 2009-03-01 11:01:00 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2009-03-01 11:01:00 +0000 |
commit | 4321e2a8f43a9472c2ddab0fcf52583043b5eec9 (patch) | |
tree | 883508340a2afa9948df48f217e0c5df75e44d4c /sys/netipsec | |
parent | 09ea36e39bdb3780880351eb02b6ebba2bdedff2 (diff) | |
download | FreeBSD-src-4321e2a8f43a9472c2ddab0fcf52583043b5eec9.zip FreeBSD-src-4321e2a8f43a9472c2ddab0fcf52583043b5eec9.tar.gz |
Add size-guards evaluated at compile-time to the main struct vnet_*
which are not in a module of their own like gif.
Single kernel compiles and universe will fail if the size of the struct
changes. Th expected values are given in sys/vimage.h.
See the comments where how to handle this.
Requested by: peter
Diffstat (limited to 'sys/netipsec')
-rw-r--r-- | sys/netipsec/vipsec.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netipsec/vipsec.h b/sys/netipsec/vipsec.h index 472a336..2bc38cb 100644 --- a/sys/netipsec/vipsec.h +++ b/sys/netipsec/vipsec.h @@ -107,6 +107,9 @@ struct vnet_ipsec { LIST_HEAD(, secspacq) _spacqtree; }; +/* Size guard. See sys/vimage.h. */ +VIMAGE_CTASSERT(SIZEOF_vnet_ipsec, sizeof(struct vnet_ipsec)); + #ifndef VIMAGE #ifndef VIMAGE_GLOBALS extern struct vnet_ipsec vnet_ipsec_0; |