ipv4: raw_send_hdrinc(): pass msghdr
Switch from passing msg->iov_iter.iov to passing msg itself Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
a8866ff6a5
commit
7ae9abfd9d
@ -337,7 +337,7 @@ int raw_rcv(struct sock *sk, struct sk_buff *skb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int raw_send_hdrinc(struct sock *sk, struct flowi4 *fl4,
|
static int raw_send_hdrinc(struct sock *sk, struct flowi4 *fl4,
|
||||||
void *from, size_t length,
|
struct msghdr *msg, size_t length,
|
||||||
struct rtable **rtp,
|
struct rtable **rtp,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
@ -382,7 +382,7 @@ static int raw_send_hdrinc(struct sock *sk, struct flowi4 *fl4,
|
|||||||
|
|
||||||
skb->transport_header = skb->network_header;
|
skb->transport_header = skb->network_header;
|
||||||
err = -EFAULT;
|
err = -EFAULT;
|
||||||
if (memcpy_fromiovecend((void *)iph, from, 0, length))
|
if (memcpy_fromiovecend((void *)iph, msg->msg_iter.iov, 0, length))
|
||||||
goto error_free;
|
goto error_free;
|
||||||
|
|
||||||
iphlen = iph->ihl * 4;
|
iphlen = iph->ihl * 4;
|
||||||
@ -625,8 +625,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
|
|||||||
back_from_confirm:
|
back_from_confirm:
|
||||||
|
|
||||||
if (inet->hdrincl)
|
if (inet->hdrincl)
|
||||||
/* XXX: stripping const */
|
err = raw_send_hdrinc(sk, &fl4, msg, len,
|
||||||
err = raw_send_hdrinc(sk, &fl4, (struct iovec *)msg->msg_iter.iov, len,
|
|
||||||
&rt, msg->msg_flags);
|
&rt, msg->msg_flags);
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user