fix LCP Echo frequency
This commit is contained in:
parent
cd516ef3fa
commit
4b3b34b994
4 changed files with 11 additions and 5 deletions
3
Changes
3
Changes
|
|
@ -1,5 +1,6 @@
|
||||||
* Wed Oct 12 2005 Brendan O'Dea <bod@optus.net> 2.1.10
|
* Tue Oct 18 2005 Brendan O'Dea <bod@optus.net> 2.1.10
|
||||||
- Add scripts/l2tpns-capture.
|
- Add scripts/l2tpns-capture.
|
||||||
|
- Fix LCP Echo frequency.
|
||||||
|
|
||||||
* Tue Oct 11 2005 Brendan O'Dea <bod@optus.net> 2.1.9
|
* Tue Oct 11 2005 Brendan O'Dea <bod@optus.net> 2.1.9
|
||||||
- Fix Calling-Station-Id in RADIUS accounting records (Slobodan Tomic).
|
- Fix Calling-Station-Id in RADIUS accounting records (Slobodan Tomic).
|
||||||
|
|
|
||||||
6
l2tpns.c
6
l2tpns.c
|
|
@ -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.144 2005-10-11 09:04:53 bodea Exp $";
|
char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.145 2005-10-18 07:19:28 bodea Exp $";
|
||||||
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
@ -2932,7 +2932,8 @@ static void regular_cleanups(double period)
|
||||||
}
|
}
|
||||||
|
|
||||||
// No data in ECHO_TIMEOUT seconds, send LCP ECHO
|
// No data in ECHO_TIMEOUT seconds, send LCP ECHO
|
||||||
if (session[s].ppp.phase >= Establish && (time_now - session[s].last_packet >= ECHO_TIMEOUT))
|
if (session[s].ppp.phase >= Establish && (time_now - session[s].last_packet >= ECHO_TIMEOUT) &&
|
||||||
|
(time_now - sess_local[s].last_echo >= ECHO_TIMEOUT))
|
||||||
{
|
{
|
||||||
uint8_t b[MAXETHER];
|
uint8_t b[MAXETHER];
|
||||||
|
|
||||||
|
|
@ -2947,6 +2948,7 @@ static void regular_cleanups(double period)
|
||||||
LOG(4, s, session[s].tunnel, "No data in %d seconds, sending LCP ECHO\n",
|
LOG(4, s, session[s].tunnel, "No data in %d seconds, sending LCP ECHO\n",
|
||||||
(int)(time_now - session[s].last_packet));
|
(int)(time_now - session[s].last_packet));
|
||||||
tunnelsend(b, 24, session[s].tunnel); // send it
|
tunnelsend(b, 24, session[s].tunnel); // send it
|
||||||
|
sess_local[s].last_echo = time_now;
|
||||||
s_actions++;
|
s_actions++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
5
l2tpns.h
5
l2tpns.h
|
|
@ -1,5 +1,5 @@
|
||||||
// L2TPNS Global Stuff
|
// L2TPNS Global Stuff
|
||||||
// $Id: l2tpns.h,v 1.95 2005-10-12 07:16:13 bodea Exp $
|
// $Id: l2tpns.h,v 1.96 2005-10-18 07:19:29 bodea Exp $
|
||||||
|
|
||||||
#ifndef __L2TPNS_H__
|
#ifndef __L2TPNS_H__
|
||||||
#define __L2TPNS_H__
|
#define __L2TPNS_H__
|
||||||
|
|
@ -307,6 +307,9 @@ typedef struct
|
||||||
|
|
||||||
// interim RADIUS
|
// interim RADIUS
|
||||||
time_t last_interim;
|
time_t last_interim;
|
||||||
|
|
||||||
|
// last LCP Echo
|
||||||
|
time_t last_echo;
|
||||||
} sessionlocalt;
|
} sessionlocalt;
|
||||||
|
|
||||||
#define SESSIONPFC 1 // PFC negotiated flags
|
#define SESSIONPFC 1 // PFC negotiated flags
|
||||||
|
|
|
||||||
|
|
@ -43,5 +43,5 @@ rm -rf %{buildroot}
|
||||||
%attr(644,root,root) /usr/share/man/man[58]/*
|
%attr(644,root,root) /usr/share/man/man[58]/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Oct 12 2005 Brendan O'Dea <bod@optus.net> 2.1.10-1
|
* Tue Oct 18 2005 Brendan O'Dea <bod@optus.net> 2.1.10-1
|
||||||
- 2.1.10 release, see /usr/share/doc/l2tpns-2.1.10/Changes
|
- 2.1.10 release, see /usr/share/doc/l2tpns-2.1.10/Changes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue