summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-pppd/ctrl/sstp/sstp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/sstp/sstp.c b/accel-pppd/ctrl/sstp/sstp.c
index 29d13820..7574a789 100644
--- a/accel-pppd/ctrl/sstp/sstp.c
+++ b/accel-pppd/ctrl/sstp/sstp.c
@@ -2201,10 +2201,15 @@ static int sstp_connect(struct triton_md_handler_t *h)
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);