Use multicast loopbacking.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 9 Aug 2008 14:16:30 +0000 (16:16 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sat, 9 Aug 2008 14:16:30 +0000 (16:16 +0200)
src/mctap.c

index 437082b..52dd294 100644 (file)
@@ -68,6 +68,9 @@ static int mkmcastsk4(struct in_addr group, int port)
     mreq.imr_multiaddr = group;
     if(setsockopt(fd, SOL_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)))
        return(-1);
+    soval = 1;
+    if(setsockopt(fd, SOL_IP, IP_MULTICAST_LOOP, &soval, sizeof(soval)))
+       return(-1);
     return(fd);
 }