Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30421
b: refs/heads/master
c: 0718bcc
h: refs/heads/master
i:
  30419: bca51bf
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jun 26, 2006
1 parent 1903ee6 commit 6eebb4e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 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: 3ba07e65b288f00cc4d2420f1da46309b1cb5a0c
refs/heads/master: 0718bcc09b3597c51e87f265c72135a4928d3c0b
22 changes: 11 additions & 11 deletions trunk/net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2166,15 +2166,15 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int sg)
if (!pskb_may_pull(skb, thlen))
goto out;

oldlen = ~htonl(skb->len);
oldlen = (u16)~skb->len;
__skb_pull(skb, thlen);

segs = skb_segment(skb, sg);
if (IS_ERR(segs))
goto out;

len = skb_shinfo(skb)->gso_size;
delta = csum_add(oldlen, htonl(thlen + len));
delta = htonl(oldlen + (thlen + len));

skb = segs;
th = skb->h.th;
Expand All @@ -2183,10 +2183,10 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int sg)
do {
th->fin = th->psh = 0;

if (skb->ip_summed == CHECKSUM_NONE) {
th->check = csum_fold(csum_partial(
skb->h.raw, thlen, csum_add(skb->csum, delta)));
}
th->check = ~csum_fold(th->check + delta);
if (skb->ip_summed != CHECKSUM_HW)
th->check = csum_fold(csum_partial(skb->h.raw, thlen,
skb->csum));

seq += len;
skb = skb->next;
Expand All @@ -2196,11 +2196,11 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int sg)
th->cwr = 0;
} while (skb->next);

if (skb->ip_summed == CHECKSUM_NONE) {
delta = csum_add(oldlen, htonl(skb->tail - skb->h.raw));
th->check = csum_fold(csum_partial(
skb->h.raw, thlen, csum_add(skb->csum, delta)));
}
delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len);
th->check = ~csum_fold(th->check + delta);
if (skb->ip_summed != CHECKSUM_HW)
th->check = csum_fold(csum_partial(skb->h.raw, thlen,
skb->csum));

out:
return segs;
Expand Down

0 comments on commit 6eebb4e

Please sign in to comment.