Commit 3280a252 authored by Hideaki Yoshifuji's avatar Hideaki Yoshifuji

[IPV6] unify XXX_push_pending_frames() code path for rawv6 sockets.

parent 899b0e04
...@@ -453,6 +453,9 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r ...@@ -453,6 +453,9 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r
int err = 0; int err = 0;
u16 *csum; u16 *csum;
if (!opt->checksum)
goto send;
if ((skb = skb_peek(&sk->sk_write_queue)) == NULL) if ((skb = skb_peek(&sk->sk_write_queue)) == NULL)
goto out; goto out;
...@@ -485,6 +488,7 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r ...@@ -485,6 +488,7 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r
} }
if (*csum == 0) if (*csum == 0)
*csum = -1; *csum = -1;
send:
err = ip6_push_pending_frames(sk); err = ip6_push_pending_frames(sk);
out: out:
return err; return err;
...@@ -702,13 +706,8 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, ...@@ -702,13 +706,8 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
if (err) if (err)
ip6_flush_pending_frames(sk); ip6_flush_pending_frames(sk);
else if (!(msg->msg_flags & MSG_MORE)) { else if (!(msg->msg_flags & MSG_MORE))
if (raw_opt->checksum) { err = rawv6_push_pending_frames(sk, &fl, raw_opt, len);
err = rawv6_push_pending_frames(sk, &fl, raw_opt, len);
} else {
err = ip6_push_pending_frames(sk);
}
}
} }
done: done:
ip6_dst_store(sk, dst, ip6_dst_store(sk, dst,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment