increase size of PPP buffers to MAXETHER
This commit is contained in:
parent
3646374c82
commit
b70e7cef20
4 changed files with 17 additions and 16 deletions
1
Changes
1
Changes
|
|
@ -1,5 +1,6 @@
|
||||||
* Wed Aug 31 2005 Brendan O'Dea <bod@optus.net> 2.1.5
|
* Wed Aug 31 2005 Brendan O'Dea <bod@optus.net> 2.1.5
|
||||||
- Avoid Code-Reject loop.
|
- Avoid Code-Reject loop.
|
||||||
|
- Increase size of PPP buffers to MAXETHER.
|
||||||
|
|
||||||
* Mon Aug 29 2005 Brendan O'Dea <bod@optus.net> 2.1.4
|
* Mon Aug 29 2005 Brendan O'Dea <bod@optus.net> 2.1.4
|
||||||
- Drop level of "Unexpected CHAP message" log.
|
- Drop level of "Unexpected CHAP message" log.
|
||||||
|
|
|
||||||
12
l2tpns.c
12
l2tpns.c
|
|
@ -4,7 +4,7 @@
|
||||||
// Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
|
// Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
|
||||||
// vim: sw=8 ts=8
|
// vim: sw=8 ts=8
|
||||||
|
|
||||||
char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.125 2005/08/29 11:24:31 bodea Exp $";
|
char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.126 2005/08/31 12:41:09 bodea Exp $";
|
||||||
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
@ -1580,7 +1580,7 @@ void sessionshutdown(sessionidt s, char *reason, int result, int error)
|
||||||
|
|
||||||
void sendipcp(sessionidt s, tunnelidt t)
|
void sendipcp(sessionidt s, tunnelidt t)
|
||||||
{
|
{
|
||||||
uint8_t buf[MAXCONTROL];
|
uint8_t buf[MAXETHER];
|
||||||
uint8_t *q;
|
uint8_t *q;
|
||||||
|
|
||||||
CSTAT(sendipcp);
|
CSTAT(sendipcp);
|
||||||
|
|
@ -1592,7 +1592,7 @@ void sendipcp(sessionidt s, tunnelidt t)
|
||||||
session[s].unique_id = last_id;
|
session[s].unique_id = last_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
q = makeppp(buf,sizeof(buf), 0, 0, s, t, PPPIPCP);
|
q = makeppp(buf, sizeof(buf), 0, 0, s, t, PPPIPCP);
|
||||||
if (!q) return;
|
if (!q) return;
|
||||||
|
|
||||||
*q = ConfigReq;
|
*q = ConfigReq;
|
||||||
|
|
@ -1609,13 +1609,13 @@ void sendipcp(sessionidt s, tunnelidt t)
|
||||||
|
|
||||||
void sendipv6cp(sessionidt s, tunnelidt t)
|
void sendipv6cp(sessionidt s, tunnelidt t)
|
||||||
{
|
{
|
||||||
uint8_t buf[MAXCONTROL];
|
uint8_t buf[MAXETHER];
|
||||||
uint8_t *q;
|
uint8_t *q;
|
||||||
|
|
||||||
CSTAT(sendipv6cp);
|
CSTAT(sendipv6cp);
|
||||||
LOG(3, s, t, "IPV6CP: send ConfigReq\n");
|
LOG(3, s, t, "IPV6CP: send ConfigReq\n");
|
||||||
|
|
||||||
q = makeppp(buf,sizeof(buf), 0, 0, s, t, PPPIPV6CP);
|
q = makeppp(buf, sizeof(buf), 0, 0, s, t, PPPIPV6CP);
|
||||||
if (!q) return;
|
if (!q) return;
|
||||||
|
|
||||||
*q = ConfigReq;
|
*q = ConfigReq;
|
||||||
|
|
@ -2833,7 +2833,7 @@ static void regular_cleanups(double period)
|
||||||
// No data in ECHO_TIMEOUT seconds, send LCP ECHO
|
// No data in ECHO_TIMEOUT seconds, send LCP ECHO
|
||||||
if (session[s].ppp.phase >= Establish && (time_now - session[s].last_packet >= ECHO_TIMEOUT))
|
if (session[s].ppp.phase >= Establish && (time_now - session[s].last_packet >= ECHO_TIMEOUT))
|
||||||
{
|
{
|
||||||
uint8_t b[MAXCONTROL] = {0};
|
uint8_t b[MAXETHER];
|
||||||
|
|
||||||
uint8_t *q = makeppp(b, sizeof(b), 0, 0, s, session[s].tunnel, PPPLCP);
|
uint8_t *q = makeppp(b, sizeof(b), 0, 0, s, session[s].tunnel, PPPLCP);
|
||||||
if (!q) continue;
|
if (!q) continue;
|
||||||
|
|
|
||||||
16
ppp.c
16
ppp.c
|
|
@ -1,6 +1,6 @@
|
||||||
// L2TPNS PPP Stuff
|
// L2TPNS PPP Stuff
|
||||||
|
|
||||||
char const *cvs_id_ppp = "$Id: ppp.c,v 1.78 2005/08/31 12:38:38 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 <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
@ -88,7 +88,7 @@ void processpap(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
|
||||||
if (session[s].ip || !(r = radiusnew(s)))
|
if (session[s].ip || !(r = radiusnew(s)))
|
||||||
{
|
{
|
||||||
// respond now, either no RADIUS available or already authenticated
|
// respond now, either no RADIUS available or already authenticated
|
||||||
uint8_t b[MAXCONTROL];
|
uint8_t b[MAXETHER];
|
||||||
uint8_t id = p[1];
|
uint8_t id = p[1];
|
||||||
uint8_t *p = makeppp(b, sizeof(b), 0, 0, s, t, PPPPAP);
|
uint8_t *p = makeppp(b, sizeof(b), 0, 0, s, t, PPPPAP);
|
||||||
if (!p) return;
|
if (!p) return;
|
||||||
|
|
@ -447,7 +447,7 @@ static uint8_t *ppp_nak(sessionidt s, uint8_t *buf, size_t blen, uint16_t mtype,
|
||||||
// Process LCP messages
|
// Process LCP messages
|
||||||
void processlcp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
|
void processlcp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
|
||||||
{
|
{
|
||||||
uint8_t b[MAXCONTROL];
|
uint8_t b[MAXETHER];
|
||||||
uint8_t *q = NULL;
|
uint8_t *q = NULL;
|
||||||
uint32_t magicno = 0;
|
uint32_t magicno = 0;
|
||||||
uint16_t hl;
|
uint16_t hl;
|
||||||
|
|
@ -911,7 +911,7 @@ static void ipcp_open(sessionidt s, tunnelidt t)
|
||||||
// Process IPCP messages
|
// Process IPCP messages
|
||||||
void processipcp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
|
void processipcp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
|
||||||
{
|
{
|
||||||
uint8_t b[MAXCONTROL];
|
uint8_t b[MAXETHER];
|
||||||
uint8_t *q = 0;
|
uint8_t *q = 0;
|
||||||
uint16_t hl;
|
uint16_t hl;
|
||||||
|
|
||||||
|
|
@ -1143,7 +1143,7 @@ static void ipv6cp_open(sessionidt s, tunnelidt t)
|
||||||
// Process IPV6CP messages
|
// Process IPV6CP messages
|
||||||
void processipv6cp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
|
void processipv6cp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
|
||||||
{
|
{
|
||||||
uint8_t b[MAXCONTROL];
|
uint8_t b[MAXETHER];
|
||||||
uint8_t *q = 0;
|
uint8_t *q = 0;
|
||||||
uint16_t hl;
|
uint16_t hl;
|
||||||
|
|
||||||
|
|
@ -1575,7 +1575,7 @@ void send_ipin(sessionidt s, uint8_t *buf, int len)
|
||||||
// Process CCP messages
|
// Process CCP messages
|
||||||
void processccp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
|
void processccp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
|
||||||
{
|
{
|
||||||
uint8_t b[MAXCONTROL];
|
uint8_t b[MAXETHER];
|
||||||
uint8_t *q;
|
uint8_t *q;
|
||||||
|
|
||||||
CSTAT(processccp);
|
CSTAT(processccp);
|
||||||
|
|
@ -1627,7 +1627,7 @@ void processccp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
|
||||||
else // compression requested--reject
|
else // compression requested--reject
|
||||||
*p = ConfigRej;
|
*p = ConfigRej;
|
||||||
|
|
||||||
q = makeppp(b,sizeof(b), p, l, s, t, PPPCCP);
|
q = makeppp(b, sizeof(b), p, l, s, t, PPPCCP);
|
||||||
if (!q) return;
|
if (!q) return;
|
||||||
|
|
||||||
switch (session[s].ppp.ccp)
|
switch (session[s].ppp.ccp)
|
||||||
|
|
@ -1713,7 +1713,7 @@ void processccp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
|
||||||
// send a CHAP challenge
|
// send a CHAP challenge
|
||||||
void sendchap(sessionidt s, tunnelidt t)
|
void sendchap(sessionidt s, tunnelidt t)
|
||||||
{
|
{
|
||||||
uint8_t b[MAXCONTROL];
|
uint8_t b[MAXETHER];
|
||||||
uint16_t r;
|
uint16_t r;
|
||||||
uint8_t *q;
|
uint8_t *q;
|
||||||
|
|
||||||
|
|
|
||||||
4
radius.c
4
radius.c
|
|
@ -1,6 +1,6 @@
|
||||||
// L2TPNS Radius Stuff
|
// L2TPNS Radius Stuff
|
||||||
|
|
||||||
char const *cvs_id_radius = "$Id: radius.c,v 1.40 2005/08/12 13:48:19 bodea Exp $";
|
char const *cvs_id_radius = "$Id: radius.c,v 1.41 2005/08/31 12:41:09 bodea Exp $";
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
@ -414,7 +414,7 @@ static void handle_avpair(sessionidt s, uint8_t *avp, int len)
|
||||||
// process RADIUS response
|
// process RADIUS response
|
||||||
void processrad(uint8_t *buf, int len, char socket_index)
|
void processrad(uint8_t *buf, int len, char socket_index)
|
||||||
{
|
{
|
||||||
uint8_t b[MAXCONTROL];
|
uint8_t b[MAXETHER];
|
||||||
MD5_CTX ctx;
|
MD5_CTX ctx;
|
||||||
uint16_t r;
|
uint16_t r;
|
||||||
sessionidt s;
|
sessionidt s;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue