diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-03-16 05:02:56 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-03-16 15:18:58 +0100 |
commit | 95a29032bca3d41ff6870561e76111a7f9aac626 (patch) | |
tree | 1d53f6ea40b0a78554f2a2a4b52d2755b274d64d /zebra/zebra_ns.c | |
parent | zebra: Upon client disconnect remove routes from all tables (diff) | |
download | frr-95a29032bca3d41ff6870561e76111a7f9aac626.tar.xz frr-95a29032bca3d41ff6870561e76111a7f9aac626.zip |
zebra: Read in on startup arbitrary tables
When we receive an arbitrary table over the netlink bus
save it for later perusal and sweep any routes that
we may have created from an earlier run.
The current redistribute code is limited to
ZEBRA_KERNEL_TABLE_MAX. I left this alone for the
moment because I believe it needs to be converted
to a RB tree instead of a flat array. Which is more
work for the future. Additionally this proposed
change might necessitate some cli changes or rethinks.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_ns.c')
-rw-r--r-- | zebra/zebra_ns.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/zebra/zebra_ns.c b/zebra/zebra_ns.c index 2c7b85e61..29c179245 100644 --- a/zebra/zebra_ns.c +++ b/zebra/zebra_ns.c @@ -177,6 +177,17 @@ unsigned long zebra_ns_score_proto(u_char proto, u_short instance) return cnt; } +void zebra_ns_sweep_route(void) +{ + struct zebra_ns_table *znst; + struct zebra_ns *zns; + + zns = zebra_ns_lookup(NS_DEFAULT); + + RB_FOREACH (znst, zebra_ns_table_head, &zns->ns_tables) + rib_sweep_table(znst->table); +} + struct route_table *zebra_ns_get_table(struct zebra_ns *zns, struct zebra_vrf *zvrf, uint32_t tableid, afi_t afi) |