// L2TPNS PPP Stuff
-char const *cvs_id_ppp = "$Id: ppp.c,v 1.77 2005-08-29 06:17:53 bodea Exp $";
+char const *cvs_id_ppp = "$Id: ppp.c,v 1.79 2005-08-31 12:41:09 bodea Exp $";
#include <stdio.h>
#include <string.h>
if (session[s].ip || !(r = radiusnew(s)))
{
// respond now, either no RADIUS available or already authenticated
- uint8_t b[MAXCONTROL];
+ uint8_t b[MAXETHER];
uint8_t id = p[1];
uint8_t *p = makeppp(b, sizeof(b), 0, 0, s, t, PPPPAP);
if (!p) return;
// Process LCP messages
void processlcp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
{
- uint8_t b[MAXCONTROL];
+ uint8_t b[MAXETHER];
uint8_t *q = NULL;
uint32_t magicno = 0;
uint16_t hl;
{
// Ignore it, last_packet time is set earlier than this.
}
- else
+ else if (*p != CodeRej)
{
int code = *p;
int mru = session[s].mru;
// Process IPCP messages
void processipcp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
{
- uint8_t b[MAXCONTROL];
+ uint8_t b[MAXETHER];
uint8_t *q = 0;
uint16_t hl;
tunnelsend(b, l + (q - b), t);
change_state(s, ipcp, Stopped);
}
- else
+ else if (*p != CodeRej)
{
int code = *p;
int mru = session[s].mru;
// Process IPV6CP messages
void processipv6cp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
{
- uint8_t b[MAXCONTROL];
+ uint8_t b[MAXETHER];
uint8_t *q = 0;
uint16_t hl;
tunnelsend(b, l + (q - b), t);
change_state(s, ipv6cp, Stopped);
}
- else
+ else if (*p != CodeRej)
{
int code = *p;
int mru = session[s].mru;
// Process CCP messages
void processccp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
{
- uint8_t b[MAXCONTROL];
+ uint8_t b[MAXETHER];
uint8_t *q;
CSTAT(processccp);
tunnelsend(b, l + (q - b), t);
change_state(s, ccp, Stopped);
}
- else
+ else if (*p != CodeRej)
{
int code = *p;
int mru = session[s].mru;
// send a CHAP challenge
void sendchap(sessionidt s, tunnelidt t)
{
- uint8_t b[MAXCONTROL];
+ uint8_t b[MAXETHER];
uint16_t r;
uint8_t *q;