Skip to content

Commit b61e9dc

Browse files
author
Al Viro
committed
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>
1 parent c7f3685 commit b61e9dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/ipv4/raw.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
#include <linux/uio.h>
8383

8484
struct raw_frag_vec {
85-
struct iovec *iov;
85+
struct msghdr *msg;
8686
union {
8787
struct icmphdr icmph;
8888
char c[1];
@@ -440,7 +440,7 @@ static int raw_probe_proto_opt(struct raw_frag_vec *rfv, struct flowi4 *fl4)
440440
/* We only need the first two bytes. */
441441
rfv->hlen = 2;
442442

443-
err = memcpy_fromiovec(rfv->hdr.c, rfv->iov, rfv->hlen);
443+
err = memcpy_from_msg(rfv->hdr.c, rfv->msg, rfv->hlen);
444444
if (err)
445445
return err;
446446

@@ -478,7 +478,7 @@ static int raw_getfrag(void *from, char *to, int offset, int len, int odd,
478478

479479
offset -= rfv->hlen;
480480

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);
482482
}
483483

484484
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,
600600
daddr, saddr, 0, 0);
601601

602602
if (!inet->hdrincl) {
603-
rfv.iov = msg->msg_iov;
603+
rfv.msg = msg;
604604
rfv.hlen = 0;
605605

606606
err = raw_probe_proto_opt(&rfv, &fl4);

0 commit comments

Comments
 (0)