X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/82248353c8fd7322e39e475f73d18db2536a71fe..80308e88382d69baa14cef9b05b72d70263ec79a:/ppp.c diff --git a/ppp.c b/ppp.c index 1207b3c..ad84be4 100644 --- a/ppp.c +++ b/ppp.c @@ -1,6 +1,6 @@ // L2TPNS PPP Stuff -char const *cvs_id_ppp = "$Id: ppp.c,v 1.29 2004-11-25 12:41:35 bodea Exp $"; +char const *cvs_id_ppp = "$Id: ppp.c,v 1.32 2004-11-28 20:10:04 bodea Exp $"; #include #include @@ -21,7 +21,7 @@ extern int tunfd; extern char hostname[]; extern u32 eth_tx; extern time_t time_now; -extern struct configt *config; +extern configt *config; static void initccp(tunnelidt t, sessionidt s); @@ -719,6 +719,10 @@ void processipin(tunnelidt t, sessionidt s, u8 *p, u16 l) return; } + // run access-list if any + if (session[s].filter_in && !ip_filter(p, l, session[s].filter_in - 1)) + return; + // Add on the tun header p -= 4; *(u32 *)p = htonl(0x00000800); @@ -824,7 +828,7 @@ void processccp(tunnelidt t, sessionidt s, u8 *p, u16 l) // send CCP request for no compression for our end if not negotiated if (!(session[s].flags & SF_CCP_ACKED)) - initccp(); + initccp(t, s); break; @@ -962,7 +966,7 @@ void initlcp(tunnelidt t, sessionidt s) } // Send CCP request for no compression -static void sendccp(tunnelidt t, sessionidt s) +static void initccp(tunnelidt t, sessionidt s) { char b[500], *q;