Browse code

- fixed ipv6 multicast on non-linux OSes (linux is the only one using IPV6_ADD_MEMBERSHIP, all the other use instead IPV6_JOIN_GROUP)

Andrei Pelinescu-Onciul authored on 24/07/2004 07:36:39
Showing 1 changed files
... ...
@@ -254,8 +254,11 @@ static int setup_mcast_rcvr(int sock, union sockaddr_union* addr)
254 254
 		memcpy(&mreq6.ipv6mr_multiaddr, &addr->sin6.sin6_addr, 
255 255
 		       sizeof(struct in6_addr));
256 256
 		mreq6.ipv6mr_interface = 0;
257
-		
257
+#ifdef __OS_linux
258 258
 		if (setsockopt(sock, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &mreq6,
259
+#else
260
+		if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq6,
261
+#endif
259 262
 			       sizeof(mreq6))==-1){
260 263
 			LOG(L_ERR, "ERROR: setup_mcast_rcvr: setsockopt:%s\n",
261 264
 			    strerror(errno));