]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
set IP_MULTICAST_LOOP
authorwessels <>
Sun, 23 Feb 1997 13:01:15 +0000 (13:01 +0000)
committerwessels <>
Sun, 23 Feb 1997 13:01:15 +0000 (13:01 +0000)
src/comm.cc

index a5177e952d6d41115e4e0130755a38ebc88076c6..2f35928c32a13995578c080f3edc1485d8d49a83 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.137 1997/02/19 17:06:51 wessels Exp $
+ * $Id: comm.cc,v 1.138 1997/02/23 06:01:15 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -1158,6 +1158,7 @@ comm_join_mcast_groups(int fd)
     const ipcache_addrs *ia = NULL;
     int i;
     int x;
+    char c = 0;
     for (s = Config.mcast_group_list; s; s = s->next) {
        debug(5, 10, "comm_join_mcast_groups: joining group %s on FD %d\n",
            s->key, fd);
@@ -1174,6 +1175,12 @@ comm_join_mcast_groups(int fd)
            if (x < 0)
                debug(5, 1, "comm_join_mcast_groups: FD %d, addr: %s [%s]\n",
                    fd, s->key, inet_ntoa(*(ia->in_addrs + i)));
+           x = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &c, 1);
+           if (x < 0)
+               debug(5, 1,
+                   "comm_join_mcast_groups: can't disable m'cast loopback: %s\n",
+                   xstrerror());
+
        }
     }
 #endif