Joe Orton 4c9101
Joe Orton 4c9101
http://svn.apache.org/viewvc?view=revision&revision=1309386
Joe Orton 4c9101
Joe Orton 4c9101
--- apr-1.4.6/network_io/unix/multicast.c
Joe Orton 4c9101
+++ apr-1.4.6/network_io/unix/multicast.c
Joe Orton 4c9101
@@ -194,7 +194,7 @@
Joe Orton 4c9101
 }
Joe Orton 4c9101
 
Joe Orton 4c9101
 static apr_status_t do_mcast_opt(int type, apr_socket_t *sock,
Joe Orton 4c9101
-                                 apr_byte_t value)
Joe Orton 4c9101
+                                 apr_uint32_t value)
Joe Orton 4c9101
 {
Joe Orton 4c9101
     apr_status_t rv = APR_SUCCESS;
Joe Orton 4c9101
 
Joe Orton 4c9101
@@ -205,24 +205,19 @@
Joe Orton 4c9101
         }
Joe Orton 4c9101
     }
Joe Orton 4c9101
 #if APR_HAVE_IPV6
Joe Orton 4c9101
-    else if (sock_is_ipv6(sock) && type == IP_MULTICAST_LOOP) {
Joe Orton 4c9101
-        unsigned int loopopt = value;
Joe Orton 4c9101
-        type = IPV6_MULTICAST_LOOP;
Joe Orton 4c9101
-        if (setsockopt(sock->socketdes, IPPROTO_IPV6, type,
Joe Orton 4c9101
-                       (const void *) &loopopt, sizeof(loopopt)) == -1) {
Joe Orton 4c9101
-            rv = errno;
Joe Orton 4c9101
-        }
Joe Orton 4c9101
-    }
Joe Orton 4c9101
     else if (sock_is_ipv6(sock)) {
Joe Orton 4c9101
         if (type == IP_MULTICAST_TTL) {
Joe Orton 4c9101
             type = IPV6_MULTICAST_HOPS;
Joe Orton 4c9101
         }
Joe Orton 4c9101
+        else if (type == IP_MULTICAST_LOOP) {
Joe Orton 4c9101
+            type = IPV6_MULTICAST_LOOP;
Joe Orton 4c9101
+        }
Joe Orton 4c9101
         else {
Joe Orton 4c9101
             return APR_ENOTIMPL;
Joe Orton 4c9101
         }
Joe Orton 4c9101
 
Joe Orton 4c9101
         if (setsockopt(sock->socketdes, IPPROTO_IPV6, type,
Joe Orton 4c9101
-                       &value, sizeof(value)) == -1) {
Joe Orton 4c9101
+                       (const void *) &value, sizeof(value)) == -1) {
Joe Orton 4c9101
             rv = errno;
Joe Orton 4c9101
         }
Joe Orton 4c9101
     }