From: bodea Date: Wed, 9 Feb 2005 00:45:34 +0000 (+0000) Subject: off by one X-Git-Tag: release_2_1_0~74 X-Git-Url: http://git.sameswireless.fr/l2tpns.git/commitdiff_plain/777899ba6972243236778b1078ee019a929617a4?ds=inline;hp=46ec025f156b16cf4bd65270680ffb69313aea18 off by one --- 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)