diff options
| author | Kozlov Dmitry <xeb@mail.ru> | 2012-07-30 10:42:15 +0400 |
|---|---|---|
| committer | Kozlov Dmitry <xeb@mail.ru> | 2012-07-30 10:42:15 +0400 |
| commit | ca6455606c14fec4fd825325a1ae0cc8a9c8fe90 (patch) | |
| tree | 232c405192ae040a19d619a375bd6cbf44a6b75f /accel-pppd/ctrl/l2tp | |
| parent | 918036a3c42cb6dd5b796c52b6aaf278c466c928 (diff) | |
| download | accel-ppp-ca6455606c14fec4fd825325a1ae0cc8a9c8fe90.tar.gz accel-ppp-ca6455606c14fec4fd825325a1ae0cc8a9c8fe90.zip | |
add per-CTRL ip-pool option to specify default ip pool name
Diffstat (limited to 'accel-pppd/ctrl/l2tp')
| -rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index fa760487..162c9cb4 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -56,6 +56,7 @@ static int conf_dir300_quirk = 0; static const char *conf_host_name = "accel-ppp"; static const char *conf_secret = NULL; static int conf_mppe = MPPE_UNSET; +static char *conf_ip_pool; static unsigned int stat_active; static unsigned int stat_starting; @@ -336,6 +337,7 @@ static int l2tp_tunnel_alloc(struct l2tp_serv_t *serv, struct l2tp_packet_t *pac conn->ctrl.finished = l2tp_ppp_finished; conn->ctrl.max_mtu = 1420; conn->ctrl.mppe = conf_mppe; + conn->ctrl.def_pool = conf_ip_pool; conn->ctrl.calling_station_id = _malloc(17); conn->ctrl.called_station_id = _malloc(17); @@ -1232,6 +1234,13 @@ static void load_config(void) else if (strcmp(opt, "require") == 0) conf_mppe = MPPE_REQUIRE; } + + opt = conf_get_opt("l2tp", "ip-pool"); + if (opt) { + if (!conf_ip_pool || strcmp(conf_ip_pool, opt)) + conf_ip_pool = _strdup(opt); + } else + conf_ip_pool = NULL; } static void l2tp_init(void) |
