summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/l2tp
diff options
context:
space:
mode:
authorxebd <xeb@mail.ru>2017-12-06 11:35:30 +0300
committerGitHub <noreply@github.com>2017-12-06 11:35:30 +0300
commit509afee2c6d9d9aa39d4202323bd8052c0f5f7b9 (patch)
tree844b22995b624dde84f33ea6bdb94839743219d5 /accel-pppd/ctrl/l2tp
parente959ea1bd262441a952ea0c807d553b4a9c38113 (diff)
parentae72e179afa46d82865aa8d459b32cc27541e4a7 (diff)
downloadaccel-ppp-509afee2c6d9d9aa39d4202323bd8052c0f5f7b9.tar.gz
accel-ppp-509afee2c6d9d9aa39d4202323bd8052c0f5f7b9.zip
Merge pull request #25 from themiron/ppp-ifname
ppp: implement per-ctrl ppp interface rename support
Diffstat (limited to 'accel-pppd/ctrl/l2tp')
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c
index a44d31d2..55881b8d 100644
--- a/accel-pppd/ctrl/l2tp/l2tp.c
+++ b/accel-pppd/ctrl/l2tp/l2tp.c
@@ -94,6 +94,7 @@ 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 const char *conf_ifname;
static unsigned int stat_conn_starting;
static unsigned int stat_conn_active;
@@ -1796,6 +1797,8 @@ static int l2tp_session_start_data_channel(struct l2tp_sess_t *sess)
goto err;
}
}
+ if (conf_ifname)
+ sess->ppp.ses.ifname_rename = _strdup(conf_ifname);
sess->ppp.ses.ctrl = &sess->ctrl;
sess->apses_state = APSTATE_INIT;
@@ -4928,6 +4931,7 @@ static void load_config(void)
}
conf_ip_pool = conf_get_opt("l2tp", "ip-pool");
+ conf_ifname = conf_get_opt("l2tp", "ifname");
switch (iprange_check_activation()) {
case IPRANGE_DISABLED: