ipv6: Fix endianess warning in ip6_flow_hdr().
Subsystems (3)
PATCH 1/1 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 <[email protected]>.
Signed-off-by YOSHIFUJI Hideaki <[email protected]>
--- include/net/ipv6.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/ipv6.h +1 -1
@@ -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)
Signature · 1 line
1.7.9.5
From: YOSHIFUJI Hideaki <[email protected]>
Date: Thu, 17 Jan 2013 12:10:57 +0900
Quoted 6 lines
Commit
3e4e4c1f("ipv6: Introduceip6_flow_hdr()to fill version, tclass and flowlabel.) usesntohl(), which should behtonl().Found by Fengguang Wu <[email protected]>.
Signed-off-by YOSHIFUJI Hideaki <[email protected]>
Applied, thanks.