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/pppoe | |
parent | a5f293d16c8b4a333fac31e187e0b5e55fd38335 (diff) | |
download | accel-ppp-8c608ea9a5b6b73520c11e3974bb8cad3b7da914.tar.gz accel-ppp-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/pppoe')
-rw-r--r-- | accel-pppd/ctrl/pppoe/pppoe.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c index 21051ed3..c254c7aa 100644 --- a/accel-pppd/ctrl/pppoe/pppoe.c +++ b/accel-pppd/ctrl/pppoe/pppoe.c @@ -89,6 +89,7 @@ char *conf_pado_delay; int conf_tr101 = 1; int conf_padi_limit = 0; int conf_mppe = MPPE_UNSET; +static const char *conf_ip_pool; static mempool_t conn_pool; static mempool_t pado_pool; @@ -299,6 +300,9 @@ static struct pppoe_conn_t *allocate_channel(struct pppoe_serv_t *serv, const ui conn->ppp.ses.ctrl = &conn->ctrl; conn->ppp.ses.chan_name = conn->ctrl.calling_station_id; + + if (conf_ip_pool) + conn->ppp.ses.ipv4_pool_name = _strdup(conf_ip_pool); triton_context_register(&conn->ctx, &conn->ppp.ses); triton_context_wakeup(&conn->ctx); @@ -1489,6 +1493,8 @@ static void load_config(void) else if (strcmp(opt, "require") == 0) conf_mppe = MPPE_REQUIRE; } + + conf_ip_pool = conf_get_opt("pppoe", "ip-pool"); } static void pppoe_init(void) |