diff options
author | Maria Matejka <mq@ucw.cz> | 2021-06-21 17:07:31 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2021-11-22 18:33:53 +0100 |
commit | f81702b7e44ba7f2b264fe14f0f4e1e30913e475 (patch) | |
tree | a40097fcf4687f1b9d33a3ba794e38898bfbab4f /proto/static/static.c | |
parent | 3a8197a9dce6fc5d38b089a291ac79d8d394fea1 (diff) |
Table import and export are now explicit hooks.
Channels have now included rt_import_req and rt_export_req to hook into
the table instead of just one list node. This will (in future) allow for:
* channel import and export bound to different tables
* more efficient pipe code (dropping most of the channel code)
* conversion of 'show route' to a special kind of export
* temporary static routes from CLI
The import / export states are also updated to the new algorithms.
Diffstat (limited to 'proto/static/static.c')
-rw-r--r-- | proto/static/static.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/proto/static/static.c b/proto/static/static.c index 6e258f6f..f8ac9c81 100644 --- a/proto/static/static.c +++ b/proto/static/static.c @@ -507,19 +507,13 @@ static_shutdown(struct proto *P) WALK_LIST(r, cf->routes) static_reset_rte(p, r); - return PS_DOWN; -} - -static void -static_cleanup(struct proto *P) -{ - struct static_proto *p = (void *) P; - if (p->igp_table_ip4) rt_unlock_table(p->igp_table_ip4); if (p->igp_table_ip6) rt_unlock_table(p->igp_table_ip6); + + return PS_DOWN; } static void @@ -777,7 +771,6 @@ struct protocol proto_static = { .dump = static_dump, .start = static_start, .shutdown = static_shutdown, - .cleanup = static_cleanup, .reconfigure = static_reconfigure, .copy_config = static_copy_config, .get_route_info = static_get_route_info, |