From e3e804a0266840ef0a9cc13c4f6d1ac8fc68c676 Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Tue, 31 May 2016 21:43:48 +0200 Subject: radius: initialise ipv6db addresses completely The 'installed' bit of the allocated ipv6db_addr_t structure needs to be initialised. This is because ap_session_ifdown() reads this bit to know if the address or route needs to be removed from the kernel. The 'installed' bit is set by ap_session_accounting_started() and the ND and DHCPV6 protocol handlers, but disconnection could happen before these steps. Signed-off-by: Guillaume Nault --- accel-pppd/radius/radius.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/accel-pppd/radius/radius.c b/accel-pppd/radius/radius.c index c8eaf95..4c32375 100644 --- a/accel-pppd/radius/radius.c +++ b/accel-pppd/radius/radius.c @@ -216,12 +216,14 @@ int rad_proc_attrs(struct rad_req_t *req) break; case Framed_IPv6_Prefix: a = _malloc(sizeof(*a)); + memset(a, 0, sizeof(*a)); a->prefix_len = attr->val.ipv6prefix.len; a->addr = attr->val.ipv6prefix.prefix; list_add_tail(&a->entry, &rpd->ipv6_addr.addr_list); break; case Delegated_IPv6_Prefix: a = _malloc(sizeof(*a)); + memset(a, 0, sizeof(*a)); a->prefix_len = attr->val.ipv6prefix.len; a->addr = attr->val.ipv6prefix.prefix; list_add_tail(&a->entry, &rpd->ipv6_dp.prefix_list); -- cgit v1.2.3