From 6b04e5778c1c0c9686066dd44caccfd755917c25 Mon Sep 17 00:00:00 2001 From: Vladislav Grishenko Date: Sat, 7 Mar 2020 04:25:00 +0500 Subject: session: add global [common]max-starting option usually there's no need to have per-proto limitation, since the need of max starting limitation affects the whole server, not particular protocol only. --- accel-pppd/ctrl/pptp/pptp.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'accel-pppd/ctrl/pptp') diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c index fc5e83b..3b90139 100644 --- a/accel-pppd/ctrl/pptp/pptp.c +++ b/accel-pppd/ctrl/pptp/pptp.c @@ -651,6 +651,11 @@ static int pptp_connect(struct triton_md_handler_t *h) continue; } + if (conf_max_starting && ap_session_stat.starting >= conf_max_starting) { + close(sock); + continue; + } + if (conf_max_sessions && ap_session_stat.active + ap_session_stat.starting >= conf_max_sessions) { close(sock); continue; -- cgit v1.2.3