diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2013-10-03 11:08:45 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2013-10-03 11:08:45 +0400 |
commit | 8c608ea9a5b6b73520c11e3974bb8cad3b7da914 (patch) | |
tree | d6ebed20aa2225da869983807dc655e8788b2ca2 /accel-pppd/ctrl/l2tp | |
parent | a5f293d16c8b4a333fac31e187e0b5e55fd38335 (diff) | |
download | accel-ppp-xebd-8c608ea9a5b6b73520c11e3974bb8cad3b7da914.tar.gz accel-ppp-xebd-8c608ea9a5b6b73520c11e3974bb8cad3b7da914.zip |
Introduce per-ctrl 'ip-pool' option to be used as default IP pool name which may be overrided by radius
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
Diffstat (limited to 'accel-pppd/ctrl/l2tp')
-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 e6fae4d..e14bab8 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) |