summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2016-07-19 16:25:59 +0300
committerDmitry Kozlov <xeb@mail.ru>2016-07-19 16:25:59 +0300
commit810d23477a9ca33dfa2379c3fc742c3c56df3a9d (patch)
tree60ebbe48508eaa00b230ec254799b0a568c753b4
parent5af337d4bd95ba001527f1a298f4594ad643f57b (diff)
downloadaccel-ppp-810d23477a9ca33dfa2379c3fc742c3c56df3a9d.tar.gz
accel-ppp-810d23477a9ca33dfa2379c3fc742c3c56df3a9d.zip
ipoe: switch session net
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index 84f8ad7c..f864d2f6 100644
--- a/accel-pppd/ctrl/ipoe/ipoe.c
+++ b/accel-pppd/ctrl/ipoe/ipoe.c
@@ -203,7 +203,12 @@ static void ipoe_serv_timeout(struct triton_timer_t *t);
static void ipoe_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);
}