From: YOSHIFUJI Hideaki Date: Mon, 14 Apr 2008 06:33:52 +0000 (-0700) Subject: [IPV6]: IPv6 extension header structures need to be packed. X-Git-Tag: v2.6.25~33^2~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7cd636fe9ce5de0051c11283911baca4291868c8;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: David S. Miller --- diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 4aaefc349a4..134c8e5cf07 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -53,7 +53,7 @@ struct ipv6_opt_hdr { /* * TLV encoded option data follows. */ -}; +} __attribute__ ((packed)); /* required for some archs */ #define ipv6_destopt_hdr ipv6_opt_hdr #define ipv6_hopopt_hdr ipv6_opt_hdr