diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
| -rw-r--r-- | net/ipv4/tcp_input.c | 13 | 
1 files changed, 5 insertions, 8 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index a759e19496d..3bd55bad230 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -2059,11 +2059,8 @@ void tcp_enter_loss(struct sock *sk, int how)  	if (tcp_is_reno(tp))  		tcp_reset_reno_sack(tp); -	if (!how) { -		/* Push undo marker, if it was plain RTO and nothing -		 * was retransmitted. */ -		tp->undo_marker = tp->snd_una; -	} else { +	tp->undo_marker = tp->snd_una; +	if (how) {  		tp->sacked_out = 0;  		tp->fackets_out = 0;  	} @@ -5485,6 +5482,9 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,  				if (tcp_checksum_complete_user(sk, skb))  					goto csum_error; +				if ((int)skb->truesize > sk->sk_forward_alloc) +					goto step5; +  				/* Predicted packet is in window by definition.  				 * seq == rcv_nxt and rcv_wup <= rcv_nxt.  				 * Hence, check seq<=rcv_wup reduces to: @@ -5496,9 +5496,6 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,  				tcp_rcv_rtt_measure_ts(sk, skb); -				if ((int)skb->truesize > sk->sk_forward_alloc) -					goto step5; -  				NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPHPHITS);  				/* Bulk data transfer: receiver */  |