summaryrefslogtreecommitdiff
path: root/accel-pppd/ipv6
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2016-04-12 00:23:16 +0300
committerDmitry Kozlov <xeb@mail.ru>2016-04-12 00:23:16 +0300
commitd49a25b9f48ef5c65fe91a79e62c2f677169eac7 (patch)
tree659e1bd47ea9d1bc24bb8d31708c655ab85f5378 /accel-pppd/ipv6
parentf285b9e7bd4c8d1eada3ca315618bbd8f9401e4b (diff)
downloadaccel-ppp-d49a25b9f48ef5c65fe91a79e62c2f677169eac7.tar.gz
accel-ppp-d49a25b9f48ef5c65fe91a79e62c2f677169eac7.zip
ipv6: remove ipv6 address and routes on session termination
Diffstat (limited to 'accel-pppd/ipv6')
-rw-r--r--accel-pppd/ipv6/dhcpv6.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/accel-pppd/ipv6/dhcpv6.c b/accel-pppd/ipv6/dhcpv6.c
index 93801ac..595b597 100644
--- a/accel-pppd/ipv6/dhcpv6.c
+++ b/accel-pppd/ipv6/dhcpv6.c
@@ -142,8 +142,15 @@ static void ev_ses_finished(struct ap_session *ses)
if (pd->clientid)
_free(pd->clientid);
- if (ses->ipv6_dp)
+ if (ses->ipv6_dp) {
+ if (pd->dp_active) {
+ struct ipv6db_addr_t *p;
+ list_for_each_entry(p, &ses->ipv6_dp->prefix_list, entry)
+ ip6route_del(0, &p->addr, p->prefix_len);
+ }
+
ipdb_put_ipv6_prefix(ses, ses->ipv6_dp);
+ }
triton_md_unregister_handler(&pd->hnd, 1);