diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-02-06 14:44:44 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-03-27 16:19:28 -0400 |
| commit | c86ba6c283689d0fd9f7dce9c29fdbbea7d0a0b2 (patch) | |
| tree | 3ebd71adbb9d3109df4aed80ec6be4522595c216 /zebra/zebra_vrf.c | |
| parent | 434434f70404a3b491117442462b554e83764339 (diff) | |
zebra: Add a base node for the zebra vrf tables
Add a default route_node for our routing tables. This will allow us
to know that we can hang data off the default route for processing.
We will be hanging the nexthop tracking data structures off the rib_dest_t
so that we can know which nexthops we need to handle. Effectively
nexthops that we are tracking that are unresolved will be stored on the
default route. When something changes in the rib tree we can
work up the rn->parent pointer checking for nexthops we need to re-evaluate.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_vrf.c')
| -rw-r--r-- | zebra/zebra_vrf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c index 90f94902f3..89bda4276e 100644 --- a/zebra/zebra_vrf.c +++ b/zebra/zebra_vrf.c @@ -370,10 +370,19 @@ static void zebra_rnhtable_node_cleanup(struct route_table *table, static void zebra_vrf_table_create(struct zebra_vrf *zvrf, afi_t afi, safi_t safi) { + struct route_node *rn; + struct prefix p; + assert(!zvrf->table[afi][safi]); zvrf->table[afi][safi] = zebra_router_get_table(zvrf, zvrf->table_id, afi, safi); + + memset(&p, 0, sizeof(p)); + p.family = afi2family(afi); + + rn = srcdest_rnode_get(zvrf->table[afi][safi], &p, NULL); + zebra_rib_create_dest(rn); } /* Allocate new zebra VRF. */ |
