]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[IPV6]: Fix ECN bug on big-endian
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 3 Nov 2006 08:55:35 +0000 (00:55 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 5 Nov 2006 22:11:26 +0000 (14:11 -0800)
__constant_htons(2<<4) is not a replacement for
htonl(2<<20).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_ecn.h

index d599c6bfbb86bc5eb0e83f91f9f7fb417d4631f2..7849844a4911e2d1369deea46cfc87943ec0e89a 100644 (file)
@@ -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)