summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/pptp/pptp.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ctrl/pptp/pptp.c')
-rw-r--r--accel-pppd/ctrl/pptp/pptp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c
index a5bcaca..a95fe8a 100644
--- a/accel-pppd/ctrl/pptp/pptp.c
+++ b/accel-pppd/ctrl/pptp/pptp.c
@@ -60,6 +60,7 @@ static int conf_timeout = 5;
static int conf_echo_interval = 0;
static int conf_echo_failure = 3;
static int conf_verbose = 0;
+static int conf_session_timeout;
static int conf_mppe = MPPE_UNSET;
static const char *conf_ip_pool;
static const char *conf_ipv6_pool;
@@ -721,6 +722,8 @@ static int pptp_connect(struct triton_md_handler_t *h)
conn->ppp.ses.dpv6_pool_name = _strdup(conf_dpv6_pool);
if (conf_ifname)
conn->ppp.ses.ifname_rename = _strdup(conf_ifname);
+ if (conf_session_timeout)
+ conn->ppp.ses.session_timeout = conf_session_timeout;
triton_context_register(&conn->ctx, &conn->ppp.ses);
triton_md_register_handler(&conn->ctx, &conn->hnd);
@@ -807,6 +810,12 @@ static void load_config(void)
conf_dpv6_pool = conf_get_opt("pptp", "ipv6-pool-delegate");
conf_ifname = conf_get_opt("pptp", "ifname");
+ opt = conf_get_opt("pptp", "session-timeout");
+ if (opt)
+ conf_session_timeout = atoi(opt);
+ else
+ conf_session_timeout = 0;
+
switch (iprange_check_activation()) {
case IPRANGE_DISABLED:
log_warn("pptp: iprange module disabled, improper IP configuration of PPP interfaces may cause kernel soft lockup\n");