aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
authorFlorent Fourcot <[email protected]>2015-05-15 22:24:59 +0000
committerDavid S. Miller <[email protected]>2015-05-18 03:41:59 +0000
commit21858cd02dabcf290564cbf4769b101eba54d7bb (patch)
tree2e50c7f275cd0f7ff24673bd6335da5152b1d7c2 /net/ipv6/tcp_ipv6.c
parentrtnl/bond: don't send rtnl msg for unregistered iface (diff)
downloadkernel-21858cd02dabcf290564cbf4769b101eba54d7bb.tar.gz
kernel-21858cd02dabcf290564cbf4769b101eba54d7bb.zip
tcp/ipv6: fix flow label setting in TIME_WAIT state
commit 1d13a96c74fc ("ipv6: tcp: fix flowlabel value in ACK messages send from TIME_WAIT") added the flow label in the last TCP packets. Unfortunately, it was not casted properly. This patch replace the buggy shift with be32_to_cpu/cpu_to_be32. Fixes: 1d13a96c74fc ("ipv6: tcp: fix flowlabel value in ACK messages") Reported-by: Eric Dumazet <[email protected]> Signed-off-by: Florent Fourcot <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index b6575d665568..3adffb300238 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -914,7 +914,7 @@ static void tcp_v6_timewait_ack(struct sock *sk, struct sk_buff *skb)
tcptw->tw_rcv_wnd >> tw->tw_rcv_wscale,
tcp_time_stamp + tcptw->tw_ts_offset,
tcptw->tw_ts_recent, tw->tw_bound_dev_if, tcp_twsk_md5_key(tcptw),
- tw->tw_tclass, (tw->tw_flowlabel << 12));
+ tw->tw_tclass, cpu_to_be32(tw->tw_flowlabel));
inet_twsk_put(tw);
}