projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update plugin docs
[l2tpns.git]
/
ppp.c
diff --git
a/ppp.c
b/ppp.c
index
38eb7ae
..
0d3b168
100644
(file)
--- a/
ppp.c
+++ b/
ppp.c
@@
-1,6
+1,6
@@
// L2TPNS PPP Stuff
// L2TPNS PPP Stuff
-char const *cvs_id_ppp = "$Id: ppp.c,v 1.6
2 2005-06-02 11:32:31
bodea Exp $";
+char const *cvs_id_ppp = "$Id: ppp.c,v 1.6
4 2005-06-24 08:34:53
bodea Exp $";
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
@@
-718,22
+718,32
@@
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)
- {
- if (!r)
- r = radiusnew(s);
- if (r)
- radiussend(r, RADIUSSTART); // send radius start, having got IPCP at last
- }
+
+ // ignore duplicate ACKs
+ if (session[s].flags & SF_IPCP_ACKED)
+ return;
+
+ // happy with our IPCP
session[s].flags |= SF_IPCP_ACKED;
LOG(3, s, t, "IPCP Acked, session is now active\n");
session[s].flags |= SF_IPCP_ACKED;
LOG(3, s, t, "IPCP Acked, session is now active\n");
- // clear LCP_ACKED/CCP_ACKED flag for possible fast renegotiaion for routers
+ // clear LCP_ACKED/CCP_ACKED flag for possible fast renegotia
t
ion 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;
}
if (*p != ConfigReq)
return;
}
if (*p != ConfigReq)