diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-14 02:33:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-14 02:33:52 -0400 |
commit | 7cd636fe9ce5de0051c11283911baca4291868c8 (patch) | |
tree | 1e914ceedffbc982af0afe207e6d7243d4bf922f /include/linux/ipv6.h | |
parent | b45e9189c058bfa495073951ff461ee0eea968be (diff) |
[IPV6]: IPv6 extension header structures need to be packed.
struct ipv6_opt_hdr is the common structure for IPv6 extension
headers, and it is common to increment the pointer to get
the real content. On the other hand, since the structure
consists only of 1-byte next-header field and 1-byte length
field, size of that structure depends on architecture; 2 or 4.
Add "packed" attribute to get 2.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ipv6.h')
-rw-r--r-- | include/linux/ipv6.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 4aaefc349a4b..134c8e5cf07c 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -53,7 +53,7 @@ struct ipv6_opt_hdr { | |||
53 | /* | 53 | /* |
54 | * TLV encoded option data follows. | 54 | * TLV encoded option data follows. |
55 | */ | 55 | */ |
56 | }; | 56 | } __attribute__ ((packed)); /* required for some archs */ |
57 | 57 | ||
58 | #define ipv6_destopt_hdr ipv6_opt_hdr | 58 | #define ipv6_destopt_hdr ipv6_opt_hdr |
59 | #define ipv6_hopopt_hdr ipv6_opt_hdr | 59 | #define ipv6_hopopt_hdr ipv6_opt_hdr |