From e0cca4344f70b9c9e23e3c6a7e17c8e93c765184 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Mon, 11 Jul 2016 09:47:04 +0300 Subject: implemented support for network namespace This is done using radius attribute NAS-Port-Id. The new format of this attribute is NAS-Port-Id=[ns/][name]. Namespaces must be created malually by "ip netns add ..." command --- accel-pppd/ctrl/pptp/pptp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'accel-pppd/ctrl/pptp') diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c index ec20586f..4aba5767 100644 --- a/accel-pppd/ctrl/pptp/pptp.c +++ b/accel-pppd/ctrl/pptp/pptp.c @@ -75,7 +75,11 @@ static void ppp_finished(struct ap_session *); static void pptp_ctx_switch(struct triton_context_t *ctx, void *arg) { - net = &def_net; + if (arg) { + struct ap_session *s = arg; + net = s->net; + } else + net = def_net; log_switch(ctx, arg); } -- cgit v1.2.3