提交 7cd636fe 编写于 作者: Y YOSHIFUJI Hideaki 提交者: David S. Miller

[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: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b45e9189
...@@ -53,7 +53,7 @@ struct ipv6_opt_hdr { ...@@ -53,7 +53,7 @@ struct ipv6_opt_hdr {
/* /*
* TLV encoded option data follows. * TLV encoded option data follows.
*/ */
}; } __attribute__ ((packed)); /* required for some archs */
#define ipv6_destopt_hdr ipv6_opt_hdr #define ipv6_destopt_hdr ipv6_opt_hdr
#define ipv6_hopopt_hdr ipv6_opt_hdr #define ipv6_hopopt_hdr ipv6_opt_hdr
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册