don't send interim records before session start (Daryl Tester)
authorBrendan O'Dea <bod@optus.net>
Mon, 18 Dec 2006 12:05:36 +0000 (12:05 +0000)
committerBrendan O'Dea <bod@optus.net>
Mon, 18 Dec 2006 12:05:36 +0000 (12:05 +0000)
Changes
l2tpns.c
l2tpns.spec

diff --git a/Changes b/Changes
index 0c6fc40..81a3337 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,4 +1,4 @@
-* Tue Dec 5 2006 Brendan O'Dea <bod@optus.net> 2.2.0
+* Mon Dec 18 2006 Brendan O'Dea <bod@optus.net> 2.2.0
 - Only poll clifd if successfully bound.
 - Add "Practical VPNs" document from Liran Tal as Docs/vpn .
 - Add Multilink support from Khaled Al Hamwi.
@@ -14,6 +14,7 @@
   vendor-specific Ascend formats.
 - Security [CVE-2006-5873]: Rhys Kidd identified a vulnerability in the
   handling of heartbeat packets.  Drop oversize heartbeat packets.
+- Don't send interim records before session start (Daryl Tester).
 
 * Tue Apr 18 2006 Brendan O'Dea <bod@optus.net> 2.1.18
 - Don't shutdown on TerminateReq, wait for CDN.
index 454f79b..41f3dc9 100644 (file)
--- a/l2tpns.c
+++ b/l2tpns.c
@@ -4,7 +4,7 @@
 // Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
 // vim: sw=8 ts=8
 
-char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.171 2006-08-02 13:35:39 bodea Exp $";
+char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.172 2006-12-18 12:05:36 bodea Exp $";
 
 #include <arpa/inet.h>
 #include <assert.h>
@@ -3311,7 +3311,8 @@ static void regular_cleanups(double period)
                if (config->radius_accounting && config->radius_interim > 0
                    && session[s].ip && !session[s].walled_garden
                    && !sess_local[s].radius // RADIUS already in progress
-                   && time_now - sess_local[s].last_interim >= config->radius_interim)
+                   && time_now - sess_local[s].last_interim >= config->radius_interim
+                   && session[s].flags & SESSION_STARTED)
                {
                        int rad = radiusnew(s);
                        if (!rad)
index dc03660..021a848 100644 (file)
@@ -43,5 +43,5 @@ rm -rf %{buildroot}
 %attr(644,root,root) /usr/share/man/man[58]/*
 
 %changelog
-* Tue Dec 5 2006 Brendan O'Dea <bod@optus.net> 2.2.0-1
+* Mon Dec 18 2006 Brendan O'Dea <bod@optus.net> 2.2.0-1
 - 2.2.0 release, see /usr/share/doc/l2tpns-2.2.0/Changes