Skip to content

Commit

Permalink
[IPV6]: IPv6 extension header structures need to be packed.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Apr 14, 2008
1 parent b45e918 commit 7cd636f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7cd636f

Please sign in to comment.