From 777899ba6972243236778b1078ee019a929617a4 Mon Sep 17 00:00:00 2001 From: bodea Date: Wed, 9 Feb 2005 00:45:34 +0000 Subject: [PATCH 1/1] off by one --- l2tpns.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/l2tpns.c b/l2tpns.c index f49586b..813f2c7 100644 --- 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.82 2005/02/09 00:16:17 bodea Exp $"; +char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.83 2005/02/09 00:45:34 bodea Exp $"; #include #include @@ -3134,7 +3134,7 @@ static void initdata(int optdebug, char *optconfig) memset(ip_address_pool, 0, sizeof(ippoolt) * MAXIPPOOL); // Put all the sessions on the free list marked as undefined. - for (i = 1; i < MAXSESSION - 1; i++) + for (i = 1; i < MAXSESSION; i++) { session[i].next = i + 1; session[i].tunnel = T_UNDEF; // mark it as not filled in. @@ -3143,7 +3143,7 @@ static void initdata(int optdebug, char *optconfig) sessionfree = 1; // Mark all the tunnels as undefined (waiting to be filled in by a download). - for (i = 1; i < MAXTUNNEL- 1; i++) + for (i = 1; i < MAXTUNNEL; i++) tunnel[i].state = TUNNELUNDEF; // mark it as not filled in. if (!*hostname) -- 2.20.1