summaryrefslogtreecommitdiff
path: root/accel-pppd/radius
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2016-05-31 21:43:48 +0200
committerDmitry Kozlov <xeb@mail.ru>2016-06-02 11:06:23 +0300
commite3e804a0266840ef0a9cc13c4f6d1ac8fc68c676 (patch)
tree05a455d3f44d99151bbd7453c043ceb3907a68c6 /accel-pppd/radius
parent2f8859f524a0f684d1cb02d45e00b4e66b399820 (diff)
downloadaccel-ppp-xebd-e3e804a0266840ef0a9cc13c4f6d1ac8fc68c676.tar.gz
accel-ppp-xebd-e3e804a0266840ef0a9cc13c4f6d1ac8fc68c676.zip
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 <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/radius')
-rw-r--r--accel-pppd/radius/radius.c2
1 files changed, 2 insertions, 0 deletions
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);