diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-04 14:04:43 -0400 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-25 11:13:43 -0400 |
| commit | d3a35138115f89c19d0c44776da705b52975909f (patch) | |
| tree | faa42b7560abce2b2cf7f230214e7818dd1b0c70 /zebra/zebra_rib.c | |
| parent | cd36b87d8c067626dce566143e7998d0a0a9b722 (diff) | |
lib,pbrd,zebra: Use one api to delete nexthops/group
Reduce the api for deleting nexthops and the containing
group to just one call rather than having a special case
and handling it separately.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 337a2f09c5..e0bf1a58f2 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -2431,7 +2431,7 @@ void rib_unlink(struct route_node *rn, struct route_entry *re) if (nhe) zebra_nhg_decrement_ref(nhe); } else if (re->ng) - nexthop_group_free_delete(&re->ng); + nexthop_group_delete(&re->ng); nexthops_free(re->fib_ng.nexthop); @@ -2667,7 +2667,7 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p, table = zebra_vrf_table_with_table_id(afi, safi, re->vrf_id, re->table); if (!table) { if (re->ng) - nexthop_group_free_delete(&re->ng); + nexthop_group_delete(&re->ng); XFREE(MTYPE_RE, re); return 0; } @@ -2690,7 +2690,7 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p, * The nexthops got copied over into an nhe, * so free them now. */ - nexthop_group_free_delete(&re->ng); + nexthop_group_delete(&re->ng); if (!nhe) { char buf[PREFIX_STRLEN] = ""; |
