From: Al Viro Date: Fri, 3 Nov 2006 08:55:35 +0000 (-0800) Subject: [IPV6]: Fix ECN bug on big-endian X-Git-Tag: v2.6.19-rc5~19^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95026cd242bd4188a036f2eba20994113ed5a5d7;p=linux-2.6 [IPV6]: Fix ECN bug on big-endian __constant_htons(2<<4) is not a replacement for htonl(2<<20). Signed-off-by: Al Viro Signed-off-by: David S. Miller --- diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index d599c6bfbb..7849844a49 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h @@ -48,7 +48,7 @@ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner) #define IP6_ECN_flow_xmit(sk, label) do { \ if (INET_ECN_is_capable(inet_sk(sk)->tos)) \ - (label) |= __constant_htons(INET_ECN_ECT_0 << 4); \ + (label) |= htonl(INET_ECN_ECT_0 << 20); \ } while (0) static inline int IP_ECN_set_ce(struct iphdr *iph)