Skip to content

Commit

Permalink
[IPV6]: Fix ECN bug on big-endian
Browse files Browse the repository at this point in the history
__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>
  • Loading branch information
Al Viro authored and David S. Miller committed Nov 5, 2006
1 parent 02e6037 commit 95026cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/net/inet_ecn.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 95026cd

Please sign in to comment.