Skip to content

Commit

Permalink
net: ipv6: convert to SKB frag APIs
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: "Pekka Savola (ipv6)" <pekkas@netcore.fi>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ian Campbell authored and David S. Miller committed Aug 25, 2011
1 parent aff65da commit 408dadf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/ipv6/ip6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1480,13 +1480,13 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
if (page && (left = PAGE_SIZE - off) > 0) {
if (copy >= left)
copy = left;
if (page != frag->page) {
if (page != skb_frag_page(frag)) {
if (i == MAX_SKB_FRAGS) {
err = -EMSGSIZE;
goto error;
}
get_page(page);
skb_fill_page_desc(skb, i, page, sk->sk_sndmsg_off, 0);
skb_frag_ref(skb, i);
frag = &skb_shinfo(skb)->frags[i];
}
} else if(i < MAX_SKB_FRAGS) {
Expand All @@ -1506,7 +1506,8 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
err = -EMSGSIZE;
goto error;
}
if (getfrag(from, page_address(frag->page)+frag->page_offset+frag->size, offset, copy, skb->len, skb) < 0) {
if (getfrag(from, skb_frag_address(frag)+frag->size,
offset, copy, skb->len, skb) < 0) {
err = -EFAULT;
goto error;
}
Expand Down

0 comments on commit 408dadf

Please sign in to comment.