mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 16:04:49 +00:00
pbrd: uninstall NHG route if not valid anymore
Withdraw route from RIB if we detect the NHG is not valid anymore. We were seeing an issue where we would leave a route in zebra's RIB if it was recursive despite it being removed from the kernel due to an interface going down. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
parent
4030687aab
commit
6db1188f0e
@ -852,12 +852,15 @@ static void pbr_nht_nexthop_update_lookup(struct hash_bucket *b, void *data)
|
|||||||
*/
|
*/
|
||||||
pnhgc->valid = !!pnhi.valid;
|
pnhgc->valid = !!pnhi.valid;
|
||||||
|
|
||||||
if (pnhgc->valid) {
|
pbr_nexthop_group_cache_to_nexthop_group(&nhg, pnhgc);
|
||||||
pbr_nexthop_group_cache_to_nexthop_group(&nhg, pnhgc);
|
|
||||||
|
if (pnhgc->valid)
|
||||||
pbr_nht_install_nexthop_group(pnhgc, nhg);
|
pbr_nht_install_nexthop_group(pnhgc, nhg);
|
||||||
/* Don't need copied nexthops anymore */
|
else
|
||||||
nexthops_free(nhg.nexthop);
|
pbr_nht_uninstall_nexthop_group(pnhgc, nhg, 0);
|
||||||
}
|
|
||||||
|
/* Don't need copied nexthops anymore */
|
||||||
|
nexthops_free(nhg.nexthop);
|
||||||
|
|
||||||
if (old_valid != pnhgc->valid)
|
if (old_valid != pnhgc->valid)
|
||||||
pbr_map_check_nh_group_change(pnhgc->name);
|
pbr_map_check_nh_group_change(pnhgc->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user