Add PPPOE-SERVER functionality
This commit is contained in:
parent
ddffeb1ceb
commit
11996ba414
15 changed files with 1403 additions and 57 deletions
12
l2tplac.c
12
l2tplac.c
|
|
@ -1,7 +1,10 @@
|
|||
/*
|
||||
* Fernando ALVES 2013
|
||||
* Add functionality "LAC" to l2tpns.
|
||||
* Used to forward a ppp session to another "LNS".
|
||||
* GPL licenced
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
@ -11,6 +14,7 @@
|
|||
#include "cluster.h"
|
||||
|
||||
#include "l2tplac.h"
|
||||
#include "pppoe.h"
|
||||
|
||||
/* sequence diagram: Client <--> LAC <--> LNS1 <--> LNS2
|
||||
*
|
||||
|
|
@ -466,7 +470,7 @@ int lac_session_forward(uint8_t *buf, int len, sessionidt sess, uint16_t proto,
|
|||
|
||||
if ((!tunnel[t].isremotelns) && (!tunnel[session[sess].tunnel].isremotelns))
|
||||
{
|
||||
LOG(0, sess, session[sess].tunnel, "Link Tunnel Session (%u) broken\n", s);
|
||||
LOG(0, sess, session[sess].tunnel, "Link Tunnel Session (%u/%u) broken\n", s, t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -483,6 +487,12 @@ int lac_session_forward(uint8_t *buf, int len, sessionidt sess, uint16_t proto,
|
|||
}
|
||||
}
|
||||
|
||||
if (t == TUNNEL_ID_PPPOE)
|
||||
{
|
||||
pppoe_forwardto_session_pppoe(buf, len, sess, proto);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (*buf & 0x40)
|
||||
{ // length
|
||||
p += 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue