From 54f225b10ddd13ad4a7e3e5359fdbd2bf927d130 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Mon, 5 Feb 2018 21:29:47 +0300 Subject: pppd_compat: call ip-down even if ip-up is not specified --- accel-pppd/extra/pppd_compat.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/accel-pppd/extra/pppd_compat.c b/accel-pppd/extra/pppd_compat.c index 8a4f3ac..2db2440 100644 --- a/accel-pppd/extra/pppd_compat.c +++ b/accel-pppd/extra/pppd_compat.c @@ -286,12 +286,13 @@ static void ev_ses_started(struct ap_session *ses) char peer_ipaddr[17]; struct pppd_compat_pd *pd; - if (!conf_ip_up) + pd = find_pd(ses); + if (!pd) return; - pd = find_pd(ses); + pd->started = 1; - if (!pd) + if (!conf_ip_up) return; argv[4] = ipaddr; @@ -320,8 +321,6 @@ static void ev_ses_started(struct ap_session *ses) _exit(EXIT_FAILURE); } else log_error("pppd_compat: fork: %s\n", strerror(errno)); - - pd->started = 1; } static void ev_ses_finished(struct ap_session *ses) -- cgit v1.2.3