From: Brendan O'Dea Date: Fri, 1 Apr 2005 08:46:03 +0000 (+0000) Subject: reset .die on master takeover X-Git-Tag: 2.2.1-2fdn3.1~19^2^2~1^2~226 X-Git-Url: http://git.sameswireless.fr/l2tpns.git/commitdiff_plain/d7fbaf8b70c18bbae1df3b990230d79be49f697f reset .die on master takeover --- diff --git a/Changes b/Changes index 17db24a..47dd20f 100644 --- a/Changes +++ b/Changes @@ -39,7 +39,8 @@ - Add result/error codes to CDN when shutting down sessions. Sends 2/7 (general error, try another LNS) when out of IP addresses, and 3 (adminstrative) for everything else (suggestion from Chris Gates). -- sessionshutdown: only send RADIUS stop when there's an ip address. +- Only send RADIUS stop record in sessionshutdown when there's an ip address. +- Reset .die on master takeover. * Fri Dec 17 2004 Brendan O'Dea 2.0.13 - Better cluster master collision resolution: keep a counter of state diff --git a/cluster.c b/cluster.c index ba0fe12..4f728fd 100644 --- a/cluster.c +++ b/cluster.c @@ -1,6 +1,6 @@ // L2TPNS Clustering Stuff -char const *cvs_id_cluster = "$Id: cluster.c,v 1.31 2005-02-14 06:58:38 bodea Exp $"; +char const *cvs_id_cluster = "$Id: cluster.c,v 1.32 2005-04-01 08:46:03 bodea Exp $"; #include #include @@ -580,9 +580,12 @@ void cluster_check_master(void) continue; } - // Reset all the idle timeouts.. + // Reset idle timeouts.. session[i].last_packet = time_now; + // Reset die relative to our uptime rather than the old master's + if (session[i].die) session[i].die = TIME; + // Accumulate un-sent byte counters. session[i].cin += sess_local[i].cin; session[i].cout += sess_local[i].cout;