Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150767
b: refs/heads/master
c: d4fd3bc
h: refs/heads/master
i:
  150765: b797fd1
  150763: b3b397e
  150759: 6caa2c9
  150751: a8b1e25
v: v3
  • Loading branch information
David S. Miller committed Jun 9, 2009
1 parent c9b8990 commit a493e6e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 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: 1b003be39e91a6cd013c9ea580ccc24d1fac9959
refs/heads/master: d4fd3bc101909802f9ed083093cce688cc3416aa
41 changes: 19 additions & 22 deletions trunk/net/xfrm/xfrm_algo.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,9 @@ int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *desc,
{
int start = skb_headlen(skb);
int i, copy = start - offset;
int err;
struct sk_buff *frag_iter;
struct scatterlist sg;
int err;

/* Checksum header. */
if (copy > 0) {
Expand Down Expand Up @@ -742,28 +743,24 @@ int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *desc,
start = end;
}

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

for (; list; list = list->next) {
int end;

WARN_ON(start > offset + len);

end = start + list->len;
if ((copy = end - offset) > 0) {
if (copy > len)
copy = len;
err = skb_icv_walk(list, desc, offset-start,
copy, icv_update);
if (unlikely(err))
return err;
if ((len -= copy) == 0)
return 0;
offset += copy;
}
start = end;
skb_walk_frags(skb, frag_iter) {
int end;

WARN_ON(start > offset + len);

end = start + frag_iter->len;
if ((copy = end - offset) > 0) {
if (copy > len)
copy = len;
err = skb_icv_walk(frag_iter, desc, offset-start,
copy, icv_update);
if (unlikely(err))
return err;
if ((len -= copy) == 0)
return 0;
offset += copy;
}
start = end;
}
BUG_ON(len);
return 0;
Expand Down

0 comments on commit a493e6e

Please sign in to comment.