diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-11-11 04:45:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-11-11 04:45:45 +0000 |
commit | 0edee7c82a646eb1d7b12e367f4d6a88155cdb1f (patch) | |
tree | 134abc0ea1115a41f40c60be5ebc97b175f55de7 /sys/netinet6 | |
parent | bb5d4d008b587d397c24d694cb8bc771520a7046 (diff) |
align ifaliasreq.ifra_addr similar to the way that ifreq is fixed --
a gruesome union, to block the compiler from placing the struct
incorrectly aligned on stack frames
ok guenther
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6_var.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 55f85009a71..add70ba7733 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_var.h,v 1.34 2011/10/13 18:23:40 claudio Exp $ */ +/* $OpenBSD: in6_var.h,v 1.35 2012/11/11 04:45:44 deraadt Exp $ */ /* $KAME: in6_var.h,v 1.55 2001/02/16 12:49:45 itojun Exp $ */ /* @@ -258,7 +258,13 @@ struct in6_ifreq { struct in6_aliasreq { char ifra_name[IFNAMSIZ]; - struct sockaddr_in6 ifra_addr; + union { + struct sockaddr_in6 ifrau_addr; + int ifrau_align; + } ifra_ifrau; +#ifndef ifra_addr +#define ifra_addr ifra_ifrau.ifrau_addr +#endif struct sockaddr_in6 ifra_dstaddr; struct sockaddr_in6 ifra_prefixmask; int ifra_flags; |