diff options
Diffstat (limited to 'accel-pppd/ctrl/l2tp/l2tp.c')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index e6fae4de..e14bab85 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -67,6 +67,7 @@ static size_t conf_secret_len = 0; static int conf_mppe = MPPE_UNSET; static int conf_dataseq = L2TP_DATASEQ_ALLOW; static int conf_reorder_timeout = 0; +static const char *conf_ip_pool; static unsigned int stat_active; static unsigned int stat_starting; @@ -905,6 +906,9 @@ static struct l2tp_sess_t *l2tp_tunnel_alloc_session(struct l2tp_conn_t *conn) sess->ppp.ses.ctrl = &sess->ctrl; sess->ppp.fd = -1; + if (conf_ip_pool) + sess->ppp.ses.ipv4_pool_name = _strdup(conf_ip_pool); + return sess; } @@ -3963,6 +3967,8 @@ static void load_config(void) else if (strcmp(opt, "require") == 0) conf_mppe = MPPE_REQUIRE; } + + conf_ip_pool = conf_get_opt("l2tp", "ip-pool"); } static void l2tp_init(void) |