Merge pull request #5955 from dslicenc/v6-ra-leak

zebra: delete ipv6 RA prefix entries when zebra is killed
This commit is contained in:
Mark Stapp 2020-03-10 09:53:42 -04:00 committed by GitHub
commit 2bdced5ab3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1118,18 +1118,31 @@ void rtadv_stop_ra(struct interface *ifp)
}
/*
* send router lifetime value of zero in RAs on all interfaces since we're
* Send router lifetime value of zero in RAs on all interfaces since we're
* ceasing to advertise globally and want to let all of our neighbors know
* RFC 4861 secion 6.2.5
*
* Delete all ipv6 global prefixes added to the router advertisement prefix
* lists prior to ceasing.
*/
void rtadv_stop_ra_all(void)
{
struct vrf *vrf;
struct interface *ifp;
struct listnode *node, *nnode;
struct zebra_if *zif;
struct rtadv_prefix *rprefix;
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
FOR_ALL_INTERFACES (vrf, ifp)
FOR_ALL_INTERFACES (vrf, ifp) {
zif = ifp->info;
for (ALL_LIST_ELEMENTS(zif->rtadv.AdvPrefixList,
node, nnode, rprefix))
rtadv_prefix_reset(zif, rprefix);
rtadv_stop_ra(ifp);
}
}
void zebra_interface_radv_disable(ZAPI_HANDLER_ARGS)