diff options
author | Tony Luck <tony.luck@intel.com> | 2005-08-12 15:13:06 -0700 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-08-12 15:13:06 -0700 |
commit | fc464476aa8356f7aae8787d9b8c14aa15d166eb (patch) | |
tree | 99068df8e33177f2376f953486a235a8b0215e69 /net/ipv4/tcp_output.c | |
parent | 691241315116b962f2161e6190f1678cc65bbe26 (diff) | |
parent | 2da5bf80f754e28cc153362e5ed1edaa9740897a (diff) |
Auto-update from upstream
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 7d076f0db10..3ed6fc15815 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1370,15 +1370,21 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) if (skb->len > cur_mss) { int old_factor = tcp_skb_pcount(skb); - int new_factor; + int diff; if (tcp_fragment(sk, skb, cur_mss, cur_mss)) return -ENOMEM; /* We'll try again later. */ /* New SKB created, account for it. */ - new_factor = tcp_skb_pcount(skb); - tp->packets_out -= old_factor - new_factor; - tp->packets_out += tcp_skb_pcount(skb->next); + diff = old_factor - tcp_skb_pcount(skb) - + tcp_skb_pcount(skb->next); + tp->packets_out -= diff; + + if (diff > 0) { + tp->fackets_out -= diff; + if ((int)tp->fackets_out < 0) + tp->fackets_out = 0; + } } /* Collapse two adjacent packets if worthwhile and we can. */ |