Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150757
b: refs/heads/master
c: c32ba3f
h: refs/heads/master
i:
  150755: 7982660
v: v3
  • Loading branch information
David S. Miller committed Jun 9, 2009
1 parent 6c49d2a commit 0a63ff6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 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: a5bd8a13e9e0322c7f76b34790ba34e2e0ce2ac5
refs/heads/master: c32ba3f9b8aa2441c7cfcd065f79981cf8cfe9f4
31 changes: 14 additions & 17 deletions trunk/net/appletalk/ddp.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ static unsigned long atalk_sum_skb(const struct sk_buff *skb, int offset,
int len, unsigned long sum)
{
int start = skb_headlen(skb);
struct sk_buff *frag_iter;
int i, copy;

/* checksum stuff in header space */
Expand Down Expand Up @@ -977,26 +978,22 @@ static unsigned long atalk_sum_skb(const struct sk_buff *skb, int offset,
start = end;
}

if (skb_shinfo(skb)->frag_list) {
struct sk_buff *list = skb_shinfo(skb)->frag_list;

for (; list; list = list->next) {
int end;
skb_walk_frags(skb, frag_iter) {
int end;

WARN_ON(start > offset + len);
WARN_ON(start > offset + len);

end = start + list->len;
if ((copy = end - offset) > 0) {
if (copy > len)
copy = len;
sum = atalk_sum_skb(list, offset - start,
copy, sum);
if ((len -= copy) == 0)
return sum;
offset += copy;
}
start = end;
end = start + frag_iter->len;
if ((copy = end - offset) > 0) {
if (copy > len)
copy = len;
sum = atalk_sum_skb(frag_iter, offset - start,
copy, sum);
if ((len -= copy) == 0)
return sum;
offset += copy;
}
start = end;
}

BUG_ON(len > 0);
Expand Down

0 comments on commit 0a63ff6

Please sign in to comment.