summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-01-25 20:11:21 -0500
committerStephen Worley <sworley@cumulusnetworks.com>2019-10-25 11:13:35 -0400
commit22bcedb231390df39c327eba1f12f1da50da0bf2 (patch)
treee57d57f55cec1587e8ef5b68b535bfab6e177a07 /zebra/zebra_rib.c
parent4e49c8b8a708e1ced07a1d18ae6b6554995c4085 (diff)
zebra: Add code to create/remove nexthop groups
Add some code to create/remove nexthop groups. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index c2fa33f57d..f385a2d752 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -2400,6 +2400,7 @@ static void rib_addnode(struct route_node *rn,
void rib_unlink(struct route_node *rn, struct route_entry *re)
{
rib_dest_t *dest;
+ rib_table_info_t *info;
assert(rn && re);
@@ -2414,6 +2415,9 @@ void rib_unlink(struct route_node *rn, struct route_entry *re)
if (dest->selected_fib == re)
dest->selected_fib = NULL;
+ info = srcdest_rnode_table_info(rn);
+ zebra_nhg_release(info->afi, re);
+
nexthops_free(re->ng.nexthop);
nexthops_free(re->fib_ng.nexthop);
@@ -2655,6 +2659,7 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
if (src_p)
apply_mask_ipv6(src_p);
+ zebra_nhg_find(afi, &re->ng, re);
/* Set default distance by route type. */
if (re->distance == 0)
re->distance = route_distance(re->type);