Ignore duplicate ACKs for IPCP

Clear RADIUSIPCP for walled garden sessions on ACK
This commit is contained in:
Brendan O'Dea 2005-06-24 08:34:53 +00:00
parent 39071c8ab5
commit b84d4f934a
2 changed files with 21 additions and 9 deletions

View file

@ -1,5 +1,7 @@
* Fri Jun 24 2005 Brendan O'Dea <bod@optus.net> 2.1.2 * Fri Jun 24 2005 Brendan O'Dea <bod@optus.net> 2.1.2
- Don't resend IPCP while still in progress. - Don't resend IPCP while still in progress.
- Ignore duplicate ACKs for IPCP.
- Clear RADIUSIPCP for walled garden sessions on ACK.
* Tue Jun 14 2005 Brendan O'Dea <bod@optusnet.com.au> 2.1.1 * Tue Jun 14 2005 Brendan O'Dea <bod@optusnet.com.au> 2.1.1
- Add missing newline to backtrace macro. - Add missing newline to backtrace macro.

28
ppp.c
View file

@ -1,6 +1,6 @@
// L2TPNS PPP Stuff // L2TPNS PPP Stuff
char const *cvs_id_ppp = "$Id: ppp.c,v 1.63 2005-06-24 06:59:06 bodea Exp $"; char const *cvs_id_ppp = "$Id: ppp.c,v 1.64 2005-06-24 08:34:53 bodea Exp $";
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -718,15 +718,13 @@ void processipcp(tunnelidt t, sessionidt s, uint8_t *p, uint16_t l)
if (*p == ConfigAck) if (*p == ConfigAck)
{ {
// happy with our IPCP
uint16_t r = sess_local[s].radius; uint16_t r = sess_local[s].radius;
if ((!r || radius[r].state == RADIUSIPCP) && !session[s].walled_garden)
{ // ignore duplicate ACKs
if (!r) if (session[s].flags & SF_IPCP_ACKED)
r = radiusnew(s); return;
if (r)
radiussend(r, RADIUSSTART); // send radius start, having got IPCP at last // happy with our IPCP
}
session[s].flags |= SF_IPCP_ACKED; session[s].flags |= SF_IPCP_ACKED;
LOG(3, s, t, "IPCP Acked, session is now active\n"); LOG(3, s, t, "IPCP Acked, session is now active\n");
@ -734,6 +732,18 @@ void processipcp(tunnelidt t, sessionidt s, uint8_t *p, uint16_t l)
// clear LCP_ACKED/CCP_ACKED flag for possible fast renegotiation for routers // clear LCP_ACKED/CCP_ACKED flag for possible fast renegotiation for routers
session[s].flags &= ~(SF_LCP_ACKED|SF_CCP_ACKED); session[s].flags &= ~(SF_LCP_ACKED|SF_CCP_ACKED);
if (r && session[s].walled_garden)
{
radiusclear(r, s);
return;
}
if (!r)
r = radiusnew(s);
if (r)
radiussend(r, RADIUSSTART); // send radius start, having got IPCP at last
return; return;
} }
if (*p != ConfigReq) if (*p != ConfigReq)