summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/pppoe/pppoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ctrl/pppoe/pppoe.c')
-rw-r--r--accel-pppd/ctrl/pppoe/pppoe.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c
index 079ef51..6aef1a9 100644
--- a/accel-pppd/ctrl/pppoe/pppoe.c
+++ b/accel-pppd/ctrl/pppoe/pppoe.c
@@ -80,7 +80,8 @@ int conf_ifname_in_sid;
char *conf_pado_delay;
int conf_tr101 = 1;
int conf_padi_limit = 0;
-int conf_mppe = MPPE_UNSET;
+static int conf_mppe = MPPE_UNSET;
+static char *conf_ip_pool;
static mempool_t conn_pool;
static mempool_t pado_pool;
@@ -265,6 +266,7 @@ static struct pppoe_conn_t *allocate_channel(struct pppoe_serv_t *serv, const ui
conn->ctrl.type = CTRL_TYPE_PPPOE;
conn->ctrl.name = "pppoe";
conn->ctrl.mppe = conf_mppe;
+ conn->ctrl.def_pool = conf_ip_pool;
conn->ctrl.calling_station_id = _malloc(IFNAMSIZ + 19);
conn->ctrl.called_station_id = _malloc(IFNAMSIZ + 19);
@@ -1424,6 +1426,13 @@ static void load_config(void)
else if (strcmp(opt, "require") == 0)
conf_mppe = MPPE_REQUIRE;
}
+
+ opt = conf_get_opt("pppoe", "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 pppoe_init(void)