diff options
author | Willem de Bruijn <willemb@google.com> | 2018-04-26 19:42:20 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-26 21:08:51 +0200 |
commit | 2e8de8576343ab540856082916bfb84d17288b08 (patch) | |
tree | 211c9efb376d6499bfc992065bd925bfb85d571e /net/ipv6/udp.c | |
parent | udp: paged allocation with gso (diff) | |
download | linux-2e8de8576343ab540856082916bfb84d17288b08.tar.xz linux-2e8de8576343ab540856082916bfb84d17288b08.zip |
udp: add gso segment cmsg
Allow specifying segment size in the send call.
The new control message performs the same function as socket option
UDP_SEGMENT while avoiding the extra system call.
[ Export udp_cmsg_send for ipv6. -DaveM ]
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r-- | net/ipv6/udp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 86b7dd58d4b4..6acfdd3e442b 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -1276,7 +1276,10 @@ do_udp_sendmsg: opt->tot_len = sizeof(*opt); ipc6.opt = opt; - err = ip6_datagram_send_ctl(sock_net(sk), sk, msg, &fl6, &ipc6, &sockc); + err = udp_cmsg_send(sk, msg, &ipc6.gso_size); + if (err > 0) + err = ip6_datagram_send_ctl(sock_net(sk), sk, msg, &fl6, + &ipc6, &sockc); if (err < 0) { fl6_sock_release(flowlabel); return err; |