- memset(&s->mreq, 0, sizeof(s->mreq));
- s->mreq.imr_multiaddr = s->dest_addr.sin_addr;
- s->mreq.imr_interface.s_addr = htonl (INADDR_ANY);
- if (setsockopt(udp_fd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
- &s->mreq, sizeof(s->mreq)) < 0) {
- perror("rtp: IP_ADD_MEMBERSHIP");
- goto fail;
- }
- }
- }
-#endif
-#else
- if (s->is_multicast && !(h->flags & URL_WRONLY))
- s->local_port = port;
- udp_fd = udp_ipv6_set_local(h);
- if (udp_fd < 0)
- goto fail;
- if (s->is_multicast) {
- if (h->flags & URL_WRONLY) {
- if (udp_ipv6_set_multicast_ttl(udp_fd, s->ttl, (struct sockaddr *)&s->dest_addr) < 0)
- goto fail;
- } else {
- if (udp_ipv6_join_multicast_group(udp_fd, (struct sockaddr *)&s->dest_addr) < 0)