From 961bdeb07319c590d2c15d4186f12067644d94f7 Mon Sep 17 00:00:00 2001 From: Dmitriy Eshenko Date: Thu, 4 Aug 2022 13:57:20 +0300 Subject: sstp: T69: Add timer befor context wakeup to preevent segfault --- accel-pppd/ctrl/sstp/sstp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel-pppd/ctrl/sstp/sstp.c b/accel-pppd/ctrl/sstp/sstp.c index f17db433..40c6ad91 100644 --- a/accel-pppd/ctrl/sstp/sstp.c +++ b/accel-pppd/ctrl/sstp/sstp.c @@ -2415,12 +2415,12 @@ static int sstp_connect(struct triton_md_handler_t *h) triton_context_register(&conn->ctx, &conn->ppp.ses); triton_context_call(&conn->ctx, (triton_event_func)sstp_start, conn); + triton_timer_add(&conn->ctx, &conn->timeout_timer, 0); triton_context_wakeup(&conn->ctx); - __sync_add_and_fetch(&stat_starting, 1); triton_event_fire(EV_CTRL_STARTING, &conn->ppp.ses); - triton_timer_add(&conn->ctx, &conn->timeout_timer, 0); + __sync_add_and_fetch(&stat_starting, 1); } return 0; -- cgit v1.2.3