]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
udp: advertise ipv6 udp support for msghdr::ubuf_info
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 26 Oct 2022 23:25:56 +0000 (00:25 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 29 Oct 2022 03:21:25 +0000 (20:21 -0700)
Mark udp ipv6 as supporting msghdr::ubuf_info. In the original commit
SOCK_SUPPORT_ZC was supposed to be set by a udp_init_sock() call from
udp6_init_sock(), but
d38afeec26ed4 ("tcp/udp: Call inet6_destroy_sock() in IPv6 ...")
removed it and so ipv6 udp misses the flag.

Cc: <stable@vger.kernel.org> # 6.0
Fixes: e993ffe3da4bc ("net: flag sockets supporting msghdr originated zerocopy")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/udp.c

index 129ec5a9b0eb7a1f8ae99581bb43eaf2c788b101..bc65e5b7195b3cc0c17f05877896721e70e6984b 100644 (file)
@@ -66,6 +66,7 @@ int udpv6_init_sock(struct sock *sk)
 {
        skb_queue_head_init(&udp_sk(sk)->reader_queue);
        sk->sk_destruct = udpv6_destruct_sock;
+       set_bit(SOCK_SUPPORT_ZC, &sk->sk_socket->flags);
        return 0;
 }