summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/ipoe
diff options
context:
space:
mode:
authorVladislav Grishenko <themiron@mail.ru>2020-03-07 03:57:03 +0500
committerVladislav Grishenko <themiron@mail.ru>2020-03-07 03:57:03 +0500
commita76cfa750c2176b3156dcc65968aff8c90496de0 (patch)
treeb763e8ae70ed64b9328404b21e987de7f83317b2 /accel-pppd/ctrl/ipoe
parent20600ea832aef9fb03841f22d0ce37452915fa64 (diff)
downloadaccel-ppp-a76cfa750c2176b3156dcc65968aff8c90496de0.tar.gz
accel-ppp-a76cfa750c2176b3156dcc65968aff8c90496de0.zip
Revert "ipoe,pptp: introduced max-starting option (limit number of starting sessions)"
This reverts commit 02008c74a19c538ff7d9ce643c8cd4c738886196.
Diffstat (limited to 'accel-pppd/ctrl/ipoe')
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index b1504a2..17e437d 100644
--- a/accel-pppd/ctrl/ipoe/ipoe.c
+++ b/accel-pppd/ctrl/ipoe/ipoe.c
@@ -127,7 +127,6 @@ static int conf_username;
static const char *conf_password;
static int conf_unit_cache;
static int conf_noauth;
-static int conf_max_starting;
#ifdef RADIUS
static int conf_vendor;
static const char *conf_vendor_str;
@@ -1772,10 +1771,7 @@ static void __ipoe_recv_dhcpv4(struct dhcpv4_serv *dhcpv4, struct dhcpv4_packet
if (connlimit_loaded && pack->msg_type == DHCPDISCOVER && connlimit_check(serv->opt_shared ? cl_key_from_mac(pack->hdr->chaddr) : serv->ifindex))
return;
- if (conf_max_starting > 0 && pack->msg_type == DHCPDISCOVER && stat_starting > conf_max_starting) {
- log_warn("ipoe: Count of starting sessions > conf_max_starting, droping connection...\n");
- return;
- }
+
pthread_mutex_lock(&serv->lock);
if (pack->msg_type == DHCPDISCOVER) {
if (check_notify(serv, pack))
@@ -2031,10 +2027,7 @@ static struct ipoe_session *ipoe_session_create_up(struct ipoe_serv *serv, struc
if (connlimit_loaded && connlimit_check(cl_key_from_ipv4(saddr)))
return NULL;
- if (conf_max_starting > 0 && stat_starting > conf_max_starting) {
- log_warn("ipoe: Count of starting sessions > conf_max_starting, droping connection...\n");
- return NULL;
- }
+
if (conf_max_sessions && ap_session_stat.active + ap_session_stat.starting >= conf_max_sessions)
return NULL;
@@ -3745,11 +3738,6 @@ static void load_config(void)
conf_password = opt;
} else
conf_password = NULL;
- opt = conf_get_opt("ipoe", "max-starting");
- if (opt)
- conf_max_starting = atoi(opt);
- else
- conf_max_starting = 0;
opt = conf_get_opt("ipoe", "netmask");
if (opt) {