summaryrefslogtreecommitdiff
path: root/accel-pppd/ppp/ppp.c
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2011-04-20 15:06:28 +0400
committerKozlov Dmitry <dima@server>2011-04-20 15:06:28 +0400
commitbbbe1fd4f5c91210a4246225aff7728fa58384f3 (patch)
tree82d89e181025b1d593a32202904c03f0312a4e4d /accel-pppd/ppp/ppp.c
parentd4f6b13bcfb5c6245d39f5a71db199bac5a0a26f (diff)
downloadaccel-ppp-bbbe1fd4f5c91210a4246225aff7728fa58384f3.tar.gz
accel-ppp-bbbe1fd4f5c91210a4246225aff7728fa58384f3.zip
ppp: introduced new option 'single-session' to control single session per user
Diffstat (limited to 'accel-pppd/ppp/ppp.c')
-rw-r--r--accel-pppd/ppp/ppp.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c
index a044d9a..5a4006c 100644
--- a/accel-pppd/ppp/ppp.c
+++ b/accel-pppd/ppp/ppp.c
@@ -25,7 +25,8 @@
#include "memdebug.h"
int __export conf_ppp_verbose;
-static int conf_sid_ucase;
+int conf_sid_ucase;
+int conf_single_session = -1;
pthread_rwlock_t __export ppp_lock = PTHREAD_RWLOCK_INITIALIZER;
__export LIST_HEAD(ppp_list);
@@ -640,6 +641,15 @@ static void load_config(void)
else if (strcmp(opt, "lower"))
log_emerg("ppp: sid-case: invalid format\n");
}
+
+ opt = conf_get_opt("ppp", "single-session");
+ if (opt) {
+ if (!strcmp(opt, "deny"))
+ conf_single_session = 0;
+ else if (!strcmp(opt, "replace"))
+ conf_single_session = 1;
+ } else
+ conf_single_session = -1;
}
static void __init init(void)