network/nexthop: manage all nexthops by manager

The kernel manages nexthops by their IDs. Previously networkd manages
nexthops in three ways:
- by the corresponding link, if a nexthop has ifindex,
- by the manager, if a nexthop does not have ifindex,
- by the manager with their IDs.

This unifies the three managements of nexthops into one, and use the
same way as the kernel uses.

This is the one for nexthop already done by
aa9626ee3b for neighbor.
This commit is contained in:
Yu Watanabe
2023-12-14 18:58:26 +09:00
parent ac21790335
commit 352eba2e49
8 changed files with 138 additions and 231 deletions
-3
View File
@@ -74,9 +74,6 @@ struct Manager {
/* Manage nexthops by id. */
Hashmap *nexthops_by_id;
/* Manager stores nexthops without RTA_OIF attribute. */
Set *nexthops;
/* Manager stores routes without RTA_OIF attribute. */
unsigned route_remove_messages;
Set *routes;