diff options
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 1ed230716d51..70b09ef2463b 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -369,11 +369,10 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info) | |||
369 | * We do take care of PMTU discovery (RFC1191) special case : | 369 | * We do take care of PMTU discovery (RFC1191) special case : |
370 | * we can receive locally generated ICMP messages while socket is held. | 370 | * we can receive locally generated ICMP messages while socket is held. |
371 | */ | 371 | */ |
372 | if (sock_owned_by_user(sk) && | 372 | if (sock_owned_by_user(sk)) { |
373 | type != ICMP_DEST_UNREACH && | 373 | if (!(type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED)) |
374 | code != ICMP_FRAG_NEEDED) | 374 | NET_INC_STATS_BH(net, LINUX_MIB_LOCKDROPPEDICMPS); |
375 | NET_INC_STATS_BH(net, LINUX_MIB_LOCKDROPPEDICMPS); | 375 | } |
376 | |||
377 | if (sk->sk_state == TCP_CLOSE) | 376 | if (sk->sk_state == TCP_CLOSE) |
378 | goto out; | 377 | goto out; |
379 | 378 | ||
@@ -1767,10 +1766,8 @@ exit: | |||
1767 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS); | 1766 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS); |
1768 | return NULL; | 1767 | return NULL; |
1769 | put_and_exit: | 1768 | put_and_exit: |
1770 | tcp_clear_xmit_timers(newsk); | 1769 | inet_csk_prepare_forced_close(newsk); |
1771 | tcp_cleanup_congestion_control(newsk); | 1770 | tcp_done(newsk); |
1772 | bh_unlock_sock(newsk); | ||
1773 | sock_put(newsk); | ||
1774 | goto exit; | 1771 | goto exit; |
1775 | } | 1772 | } |
1776 | EXPORT_SYMBOL(tcp_v4_syn_recv_sock); | 1773 | EXPORT_SYMBOL(tcp_v4_syn_recv_sock); |