diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2013-01-16 22:10:57 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-16 22:12:36 -0500 |
commit | 07f623d3b278abe88508c1c59d7c1089b4a56789 (patch) | |
tree | 6434cfeda221b05ca22bca8e1994841a667ce277 /include/net | |
parent | 9fba0812c15e531c3ff1752174f04234b7a55fc4 (diff) |
ipv6: Fix endianess warning in ip6_flow_hdr().
Commit 3e4e4c1f ("ipv6: Introduce ip6_flow_hdr() to fill version,
tclass and flowlabel.) uses ntohl(), which should be htonl().
Found by Fengguang Wu <fengguang.wu@intel.com>.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/ipv6.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index dfc1363a97b5..a0909c79374b 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -629,7 +629,7 @@ extern void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt); | |||
629 | static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass, | 629 | static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass, |
630 | __be32 flowlabel) | 630 | __be32 flowlabel) |
631 | { | 631 | { |
632 | *(__be32 *)hdr = ntohl(0x60000000 | (tclass << 20)) | flowlabel; | 632 | *(__be32 *)hdr = htonl(0x60000000 | (tclass << 20)) | flowlabel; |
633 | } | 633 | } |
634 | 634 | ||
635 | static inline __be32 ip6_flowinfo(const struct ipv6hdr *hdr) | 635 | static inline __be32 ip6_flowinfo(const struct ipv6hdr *hdr) |