diff options
author | Mark Stapp <mjs@voltanet.io> | 2020-02-25 14:29:46 +0100 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2020-02-27 21:49:31 +0100 |
commit | c415d89528f5cd7128e5b4c4cd65cce01d64fc80 (patch) | |
tree | c7604b3cf422eec7f9edd464af522251b7a20d6a /zebra/redistribute.c | |
parent | lib: use const in nexthop_group copy api (diff) | |
download | frr-c415d89528f5cd7128e5b4c4cd65cce01d64fc80.tar.xz frr-c415d89528f5cd7128e5b4c4cd65cce01d64fc80.zip |
zebra: Embed lib nexthop-group in zebra hash entry
Embed nexthop-group, which is just a pointer, in the zebra
nexthop-hash-entry object, rather than mallocing one.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/redistribute.c')
-rw-r--r-- | zebra/redistribute.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c index 03bb19923..3d203dea4 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -648,7 +648,7 @@ int zebra_add_import_table_entry(struct zebra_vrf *zvrf, struct route_node *rn, if (rmap_name) ret = zebra_import_table_route_map_check( afi, re->type, re->instance, &rn->p, - re->nhe->nhg->nexthop, + re->nhe->nhg.nexthop, zvrf->vrf->vrf_id, re->tag, rmap_name); if (ret != RMAP_PERMITMATCH) { @@ -685,7 +685,7 @@ int zebra_add_import_table_entry(struct zebra_vrf *zvrf, struct route_node *rn, newre->instance = re->table; ng = nexthop_group_new(); - copy_nexthops(&ng->nexthop, re->nhe->nhg->nexthop, NULL); + copy_nexthops(&ng->nexthop, re->nhe->nhg.nexthop, NULL); rib_add_multipath(afi, SAFI_UNICAST, &p, NULL, newre, ng); @@ -702,7 +702,7 @@ int zebra_del_import_table_entry(struct zebra_vrf *zvrf, struct route_node *rn, prefix_copy(&p, &rn->p); rib_delete(afi, SAFI_UNICAST, zvrf->vrf->vrf_id, ZEBRA_ROUTE_TABLE, - re->table, re->flags, &p, NULL, re->nhe->nhg->nexthop, + re->table, re->flags, &p, NULL, re->nhe->nhg.nexthop, re->nhe_id, zvrf->table_id, re->metric, re->distance, false); |