diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-10-18 17:00:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-19 03:10:46 -0400 |
commit | 9e903e085262ffbf1fc44a17ac06058aca03524a (patch) | |
tree | 4acefc97ba38c1733474d25c0b2053b56af97db1 /net/ipv6/reassembly.c | |
parent | dd767856a36e00b631d65ebc4bb81b19915532d6 (diff) |
net: add skb frag size accessors
To ease skb->truesize sanitization, its better to be able to localize
all references to skb frags size.
Define accessors : skb_frag_size() to fetch frag size, and
skb_frag_size_{set|add|sub}() to manipulate it.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/reassembly.c')
-rw-r--r-- | net/ipv6/reassembly.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 7b954e2539d0..cc22099ac8b6 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -464,8 +464,8 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, | |||
464 | head->next = clone; | 464 | head->next = clone; |
465 | skb_shinfo(clone)->frag_list = skb_shinfo(head)->frag_list; | 465 | skb_shinfo(clone)->frag_list = skb_shinfo(head)->frag_list; |
466 | skb_frag_list_init(head); | 466 | skb_frag_list_init(head); |
467 | for (i=0; i<skb_shinfo(head)->nr_frags; i++) | 467 | for (i = 0; i < skb_shinfo(head)->nr_frags; i++) |
468 | plen += skb_shinfo(head)->frags[i].size; | 468 | plen += skb_frag_size(&skb_shinfo(head)->frags[i]); |
469 | clone->len = clone->data_len = head->data_len - plen; | 469 | clone->len = clone->data_len = head->data_len - plen; |
470 | head->data_len -= clone->len; | 470 | head->data_len -= clone->len; |
471 | head->len -= clone->len; | 471 | head->len -= clone->len; |