// L2TPNS Clustering Stuff
-char const *cvs_id_cluster = "$Id: cluster.c,v 1.45 2005/07/31 10:04:09 bodea Exp $";
+char const *cvs_id_cluster = "$Id: cluster.c,v 1.47 2005/11/04 14:41:50 bodea Exp $";
#include <stdio.h>
#include <stdlib.h>
opt = 0; // Turn off multicast loopback.
setsockopt(cluster_sockfd, IPPROTO_IP, IP_MULTICAST_LOOP, &opt, sizeof(opt));
+ if (config->cluster_mcast_ttl != 1)
+ {
+ uint8_t ttl = 0;
+ if (config->cluster_mcast_ttl > 0)
+ ttl = config->cluster_mcast_ttl < 256 ? config->cluster_mcast_ttl : 255;
+
+ setsockopt(cluster_sockfd, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl));
+ }
+
if (setsockopt(cluster_sockfd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) < 0)
{
LOG(0, 0, 0, "Failed to setsockopt (join mcast group): %s\n", strerror(errno));
new.next = old->next;
new.far = old->far;
new.tunnel = old->tunnel;
- new.l2tp_flags = old->l2tp_flags;
+ new.flags = old->l2tp_flags;
new.ip = old->ip;
new.ip_pool_index = old->ip_pool_index;
new.unique_id = old->unique_id;