From: YOSHIFUJI Hideaki Date: Thu, 17 Jan 2013 03:10:57 +0000 (+0900) Subject: ipv6: Fix endianess warning in ip6_flow_hdr(). X-Git-Tag: v3.9-rc1~139^2~352 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=07f623d3b278abe88508c1c59d7c1089b4a56789;p=platform%2Fkernel%2Flinux-stable.git 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 . Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller --- diff --git a/include/net/ipv6.h b/include/net/ipv6.h index dfc1363..a0909c7 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); static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass, __be32 flowlabel) { - *(__be32 *)hdr = ntohl(0x60000000 | (tclass << 20)) | flowlabel; + *(__be32 *)hdr = htonl(0x60000000 | (tclass << 20)) | flowlabel; } static inline __be32 ip6_flowinfo(const struct ipv6hdr *hdr)