diff options
author | Florent Fourcot <florent.fourcot@enst-bretagne.fr> | 2015-05-16 01:24:59 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-18 06:41:59 +0300 |
commit | 21858cd02dabcf290564cbf4769b101eba54d7bb (patch) | |
tree | 2e50c7f275cd0f7ff24673bd6335da5152b1d7c2 /net/ipv4/tcp_minisocks.c | |
parent | ed2a80ab7b76f11af0b2c6255709c4ebf164b667 (diff) | |
download | linux-21858cd02dabcf290564cbf4769b101eba54d7bb.tar.xz |
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 <eric.dumazet@gmail.com>
Signed-off-by: Florent Fourcot <florent.fourcot@enst-bretagne.fr>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_minisocks.c')
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index e5d7649136fc..b5732a54f2ad 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -300,7 +300,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo) tw->tw_v6_daddr = sk->sk_v6_daddr; tw->tw_v6_rcv_saddr = sk->sk_v6_rcv_saddr; tw->tw_tclass = np->tclass; - tw->tw_flowlabel = np->flow_label >> 12; + tw->tw_flowlabel = be32_to_cpu(np->flow_label & IPV6_FLOWLABEL_MASK); tw->tw_ipv6only = sk->sk_ipv6only; } #endif |