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
int err = 0;
u16 *csum;
if (!opt->checksum)
goto send;
if ((skb = skb_peek(&sk->sk_write_queue)) == NULL)
goto out;
......@@ -485,6 +488,7 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r
}
if (*csum == 0)
*csum = -1;
send:
err = ip6_push_pending_frames(sk);
out:
return err;
......@@ -702,13 +706,8 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
if (err)
ip6_flush_pending_frames(sk);
else if (!(msg->msg_flags & MSG_MORE)) {
if (raw_opt->checksum) {
err = rawv6_push_pending_frames(sk, &fl, raw_opt, len);
} else {
err = ip6_push_pending_frames(sk);
}
}
else if (!(msg->msg_flags & MSG_MORE))
err = rawv6_push_pending_frames(sk, &fl, raw_opt, len);
}
done:
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