diff options
author | Julian Anastasov <ja@ssi.bg> | 2017-02-06 23:14:14 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-07 13:07:46 -0500 |
commit | c3a2e8370534f810cac6050169db0ed3e0f94f0b (patch) | |
tree | e7d955ab2ffde6bb88cf6b3c69ea41a4841e6d9f /net/ipv4/tcp_metrics.c | |
parent | c86a773c78025f5b825bacd7b846f4fa60dc0317 (diff) | |
download | linux-stable-c3a2e8370534f810cac6050169db0ed3e0f94f0b.tar.gz linux-stable-c3a2e8370534f810cac6050169db0ed3e0f94f0b.tar.bz2 linux-stable-c3a2e8370534f810cac6050169db0ed3e0f94f0b.zip |
tcp: replace dst_confirm with sk_dst_confirm
When same struct dst_entry can be used for many different
neighbours we can not use it for pending confirmations.
Use the new sk_dst_confirm() helper to propagate the
indication from received packets to sock_confirm_neigh().
Reported-by: YueHaibing <yuehaibing@huawei.com>
Fixes: 5110effee8fd ("net: Do delayed neigh confirmation.")
Fixes: f2bb4bedf35d ("ipv4: Cache output routes in fib_info nexthops.")
Tested-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_metrics.c')
-rw-r--r-- | net/ipv4/tcp_metrics.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c index b9ed0d50aead..0f46e5fe31ad 100644 --- a/net/ipv4/tcp_metrics.c +++ b/net/ipv4/tcp_metrics.c @@ -375,12 +375,10 @@ void tcp_update_metrics(struct sock *sk) u32 val; int m; + sk_dst_confirm(sk); if (sysctl_tcp_nometrics_save || !dst) return; - if (dst->flags & DST_HOST) - dst_confirm(dst); - rcu_read_lock(); if (icsk->icsk_backoff || !tp->srtt_us) { /* This session failed to estimate rtt. Why? @@ -493,11 +491,10 @@ void tcp_init_metrics(struct sock *sk) struct tcp_metrics_block *tm; u32 val, crtt = 0; /* cached RTT scaled by 8 */ + sk_dst_confirm(sk); if (!dst) goto reset; - dst_confirm(dst); - rcu_read_lock(); tm = tcp_get_metrics(sk, dst, true); if (!tm) { |