Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26073
b: refs/heads/master
c: b60b49e
h: refs/heads/master
i:
  26071: 6018030
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Apr 20, 2006
1 parent bd5a3ed commit 3b5c08b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d47f3640fe2ac4da8a8e713a549e6eaf23ac2084
refs/heads/master: b60b49ea6a3e1f8dcaf4148dad0daab61ab766d2
10 changes: 7 additions & 3 deletions trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *buff;
int nsize, old_factor;
int nlen;
u16 flags;

BUG_ON(len > skb->len);
Expand All @@ -552,8 +553,10 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
if (buff == NULL)
return -ENOMEM; /* We'll just try again later. */

buff->truesize = skb->len - len;
skb->truesize -= buff->truesize;
sk_charge_skb(sk, buff);
nlen = skb->len - len - nsize;
buff->truesize += nlen;
skb->truesize -= nlen;

/* Correct the sequence numbers. */
TCP_SKB_CB(buff)->seq = TCP_SKB_CB(skb)->seq + len;
Expand Down Expand Up @@ -1039,7 +1042,8 @@ static int tso_fragment(struct sock *sk, struct sk_buff *skb, unsigned int len,
if (unlikely(buff == NULL))
return -ENOMEM;

buff->truesize = nlen;
sk_charge_skb(sk, buff);
buff->truesize += nlen;
skb->truesize -= nlen;

/* Correct the sequence numbers. */
Expand Down

0 comments on commit 3b5c08b

Please sign in to comment.