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.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index efc6fef692ff..277d71239d75 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -536,12 +536,15 @@ int tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
536 if (sock_owned_by_user(sk)) 536 if (sock_owned_by_user(sk))
537 break; 537 break;
538 538
539 skb = tcp_rtx_queue_head(sk);
540 if (WARN_ON_ONCE(!skb))
541 break;
542
539 icsk->icsk_backoff--; 543 icsk->icsk_backoff--;
540 icsk->icsk_rto = tp->srtt_us ? __tcp_set_rto(tp) : 544 icsk->icsk_rto = tp->srtt_us ? __tcp_set_rto(tp) :
541 TCP_TIMEOUT_INIT; 545 TCP_TIMEOUT_INIT;
542 icsk->icsk_rto = inet_csk_rto_backoff(icsk, TCP_RTO_MAX); 546 icsk->icsk_rto = inet_csk_rto_backoff(icsk, TCP_RTO_MAX);
543 547
544 skb = tcp_rtx_queue_head(sk);
545 548
546 tcp_mstamp_refresh(tp); 549 tcp_mstamp_refresh(tp);
547 delta_us = (u32)(tp->tcp_mstamp - tcp_skb_timestamp_us(skb)); 550 delta_us = (u32)(tp->tcp_mstamp - tcp_skb_timestamp_us(skb));
@@ -970,7 +973,7 @@ static void tcp_v4_reqsk_destructor(struct request_sock *req)
970 * We need to maintain these in the sk structure. 973 * We need to maintain these in the sk structure.
971 */ 974 */
972 975
973struct static_key tcp_md5_needed __read_mostly; 976DEFINE_STATIC_KEY_FALSE(tcp_md5_needed);
974EXPORT_SYMBOL(tcp_md5_needed); 977EXPORT_SYMBOL(tcp_md5_needed);
975 978
976/* Find the Key structure for an address. */ 979/* Find the Key structure for an address. */
@@ -1731,15 +1734,8 @@ EXPORT_SYMBOL(tcp_add_backlog);
1731int tcp_filter(struct sock *sk, struct sk_buff *skb) 1734int tcp_filter(struct sock *sk, struct sk_buff *skb)
1732{ 1735{
1733 struct tcphdr *th = (struct tcphdr *)skb->data; 1736 struct tcphdr *th = (struct tcphdr *)skb->data;
1734 unsigned int eaten = skb->len;
1735 int err;
1736 1737
1737 err = sk_filter_trim_cap(sk, skb, th->doff * 4); 1738 return sk_filter_trim_cap(sk, skb, th->doff * 4);
1738 if (!err) {
1739 eaten -= skb->len;
1740 TCP_SKB_CB(skb)->end_seq -= eaten;
1741 }
1742 return err;
1743} 1739}
1744EXPORT_SYMBOL(tcp_filter); 1740EXPORT_SYMBOL(tcp_filter);
1745 1741
@@ -2437,7 +2433,7 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i)
2437 refcount_read(&sk->sk_refcnt), sk, 2433 refcount_read(&sk->sk_refcnt), sk,
2438 jiffies_to_clock_t(icsk->icsk_rto), 2434 jiffies_to_clock_t(icsk->icsk_rto),
2439 jiffies_to_clock_t(icsk->icsk_ack.ato), 2435 jiffies_to_clock_t(icsk->icsk_ack.ato),
2440 (icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong, 2436 (icsk->icsk_ack.quick << 1) | inet_csk_in_pingpong_mode(sk),
2441 tp->snd_cwnd, 2437 tp->snd_cwnd,
2442 state == TCP_LISTEN ? 2438 state == TCP_LISTEN ?
2443 fastopenq->max_qlen : 2439 fastopenq->max_qlen :