From e4b4e0eef7fe04f7c202177cee82aa5ed4829387 Mon Sep 17 00:00:00 2001 From: François Cachereul Date: Tue, 27 Jan 2015 12:07:01 +0100 Subject: ppp: create ppp units after authentication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avaid allocating a ppp unit when authentication failed Split establish_ppp in two functions estabish_ppp and connect_ppp_channel. The fist one connect the channel on an instance of /dev/ppp, allocate channel resources and start first ppp layer. The second functions create ppp unit and connect the channel to this unit. It is called after authentication. destablish_ppp is also split in two function for symmetry and ppp_terminate is adapted to handle the case when the unit is not created. Signed-off-by: François Cachereul --- accel-pppd/ppp/ppp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'accel-pppd/ppp/ppp.h') diff --git a/accel-pppd/ppp/ppp.h b/accel-pppd/ppp/ppp.h index 759e114..dfceacc 100644 --- a/accel-pppd/ppp/ppp.h +++ b/accel-pppd/ppp/ppp.h @@ -96,6 +96,7 @@ struct ppp_handler_t void ppp_init(struct ppp_t *ppp); int establish_ppp(struct ppp_t *ppp); +int connect_ppp_channel(struct ppp_t *ppp); int ppp_chan_send(struct ppp_t *ppp, void *data, int size); int ppp_unit_send(struct ppp_t *ppp, void *data, int size); void lcp_send_proto_rej(struct ppp_t *ppp, uint16_t proto); -- cgit v1.2.3