ip_generic_getfrag, udplite_getfrag: switch to passing msghdr
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -752,14 +752,14 @@ EXPORT_SYMBOL(ip_fragment);
|
||||
int
|
||||
ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb)
|
||||
{
|
||||
struct iovec *iov = from;
|
||||
struct msghdr *msg = from;
|
||||
|
||||
if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
||||
if (memcpy_fromiovecend(to, iov, offset, len) < 0)
|
||||
if (memcpy_fromiovecend(to, msg->msg_iov, offset, len) < 0)
|
||||
return -EFAULT;
|
||||
} else {
|
||||
__wsum csum = 0;
|
||||
if (csum_partial_copy_fromiovecend(to, iov, offset, len, &csum) < 0)
|
||||
if (csum_partial_copy_fromiovecend(to, msg->msg_iov, offset, len, &csum) < 0)
|
||||
return -EFAULT;
|
||||
skb->csum = csum_block_add(skb->csum, csum, odd);
|
||||
}
|
||||
|
Reference in New Issue
Block a user