- fixed ipv6 multicast on non-linux OSes (linux is the only one using
authorAndrei Pelinescu-Onciul <andrei@iptel.org>
Sat, 24 Jul 2004 07:36:39 +0000 (07:36 +0000)
committerAndrei Pelinescu-Onciul <andrei@iptel.org>
Sat, 24 Jul 2004 07:36:39 +0000 (07:36 +0000)
  IPV6_ADD_MEMBERSHIP, all the other use instead IPV6_JOIN_GROUP)

udp_server.c

index ea0056f..c911ab8 100644 (file)
@@ -254,8 +254,11 @@ static int setup_mcast_rcvr(int sock, union sockaddr_union* addr)
                memcpy(&mreq6.ipv6mr_multiaddr, &addr->sin6.sin6_addr, 
                       sizeof(struct in6_addr));
                mreq6.ipv6mr_interface = 0;
-               
+#ifdef __OS_linux
                if (setsockopt(sock, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &mreq6,
+#else
+               if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq6,
+#endif
                               sizeof(mreq6))==-1){
                        LOG(L_ERR, "ERROR: setup_mcast_rcvr: setsockopt:%s\n",
                            strerror(errno));