diff options
| author | xebd <xeb@mail.ru> | 2022-06-23 12:16:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-23 12:16:57 +0300 |
| commit | 847ccb49a7e0958d778fc772a266a0f8695f591c (patch) | |
| tree | acccbe5fa1720821a5c9d523346a16743ae78998 /accel-pppd/ctrl/pppoe | |
| parent | 3c95746caceeebe38c3640ba8986d7b0c8eb7b91 (diff) | |
| parent | e489ddac3840bf66eaa30474dbe4e9a2a2444d75 (diff) | |
| download | accel-ppp-847ccb49a7e0958d778fc772a266a0f8695f591c.tar.gz accel-ppp-847ccb49a7e0958d778fc772a266a0f8695f591c.zip | |
Merge pull request #48 from DmitriyEshenko/master-08042022
T60: Implement configurable session-timeout param for all connection …
Diffstat (limited to 'accel-pppd/ctrl/pppoe')
| -rw-r--r-- | accel-pppd/ctrl/pppoe/pppoe.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c index 415dd7c0..43163f16 100644 --- a/accel-pppd/ctrl/pppoe/pppoe.c +++ b/accel-pppd/ctrl/pppoe/pppoe.c @@ -127,6 +127,7 @@ unsigned long stat_filtered; pthread_rwlock_t serv_lock = PTHREAD_RWLOCK_INITIALIZER; LIST_HEAD(serv_list); static int connlimit_loaded; +static int conf_session_timeout; static pthread_mutex_t sid_lock = PTHREAD_MUTEX_INITIALIZER; static unsigned long *sid_map; @@ -417,6 +418,8 @@ static struct pppoe_conn_t *allocate_channel(struct pppoe_serv_t *serv, const ui 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); @@ -2027,6 +2030,11 @@ static void load_config(void) else conf_cookie_timeout = 5; + opt = conf_get_opt("pppoe", "session-timeout"); + if (opt) + conf_session_timeout = atoi(opt); + else + conf_session_timeout = 0; conf_mppe = MPPE_UNSET; opt = conf_get_opt("pppoe", "mppe"); |
