aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 5bb809f12ba1..6988566dc72f 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -421,7 +421,8 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
421 421
422 switch (type) { 422 switch (type) {
423 case ICMP_REDIRECT: 423 case ICMP_REDIRECT:
424 do_redirect(icmp_skb, sk); 424 if (!sock_owned_by_user(sk))
425 do_redirect(icmp_skb, sk);
425 goto out; 426 goto out;
426 case ICMP_SOURCE_QUENCH: 427 case ICMP_SOURCE_QUENCH:
427 /* Just silently ignore these. */ 428 /* Just silently ignore these. */