aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2018-04-26 13:42:20 -0400
committerDavid S. Miller <davem@davemloft.net>2018-04-26 15:08:51 -0400
commit2e8de8576343ab540856082916bfb84d17288b08 (patch)
tree211c9efb376d6499bfc992065bd925bfb85d571e /net/ipv6/udp.c
parentudp: paged allocation with gso (diff)
downloadlinux-dev-2e8de8576343ab540856082916bfb84d17288b08.tar.xz
linux-dev-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.c5
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;