summaryrefslogtreecommitdiff
path: root/include/net/inet_timewait_sock.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-06-09 03:58:51 +0300
committerDavid S. Miller <davem@davemloft.net>2019-06-10 06:10:19 +0300
commitc67b85558ff20cb1ff20874461d12af456bee5d0 (patch)
tree74fbc1da8b19b683614d91c512a4a73c04a873a9 /include/net/inet_timewait_sock.h
parent6566cd3690c19759b57757b171e9d605bd38432b (diff)
downloadlinux-c67b85558ff20cb1ff20874461d12af456bee5d0.tar.xz
ipv6: tcp: send consistent autoflowlabel in TIME_WAIT state
In case autoflowlabel is in action, skb_get_hash_flowi6() derives a non zero skb->hash to the flowlabel. If skb->hash is zero, a flow dissection is performed. Since all TCP skbs sent from ESTABLISH state inherit their skb->hash from sk->sk_txhash, we better keep a copy of sk->sk_txhash into the TIME_WAIT socket. After this patch, ACK or RST packets sent on behalf of a TIME_WAIT socket have the flowlabel that was previously used by the flow. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_timewait_sock.h')
-rw-r--r--include/net/inet_timewait_sock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index c2f756aedc54..aef38c140014 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -70,6 +70,7 @@ struct inet_timewait_sock {
tw_flowlabel : 20,
tw_pad : 2, /* 2 bits hole */
tw_tos : 8;
+ u32 tw_txhash;
struct timer_list tw_timer;
struct inet_bind_bucket *tw_tb;
};