Update .last_packet in cluster_handle_bytes only when there have release_2_0_17
authorbodea <bodea>
Mon, 2 May 2005 09:03:26 +0000 (09:03 +0000)
committerbodea <bodea>
Mon, 2 May 2005 09:03:26 +0000 (09:03 +0000)
been bytes received from the modem (dead sessions were having the
idle timeout reset by stray packets).

Changes
cluster.c
l2tpns.spec

diff --git a/Changes b/Changes
index 924624a..4dfc1eb 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,10 @@
-* Fri Apr 1 2005 Brendan O'Dea <bod@optusnet.com.au> 2.0.17
+* Mon May 2 2005 Brendan O'Dea <bod@optusnet.com.au> 2.0.17
 - Only send RADIUS stop record in sessionshutdown when there's an ip address.
-- Reset .die on master takeover.
+- Reset .die on master takeover (so that dying sessions don't have to
+  hang around until the new master has the same uptime as the old one).
+- Update .last_packet in cluster_handle_bytes only when there have
+  been bytes received from the modem (dead sessions were having the
+  idle timeout reset by stray packets).
 
 * Mon Feb 14 2005 Brendan O'Dea <bod@optusnet.com.au> 2.0.16
 - Ensure that sessionkill is not called on an unopened session (borks
index abf5062..e3e7f01 100644 (file)
--- a/cluster.c
+++ b/cluster.c
@@ -1,6 +1,6 @@
 // L2TPNS Clustering Stuff
 
-char const *cvs_id_cluster = "$Id: cluster.c,v 1.26.2.4 2005/04/01 08:54:12 bodea Exp $";
+char const *cvs_id_cluster = "$Id: cluster.c,v 1.26.2.5 2005/05/02 09:03:27 bodea Exp $";
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -1031,7 +1031,9 @@ static int cluster_handle_bytes(char *data, int size)
 
                session[b->sid].cin += b->in;
                session[b->sid].cout += b->out;
-               session[b->sid].last_packet = time_now; // Reset idle timer!
+
+               if (b->in)
+                       session[b->sid].last_packet = time_now; // Reset idle timer!
 
                size -= sizeof(*b);
                ++b;
index c38ccd4..3ca85db 100644 (file)
@@ -43,5 +43,5 @@ rm -rf %{buildroot}
 %attr(644,root,root) /usr/share/man/man[58]/*
 
 %changelog
-* Fri Apr 1 2005 Brendan O'Dea <bod@optusnet.com.au> 2.0.17-1
+* Mon May 2 2005 Brendan O'Dea <bod@optusnet.com.au> 2.0.17-1
 - 2.0.17 release, see /usr/share/doc/l2tpns-2.0.17/Changes