diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2020-03-07 04:25:00 +0500 |
---|---|---|
committer | Vladislav Grishenko <themiron@mail.ru> | 2020-03-07 04:31:11 +0500 |
commit | 6b04e5778c1c0c9686066dd44caccfd755917c25 (patch) | |
tree | b6cceaeba9dcdfe649976210329ae3e698b60e58 /accel-pppd/ctrl/pptp/pptp.c | |
parent | a76cfa750c2176b3156dcc65968aff8c90496de0 (diff) | |
download | accel-ppp-6b04e5778c1c0c9686066dd44caccfd755917c25.tar.gz accel-ppp-6b04e5778c1c0c9686066dd44caccfd755917c25.zip |
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.
Diffstat (limited to 'accel-pppd/ctrl/pptp/pptp.c')
-rw-r--r-- | accel-pppd/ctrl/pptp/pptp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c index fc5e83b8..3b90139f 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; |