add cluster_mcast_ttl option

This commit is contained in:
Brendan O'Dea 2005-09-02 23:59:56 +00:00
parent a8823a7dfa
commit 2b05f31dc7
7 changed files with 26 additions and 4 deletions

View file

@ -3,6 +3,8 @@
- Increase size of PPP buffers to MAXETHER. - Increase size of PPP buffers to MAXETHER.
- Bug fixes for CLI ringbuffer and tunnel HELLO from Yuri. - Bug fixes for CLI ringbuffer and tunnel HELLO from Yuri.
- Restart rather than halt BGP on receipt of CEASE (Dominique Rousseau). - Restart rather than halt BGP on receipt of CEASE (Dominique Rousseau).
- Add cluster_mcast_ttl option to allow a cluster to span multiple
subnets (suggested by Tim Devries).
* Mon Aug 29 2005 Brendan O'Dea <bod@optus.net> 2.1.4 * Mon Aug 29 2005 Brendan O'Dea <bod@optus.net> 2.1.4
- Drop level of "Unexpected CHAP message" log. - Drop level of "Unexpected CHAP message" log.

View file

@ -335,6 +335,10 @@ on <A HREF="#Clustering">Clustering</A> for more information.
Interface for cluster packets (default: eth0). Interface for cluster packets (default: eth0).
</LI> </LI>
<LI><B>cluster_mcast_ttl</B> (int)<BR>
TTL for multicast packets (default: 1).
</LI>
<LI><B>cluster_hb_interval</B> (int)<BR> <LI><B>cluster_hb_interval</B> (int)<BR>
Interval in tenths of a second between cluster heartbeat/pings. Interval in tenths of a second between cluster heartbeat/pings.
</LI> </LI>

View file

@ -2,7 +2,7 @@
.de Id .de Id
.ds Dt \\$4 \\$5 .ds Dt \\$4 \\$5
.. ..
.Id $Id: startup-config.5,v 1.12 2005-07-31 10:04:14 bodea Exp $ .Id $Id: startup-config.5,v 1.13 2005-09-02 23:59:56 bodea Exp $
.TH STARTUP-CONFIG 5 "\*(Dt" L2TPNS "File Formats and Conventions" .TH STARTUP-CONFIG 5 "\*(Dt" L2TPNS "File Formats and Conventions"
.SH NAME .SH NAME
startup\-config \- configuration file for l2tpns startup\-config \- configuration file for l2tpns
@ -194,6 +194,9 @@ Multicast cluster address (default: 239.192.13.13).
.B cluster_interface .B cluster_interface
Interface for cluster packets (default: eth0). Interface for cluster packets (default: eth0).
.TP .TP
.B cluster_mcast_ttl
TTL for multicast packets (default: 1).
.TP
.B cluster_hb_interval .B cluster_hb_interval
Interval in tenths of a second between cluster heartbeat/pings. Interval in tenths of a second between cluster heartbeat/pings.
.TP .TP

1
THANKS
View file

@ -18,3 +18,4 @@ Jordan Hrycaj <jordan@mjh.teddy-net.com>
Vladislav Bjelic <vladislav@gmail.com> Vladislav Bjelic <vladislav@gmail.com>
Alex Kiernan <alex.kiernan@gmail.com> Alex Kiernan <alex.kiernan@gmail.com>
Dominique Rousseau <d.rousseau@nnx.com> Dominique Rousseau <d.rousseau@nnx.com>
Tim Devries <tdevries@northrock.bm>

View file

@ -1,6 +1,6 @@
// L2TPNS Clustering Stuff // 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.46 2005-09-02 23:59:56 bodea Exp $";
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -127,6 +127,15 @@ int cluster_init()
opt = 0; // Turn off multicast loopback. opt = 0; // Turn off multicast loopback.
setsockopt(cluster_sockfd, IPPROTO_IP, IP_MULTICAST_LOOP, &opt, sizeof(opt)); 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) 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)); LOG(0, 0, 0, "Failed to setsockopt (join mcast group): %s\n", strerror(errno));

View file

@ -4,7 +4,7 @@
// Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced // Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
// vim: sw=8 ts=8 // vim: sw=8 ts=8
char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.127 2005-09-01 06:59:06 bodea Exp $"; char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.128 2005-09-02 23:59:56 bodea Exp $";
#include <arpa/inet.h> #include <arpa/inet.h>
#include <assert.h> #include <assert.h>
@ -135,6 +135,7 @@ config_descriptt config_values[] = {
CONFIG("packet_limit", max_packets, INT), CONFIG("packet_limit", max_packets, INT),
CONFIG("cluster_address", cluster_address, IPv4), CONFIG("cluster_address", cluster_address, IPv4),
CONFIG("cluster_interface", cluster_interface, STRING), CONFIG("cluster_interface", cluster_interface, STRING),
CONFIG("cluster_mcast_ttl", cluster_mcast_ttl, INT),
CONFIG("cluster_hb_interval", cluster_hb_interval, INT), CONFIG("cluster_hb_interval", cluster_hb_interval, INT),
CONFIG("cluster_hb_timeout", cluster_hb_timeout, INT), CONFIG("cluster_hb_timeout", cluster_hb_timeout, INT),
CONFIG("cluster_master_min_adv", cluster_master_min_adv, INT), CONFIG("cluster_master_min_adv", cluster_master_min_adv, INT),
@ -3469,6 +3470,7 @@ static void initdata(int optdebug, char *optconfig)
config->debug = optdebug; config->debug = optdebug;
config->num_tbfs = MAXTBFS; config->num_tbfs = MAXTBFS;
config->rl_rate = 28; // 28kbps config->rl_rate = 28; // 28kbps
config->cluster_mcast_ttl = 1;
config->cluster_master_min_adv = 1; config->cluster_master_min_adv = 1;
config->ppp_restart_time = 3; config->ppp_restart_time = 3;
config->ppp_max_configure = 10; config->ppp_max_configure = 10;

View file

@ -1,5 +1,5 @@
// L2TPNS Global Stuff // L2TPNS Global Stuff
// $Id: l2tpns.h,v 1.86 2005-08-31 12:38:38 bodea Exp $ // $Id: l2tpns.h,v 1.87 2005-09-02 23:59:56 bodea Exp $
#ifndef __L2TPNS_H__ #ifndef __L2TPNS_H__
#define __L2TPNS_H__ #define __L2TPNS_H__
@ -570,6 +570,7 @@ typedef struct
int cluster_last_hb_ver; // Heartbeat version last seen from master int cluster_last_hb_ver; // Heartbeat version last seen from master
int cluster_num_changes; // Number of changes queued. int cluster_num_changes; // Number of changes queued.
int cluster_mcast_ttl; // TTL for multicast packets
int cluster_hb_interval; // How often to send a heartbeat. int cluster_hb_interval; // How often to send a heartbeat.
int cluster_hb_timeout; // How many missed heartbeats trigger an election. int cluster_hb_timeout; // How many missed heartbeats trigger an election.
uint64_t cluster_table_version; // # state changes processed by cluster uint64_t cluster_table_version; // # state changes processed by cluster