]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Add table_id to rib_table_info_t
authorDuncan Eastoe <duncan.eastoe@att.com>
Tue, 13 Nov 2018 15:26:21 +0000 (15:26 +0000)
committerDuncan Eastoe <duncan.eastoe@att.com>
Wed, 8 Jul 2020 11:52:13 +0000 (12:52 +0100)
When given a route_table this allows the corresponding kernel table
ID to be determined. The table_id value is set upon table creation
to the table_id of the VRF, unless the table was created with a
specific ID.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
zebra/rib.h
zebra/zebra_router.c

index a024b6dfaabe8a8eda35c8761eb66e26cbe94e90..fc4044f22e084d14f9556ddb0461621f77d3f001 100644 (file)
@@ -294,6 +294,7 @@ struct rib_table_info {
        struct zebra_vrf *zvrf;
        afi_t afi;
        safi_t safi;
+       uint32_t table_id;
 };
 
 enum rib_tables_iter_state {
index 61fef8779f406cc5c47ffbac26dd4c7a07f4f18c..66f2924555a2d4fc22ed032852358ac7a9c9c184 100644 (file)
@@ -133,6 +133,7 @@ struct route_table *zebra_router_get_table(struct zebra_vrf *zvrf,
        info->zvrf = zvrf;
        info->afi = afi;
        info->safi = safi;
+       info->table_id = tableid;
        route_table_set_info(zrt->table, info);
        zrt->table->cleanup = zebra_rtable_node_cleanup;