summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/l2tp/l2tp.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ctrl/l2tp/l2tp.c')
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c
index 5d9041f..bb3df4d 100644
--- a/accel-pppd/ctrl/l2tp/l2tp.c
+++ b/accel-pppd/ctrl/l2tp/l2tp.c
@@ -255,8 +255,13 @@ static inline int nsnr_cmp(uint16_t ns, uint16_t nr)
static void l2tp_ctx_switch(struct triton_context_t *ctx, void *arg)
{
- struct ap_session *s = arg;
- net = s->net;
+ struct ap_session *apses = arg;
+
+ if (apses)
+ net = apses->net;
+ else
+ net = def_net;
+
log_switch(ctx, arg);
}