mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
net: tcp: make the txhash available in TIME_WAIT sockets for IPv4 too
Commit c67b85558f
("ipv6: tcp: send consistent autoflowlabel in
TIME_WAIT state") made the socket txhash also available in TIME_WAIT
sockets but for IPv6 only. Make it available for IPv4 too as we'll use
it in later commits.
Signed-off-by: Antoine Tenart <atenart@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
committed by
Paolo Abeni
parent
ae4899bb48
commit
4fbfde4e27
@@ -303,6 +303,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
|
|||||||
tcptw->tw_ts_offset = tp->tsoffset;
|
tcptw->tw_ts_offset = tp->tsoffset;
|
||||||
tcptw->tw_last_oow_ack_time = 0;
|
tcptw->tw_last_oow_ack_time = 0;
|
||||||
tcptw->tw_tx_delay = tp->tcp_tx_delay;
|
tcptw->tw_tx_delay = tp->tcp_tx_delay;
|
||||||
|
tw->tw_txhash = sk->sk_txhash;
|
||||||
#if IS_ENABLED(CONFIG_IPV6)
|
#if IS_ENABLED(CONFIG_IPV6)
|
||||||
if (tw->tw_family == PF_INET6) {
|
if (tw->tw_family == PF_INET6) {
|
||||||
struct ipv6_pinfo *np = inet6_sk(sk);
|
struct ipv6_pinfo *np = inet6_sk(sk);
|
||||||
@@ -311,7 +312,6 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
|
|||||||
tw->tw_v6_rcv_saddr = sk->sk_v6_rcv_saddr;
|
tw->tw_v6_rcv_saddr = sk->sk_v6_rcv_saddr;
|
||||||
tw->tw_tclass = np->tclass;
|
tw->tw_tclass = np->tclass;
|
||||||
tw->tw_flowlabel = be32_to_cpu(np->flow_label & IPV6_FLOWLABEL_MASK);
|
tw->tw_flowlabel = be32_to_cpu(np->flow_label & IPV6_FLOWLABEL_MASK);
|
||||||
tw->tw_txhash = sk->sk_txhash;
|
|
||||||
tw->tw_ipv6only = sk->sk_ipv6only;
|
tw->tw_ipv6only = sk->sk_ipv6only;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user