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/l2tp | |
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/l2tp')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index 0d1ca21..2467189 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -2761,6 +2761,9 @@ static int l2tp_recv_SCCRQ(const struct l2tp_serv_t *serv, return 0; } + if (conf_max_starting && ap_session_stat.starting >= conf_max_starting) + return 0; + if (conf_max_sessions && ap_session_stat.active + ap_session_stat.starting >= conf_max_sessions) return 0; @@ -3300,6 +3303,9 @@ static int l2tp_recv_ICRQ(struct l2tp_conn_t *conn, return 0; } + if (conf_max_starting && ap_session_stat.starting >= conf_max_starting) + return 0; + if (conf_max_sessions && ap_session_stat.active + ap_session_stat.starting >= conf_max_sessions) return 0; @@ -3603,6 +3609,9 @@ static int l2tp_recv_OCRQ(struct l2tp_conn_t *conn, return 0; } + if (conf_max_starting && ap_session_stat.starting >= conf_max_starting) + return 0; + if (conf_max_sessions && ap_session_stat.active + ap_session_stat.starting >= conf_max_sessions) return 0; |