From 9534b6695a4ce3f816d77df73e5d9ec85a0bca59 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Tue, 3 Apr 2018 17:05:49 +0300 Subject: ppp: move call connect_ppp_channel to appropriate place (when noauth=1) --- accel-pppd/ppp/ppp_auth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/accel-pppd/ppp/ppp_auth.c b/accel-pppd/ppp/ppp_auth.c index 0eaac35..5924899 100644 --- a/accel-pppd/ppp/ppp_auth.c +++ b/accel-pppd/ppp/ppp_auth.c @@ -84,11 +84,8 @@ static struct lcp_option_t *auth_init(struct ppp_lcp_t *lcp) INIT_LIST_HEAD(&ad->auth_opt.auth_list); - if (conf_noauth) { - if (connect_ppp_channel(lcp->ppp)) - return NULL; + if (conf_noauth) return &ad->auth_opt.opt; - } list_for_each_entry(h, &auth_handlers, entry) { d = h->init(lcp->ppp); @@ -286,6 +283,9 @@ static int auth_layer_start(struct ppp_layer_data_t *ld) log_ppp_debug("auth_layer_start\n"); + if (conf_noauth && connect_ppp_channel(ad->ppp)) + return -1; + if (ad->auth_opt.auth) { ad->auth_opt.started = 1; ad->auth_opt.auth->h->start(ad->ppp, ad->auth_opt.auth); -- cgit v1.2.3