aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-04-06 18:47:38 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-11-24 04:28:44 -0500
commit227158db160449b6513d2e31894a135104b90e90 (patch)
tree36d477d7351946f20bf86fb9b46d2e758659b88f /net
parentc33d23c21501f8e3e045e73b55a49167e1f3a721 (diff)
new helper: skb_copy_and_csum_datagram_msg()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/udp.c5
-rw-r--r--net/ipv6/raw.c2
-rw-r--r--net/ipv6/udp.c2
3 files changed, 4 insertions, 5 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 4a16b9129079..b2d606833ce4 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1284,9 +1284,8 @@ try_again:
1284 err = skb_copy_datagram_msg(skb, sizeof(struct udphdr), 1284 err = skb_copy_datagram_msg(skb, sizeof(struct udphdr),
1285 msg, copied); 1285 msg, copied);
1286 else { 1286 else {
1287 err = skb_copy_and_csum_datagram_iovec(skb, 1287 err = skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr),
1288 sizeof(struct udphdr), 1288 msg);
1289 msg->msg_iov);
1290 1289
1291 if (err == -EINVAL) 1290 if (err == -EINVAL)
1292 goto csum_copy_err; 1291 goto csum_copy_err;
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 0cbcf98f2cab..8baa53e17a30 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -492,7 +492,7 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk,
492 goto csum_copy_err; 492 goto csum_copy_err;
493 err = skb_copy_datagram_msg(skb, 0, msg, copied); 493 err = skb_copy_datagram_msg(skb, 0, msg, copied);
494 } else { 494 } else {
495 err = skb_copy_and_csum_datagram_iovec(skb, 0, msg->msg_iov); 495 err = skb_copy_and_csum_datagram_msg(skb, 0, msg);
496 if (err == -EINVAL) 496 if (err == -EINVAL)
497 goto csum_copy_err; 497 goto csum_copy_err;
498 } 498 }
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index dbc0b042bdd6..7cfb5d745a2d 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -428,7 +428,7 @@ try_again:
428 err = skb_copy_datagram_msg(skb, sizeof(struct udphdr), 428 err = skb_copy_datagram_msg(skb, sizeof(struct udphdr),
429 msg, copied); 429 msg, copied);
430 else { 430 else {
431 err = skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr), msg->msg_iov); 431 err = skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr), msg);
432 if (err == -EINVAL) 432 if (err == -EINVAL)
433 goto csum_copy_err; 433 goto csum_copy_err;
434 } 434 }