diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-24 10:52:29 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-09 16:28:21 -0500 |
commit | b61e9dcc5e77d534fa770a02877fd45f51d4e7f4 (patch) | |
tree | 03761d2ba49f7ae87b811758c5b27e555ed75f9f /net/ipv4/raw.c | |
parent | c7f36857252ce8e561ba8745d7ce5beac11b49bc (diff) |
raw.c: stick msghdr into raw_frag_vec
we'll want access to ->msg_iter
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 43385a9fa441..5c901ebf90af 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -82,7 +82,7 @@ | |||
82 | #include <linux/uio.h> | 82 | #include <linux/uio.h> |
83 | 83 | ||
84 | struct raw_frag_vec { | 84 | struct raw_frag_vec { |
85 | struct iovec *iov; | 85 | struct msghdr *msg; |
86 | union { | 86 | union { |
87 | struct icmphdr icmph; | 87 | struct icmphdr icmph; |
88 | char c[1]; | 88 | char c[1]; |
@@ -440,7 +440,7 @@ static int raw_probe_proto_opt(struct raw_frag_vec *rfv, struct flowi4 *fl4) | |||
440 | /* We only need the first two bytes. */ | 440 | /* We only need the first two bytes. */ |
441 | rfv->hlen = 2; | 441 | rfv->hlen = 2; |
442 | 442 | ||
443 | err = memcpy_fromiovec(rfv->hdr.c, rfv->iov, rfv->hlen); | 443 | err = memcpy_from_msg(rfv->hdr.c, rfv->msg, rfv->hlen); |
444 | if (err) | 444 | if (err) |
445 | return err; | 445 | return err; |
446 | 446 | ||
@@ -478,7 +478,7 @@ static int raw_getfrag(void *from, char *to, int offset, int len, int odd, | |||
478 | 478 | ||
479 | offset -= rfv->hlen; | 479 | offset -= rfv->hlen; |
480 | 480 | ||
481 | return ip_generic_getfrag(rfv->iov, to, offset, len, odd, skb); | 481 | return ip_generic_getfrag(rfv->msg->msg_iov, to, offset, len, odd, skb); |
482 | } | 482 | } |
483 | 483 | ||
484 | static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | 484 | static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, |
@@ -600,7 +600,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
600 | daddr, saddr, 0, 0); | 600 | daddr, saddr, 0, 0); |
601 | 601 | ||
602 | if (!inet->hdrincl) { | 602 | if (!inet->hdrincl) { |
603 | rfv.iov = msg->msg_iov; | 603 | rfv.msg = msg; |
604 | rfv.hlen = 0; | 604 | rfv.hlen = 0; |
605 | 605 | ||
606 | err = raw_probe_proto_opt(&rfv, &fl4); | 606 | err = raw_probe_proto_opt(&rfv, &fl4); |