summaryrefslogtreecommitdiff
path: root/accel-pppd/lua/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/lua/session.c')
-rw-r--r--accel-pppd/lua/session.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel-pppd/lua/session.c b/accel-pppd/lua/session.c
index 277b299f..bd98911b 100644
--- a/accel-pppd/lua/session.c
+++ b/accel-pppd/lua/session.c
@@ -197,7 +197,7 @@ static int session_ipv6(lua_State *L)
if (!ses)
return 0;
- if (ses->ipv6) {
+ if (ses->ipv6 && !list_empty(&ses->ipv6->addr_list)) {
a = list_entry(ses->ipv6->addr_list.next, typeof(*a), entry);
if (a->prefix_len) {
build_ip6_addr(a, ses->ipv6->peer_intf_id, &addr);