aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 667396536feb..b2e61a0e8d0a 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -375,10 +375,12 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
375 np = inet6_sk(sk); 375 np = inet6_sk(sk);
376 376
377 if (type == NDISC_REDIRECT) { 377 if (type == NDISC_REDIRECT) {
378 struct dst_entry *dst = __sk_dst_check(sk, np->dst_cookie); 378 if (!sock_owned_by_user(sk)) {
379 struct dst_entry *dst = __sk_dst_check(sk, np->dst_cookie);
379 380
380 if (dst) 381 if (dst)
381 dst->ops->redirect(dst, sk, skb); 382 dst->ops->redirect(dst, sk, skb);
383 }
382 goto out; 384 goto out;
383 } 385 }
384 386