diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2017-04-03 01:06:59 -0400 | 
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-04-03 01:06:59 -0400 | 
| commit | a8e28440016bfb23bec266c4c66eacca6ea2d48b (patch) | |
| tree | 27d528294f7886c434c8072a034d211acc06d077 /net/ipv4/tcp_ipv4.c | |
| parent | 2b5efc089769cd2aa583880d29416d00e7441f39 (diff) | |
| parent | 3209f68b3ca4667069923a325c88b21131bfdf9f (diff) | |
Merge branch 'work.statx' into for-next
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
| -rw-r--r-- | net/ipv4/tcp_ipv4.c | 10 | 
1 files changed, 7 insertions, 3 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 9a89b8deafae..575e19dcc017 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -279,10 +279,13 @@ EXPORT_SYMBOL(tcp_v4_connect);   */  void tcp_v4_mtu_reduced(struct sock *sk)  { -	struct dst_entry *dst;  	struct inet_sock *inet = inet_sk(sk); -	u32 mtu = tcp_sk(sk)->mtu_info; +	struct dst_entry *dst; +	u32 mtu; +	if ((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE)) +		return; +	mtu = tcp_sk(sk)->mtu_info;  	dst = inet_csk_update_pmtu(sk, mtu);  	if (!dst)  		return; @@ -428,7 +431,8 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)  	switch (type) {  	case ICMP_REDIRECT: -		do_redirect(icmp_skb, sk); +		if (!sock_owned_by_user(sk)) +			do_redirect(icmp_skb, sk);  		goto out;  	case ICMP_SOURCE_QUENCH:  		/* Just silently ignore these. */  | 
