diff options
Diffstat (limited to 'accel-pppd/ctrl/sstp/sstp.c')
-rw-r--r-- | accel-pppd/ctrl/sstp/sstp.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/sstp/sstp.c b/accel-pppd/ctrl/sstp/sstp.c index 5bf8fd82..7574a789 100644 --- a/accel-pppd/ctrl/sstp/sstp.c +++ b/accel-pppd/ctrl/sstp/sstp.c @@ -2196,10 +2196,20 @@ static int sstp_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; + } + ip = conf_proxyproto ? INADDR_ANY : sockaddr_ipv4(&addr); if (ip && triton_module_loaded("connlimit") && connlimit_check(cl_key_from_ipv4(ip))) { close(sock); - return 0; + continue; } sockaddr_ntop(&addr, addr_buf, sizeof(addr_buf), 0); |