BPF_SKEL_FUNCS(sendmsg6_prog, sendmsg_v6_deny_prog);
 BPF_SKEL_FUNCS(sendmsg6_prog, sendmsg_v6_preserve_dst_prog);
 BPF_SKEL_FUNCS(sendmsg6_prog, sendmsg_v6_v4mapped_prog);
+BPF_SKEL_FUNCS(sendmsg6_prog, sendmsg_v6_wildcard_prog);
 BPF_SKEL_FUNCS(sendmsg_unix_prog, sendmsg_unix_prog);
 BPF_SKEL_FUNCS(recvmsg4_prog, recvmsg4_prog);
 BPF_SKEL_FUNCS(recvmsg6_prog, recvmsg6_prog);
                SRC6_REWRITE_IP,
                SYSCALL_ENOTSUPP,
        },
+       {
+               SOCK_ADDR_TEST_SENDMSG,
+               "sendmsg6: sendmsg dst IP = [::] (BSD'ism) (dgram)",
+               sendmsg_v6_wildcard_prog_load,
+               sendmsg_v6_wildcard_prog_destroy,
+               BPF_CGROUP_UDP6_SENDMSG,
+               &user_ops,
+               AF_INET6,
+               SOCK_DGRAM,
+               SERV6_IP,
+               SERV6_PORT,
+               SERV6_REWRITE_IP,
+               SERV6_REWRITE_PORT,
+               SRC6_REWRITE_IP,
+               SUCCESS,
+       },
        {
                SOCK_ADDR_TEST_SENDMSG,
                "sendmsg_unix: sendmsg (dgram)",
 
        return 1;
 }
 
+SEC("cgroup/sendmsg6")
+int sendmsg_v6_wildcard_prog(struct bpf_sock_addr *ctx)
+{
+       /* Rewrite source. */
+       ctx->msg_src_ip6[0] = bpf_htonl(SRC_REWRITE_IP6_0);
+       ctx->msg_src_ip6[1] = bpf_htonl(SRC_REWRITE_IP6_1);
+       ctx->msg_src_ip6[2] = bpf_htonl(SRC_REWRITE_IP6_2);
+       ctx->msg_src_ip6[3] = bpf_htonl(SRC_REWRITE_IP6_3);
+
+       /* Rewrite destination. */
+       ctx->user_ip6[0] = bpf_htonl(0);
+       ctx->user_ip6[1] = bpf_htonl(0);
+       ctx->user_ip6[2] = bpf_htonl(0);
+       ctx->user_ip6[3] = bpf_htonl(0);
+
+       ctx->user_port = bpf_htons(DST_REWRITE_PORT6);
+
+       return 1;
+}
+
 SEC("cgroup/sendmsg6")
 int sendmsg_v6_preserve_dst_prog(struct bpf_sock_addr *ctx)
 {
 
 static int connect6_prog_load(const struct sock_addr_test *test);
 static int sendmsg4_rw_asm_prog_load(const struct sock_addr_test *test);
 static int sendmsg6_rw_asm_prog_load(const struct sock_addr_test *test);
-static int sendmsg6_rw_wildcard_prog_load(const struct sock_addr_test *test);
 
 static struct sock_addr_test tests[] = {
        /* bind */
                SRC6_REWRITE_IP,
                SUCCESS,
        },
-       {
-               "sendmsg6: set dst IP = [::] (BSD'ism)",
-               sendmsg6_rw_wildcard_prog_load,
-               BPF_CGROUP_UDP6_SENDMSG,
-               BPF_CGROUP_UDP6_SENDMSG,
-               AF_INET6,
-               SOCK_DGRAM,
-               SERV6_IP,
-               SERV6_PORT,
-               SERV6_REWRITE_IP,
-               SERV6_REWRITE_PORT,
-               SRC6_REWRITE_IP,
-               SUCCESS,
-       },
 };
 
 static int load_insns(const struct sock_addr_test *test,
        return sendmsg6_rw_dst_asm_prog_load(test, SERV6_REWRITE_IP);
 }
 
-static int sendmsg6_rw_wildcard_prog_load(const struct sock_addr_test *test)
-{
-       return sendmsg6_rw_dst_asm_prog_load(test, WILDCARD6_IP);
-}
-
 static int cmp_addr(const struct sockaddr_storage *addr1,
                    const struct sockaddr_storage *addr2, int cmp_port)
 {