diff options
Diffstat (limited to 'accel-pptpd/ppp/ppp_auth.c')
-rw-r--r-- | accel-pptpd/ppp/ppp_auth.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/accel-pptpd/ppp/ppp_auth.c b/accel-pptpd/ppp/ppp_auth.c index 959dc2f9..c9934147 100644 --- a/accel-pptpd/ppp/ppp_auth.c +++ b/accel-pptpd/ppp/ppp_auth.c @@ -298,7 +298,7 @@ static void auth_layer_free(struct ppp_layer_data_t *ld) _free(ad); } -void __export auth_successed(struct ppp_t *ppp, char *username) +void __export ppp_auth_successed(struct ppp_t *ppp, char *username) { struct auth_layer_data_t *ad = container_of(ppp_find_layer_data(ppp, &auth_layer), typeof(*ad), ld); log_ppp_debug("auth_layer_started\n"); @@ -307,7 +307,7 @@ void __export auth_successed(struct ppp_t *ppp, char *username) triton_event_fire(EV_PPP_AUTHORIZED, ppp); } -void __export auth_failed(struct ppp_t *ppp) +void __export ppp_auth_failed(struct ppp_t *ppp) { ppp_terminate(ppp, TERM_AUTH_ERROR, 0); } @@ -318,6 +318,20 @@ int __export ppp_auth_register_handler(struct ppp_auth_handler_t *h) return 0; } +int __export ppp_auth_restart(struct ppp_t *ppp) +{ + struct auth_layer_data_t *ad = container_of(ppp_find_layer_data(ppp, &auth_layer), typeof(*ad), ld); + log_ppp_debug("ppp_auth_restart\n"); + + if (!ad->auth_opt.auth->h->restart) + return -1; + + if (ad->auth_opt.auth->h->restart(ppp, ad->auth_opt.auth)) + return -1; + + return 0; +} + static void __init ppp_auth_init() { ppp_register_layer("auth", &auth_layer); |