diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 85627f83665f..3b76bce769dd 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1746,6 +1746,8 @@ int tcp_use_frto(struct sock *sk) | |||
1746 | return 0; | 1746 | return 0; |
1747 | 1747 | ||
1748 | skb = tcp_write_queue_head(sk); | 1748 | skb = tcp_write_queue_head(sk); |
1749 | if (tcp_skb_is_last(sk, skb)) | ||
1750 | return 1; | ||
1749 | skb = tcp_write_queue_next(sk, skb); /* Skips head */ | 1751 | skb = tcp_write_queue_next(sk, skb); /* Skips head */ |
1750 | tcp_for_write_queue_from(skb, sk) { | 1752 | tcp_for_write_queue_from(skb, sk) { |
1751 | if (skb == tcp_send_head(sk)) | 1753 | if (skb == tcp_send_head(sk)) |
@@ -4156,7 +4158,7 @@ drop: | |||
4156 | skb1 = skb1->prev; | 4158 | skb1 = skb1->prev; |
4157 | } | 4159 | } |
4158 | } | 4160 | } |
4159 | __skb_insert(skb, skb1, skb1->next, &tp->out_of_order_queue); | 4161 | __skb_queue_after(&tp->out_of_order_queue, skb1, skb); |
4160 | 4162 | ||
4161 | /* And clean segments covered by new one as whole. */ | 4163 | /* And clean segments covered by new one as whole. */ |
4162 | while ((skb1 = skb->next) != | 4164 | while ((skb1 = skb->next) != |
@@ -4254,7 +4256,7 @@ tcp_collapse(struct sock *sk, struct sk_buff_head *list, | |||
4254 | memcpy(nskb->head, skb->head, header); | 4256 | memcpy(nskb->head, skb->head, header); |
4255 | memcpy(nskb->cb, skb->cb, sizeof(skb->cb)); | 4257 | memcpy(nskb->cb, skb->cb, sizeof(skb->cb)); |
4256 | TCP_SKB_CB(nskb)->seq = TCP_SKB_CB(nskb)->end_seq = start; | 4258 | TCP_SKB_CB(nskb)->seq = TCP_SKB_CB(nskb)->end_seq = start; |
4257 | __skb_insert(nskb, skb->prev, skb, list); | 4259 | __skb_queue_before(list, skb, nskb); |
4258 | skb_set_owner_r(nskb, sk); | 4260 | skb_set_owner_r(nskb, sk); |
4259 | 4261 | ||
4260 | /* Copy data, releasing collapsed skbs. */ | 4262 | /* Copy data, releasing collapsed skbs. */ |