X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/ddffeb1ceb781cfb17ca83e846de835ffd4bda54..11996ba4147678c1d400dcc16e33d83a9a3ede9c:/l2tplac.c diff --git a/l2tplac.c b/l2tplac.c index 281bbc4..6ad4683 100644 --- a/l2tplac.c +++ b/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 #include @@ -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;