aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 76b148bcb0dc..73266b79c19a 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2482,19 +2482,19 @@ struct sk_buff **tcp_gro_receive(struct sk_buff **head, struct sk_buff *skb)
2482 unsigned int mss = 1; 2482 unsigned int mss = 1;
2483 int flush = 1; 2483 int flush = 1;
2484 2484
2485 if (!pskb_may_pull(skb, sizeof(*th))) 2485 th = skb_gro_header(skb, sizeof(*th));
2486 if (unlikely(!th))
2486 goto out; 2487 goto out;
2487 2488
2488 th = tcp_hdr(skb);
2489 thlen = th->doff * 4; 2489 thlen = th->doff * 4;
2490 if (thlen < sizeof(*th)) 2490 if (thlen < sizeof(*th))
2491 goto out; 2491 goto out;
2492 2492
2493 if (!pskb_may_pull(skb, thlen)) 2493 th = skb_gro_header(skb, thlen);
2494 if (unlikely(!th))
2494 goto out; 2495 goto out;
2495 2496
2496 th = tcp_hdr(skb); 2497 skb_gro_pull(skb, thlen);
2497 __skb_pull(skb, thlen);
2498 2498
2499 flags = tcp_flag_word(th); 2499 flags = tcp_flag_word(th);
2500 2500
@@ -2522,10 +2522,10 @@ found:
2522 flush |= th->ack_seq != th2->ack_seq || th->window != th2->window; 2522 flush |= th->ack_seq != th2->ack_seq || th->window != th2->window;
2523 flush |= memcmp(th + 1, th2 + 1, thlen - sizeof(*th)); 2523 flush |= memcmp(th + 1, th2 + 1, thlen - sizeof(*th));
2524 2524
2525 total = p->len; 2525 total = skb_gro_len(p);
2526 mss = skb_shinfo(p)->gso_size; 2526 mss = skb_shinfo(p)->gso_size;
2527 2527
2528 flush |= skb->len > mss || skb->len <= 0; 2528 flush |= skb_gro_len(skb) > mss || !skb_gro_len(skb);
2529 flush |= ntohl(th2->seq) + total != ntohl(th->seq); 2529 flush |= ntohl(th2->seq) + total != ntohl(th->seq);
2530 2530
2531 if (flush || skb_gro_receive(head, skb)) { 2531 if (flush || skb_gro_receive(head, skb)) {
@@ -2538,7 +2538,7 @@ found:
2538 tcp_flag_word(th2) |= flags & (TCP_FLAG_FIN | TCP_FLAG_PSH); 2538 tcp_flag_word(th2) |= flags & (TCP_FLAG_FIN | TCP_FLAG_PSH);
2539 2539
2540out_check_final: 2540out_check_final:
2541 flush = skb->len < mss; 2541 flush = skb_gro_len(skb) < mss;
2542 flush |= flags & (TCP_FLAG_URG | TCP_FLAG_PSH | TCP_FLAG_RST | 2542 flush |= flags & (TCP_FLAG_URG | TCP_FLAG_PSH | TCP_FLAG_RST |
2543 TCP_FLAG_SYN | TCP_FLAG_FIN); 2543 TCP_FLAG_SYN | TCP_FLAG_FIN);
2544 2544