diff options
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index fafbec8b073e..1d7f49c6f0ca 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2511,6 +2511,7 @@ struct sk_buff **tcp_gro_receive(struct sk_buff **head, struct sk_buff *skb) | |||
2511 | struct sk_buff *p; | 2511 | struct sk_buff *p; |
2512 | struct tcphdr *th; | 2512 | struct tcphdr *th; |
2513 | struct tcphdr *th2; | 2513 | struct tcphdr *th2; |
2514 | unsigned int len; | ||
2514 | unsigned int thlen; | 2515 | unsigned int thlen; |
2515 | unsigned int flags; | 2516 | unsigned int flags; |
2516 | unsigned int mss = 1; | 2517 | unsigned int mss = 1; |
@@ -2531,6 +2532,7 @@ struct sk_buff **tcp_gro_receive(struct sk_buff **head, struct sk_buff *skb) | |||
2531 | 2532 | ||
2532 | skb_gro_pull(skb, thlen); | 2533 | skb_gro_pull(skb, thlen); |
2533 | 2534 | ||
2535 | len = skb_gro_len(skb); | ||
2534 | flags = tcp_flag_word(th); | 2536 | flags = tcp_flag_word(th); |
2535 | 2537 | ||
2536 | for (; (p = *head); head = &p->next) { | 2538 | for (; (p = *head); head = &p->next) { |
@@ -2561,7 +2563,7 @@ found: | |||
2561 | 2563 | ||
2562 | mss = skb_shinfo(p)->gso_size; | 2564 | mss = skb_shinfo(p)->gso_size; |
2563 | 2565 | ||
2564 | flush |= (skb_gro_len(skb) > mss) | !skb_gro_len(skb); | 2566 | flush |= (len > mss) | !len; |
2565 | flush |= (ntohl(th2->seq) + skb_gro_len(p)) ^ ntohl(th->seq); | 2567 | flush |= (ntohl(th2->seq) + skb_gro_len(p)) ^ ntohl(th->seq); |
2566 | 2568 | ||
2567 | if (flush || skb_gro_receive(head, skb)) { | 2569 | if (flush || skb_gro_receive(head, skb)) { |
@@ -2574,7 +2576,7 @@ found: | |||
2574 | tcp_flag_word(th2) |= flags & (TCP_FLAG_FIN | TCP_FLAG_PSH); | 2576 | tcp_flag_word(th2) |= flags & (TCP_FLAG_FIN | TCP_FLAG_PSH); |
2575 | 2577 | ||
2576 | out_check_final: | 2578 | out_check_final: |
2577 | flush = skb_gro_len(skb) < mss; | 2579 | flush = len < mss; |
2578 | flush |= flags & (TCP_FLAG_URG | TCP_FLAG_PSH | TCP_FLAG_RST | | 2580 | flush |= flags & (TCP_FLAG_URG | TCP_FLAG_PSH | TCP_FLAG_RST | |
2579 | TCP_FLAG_SYN | TCP_FLAG_FIN); | 2581 | TCP_FLAG_SYN | TCP_FLAG_FIN); |
2580 | 2582 | ||