diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-01-13 05:16:10 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2024-01-16 17:13:53 +0100 |
commit | 47420573a778e83f2bddd536cf185cd5829e8ba9 (patch) | |
tree | 2536b1627c5c478a834099e78da96a5282c7f89b /src/network/networkd-route-nexthop.h | |
parent | labeler: add bsod, hibernate-resume, nspawn and vmspawn (diff) | |
download | systemd-47420573a778e83f2bddd536cf185cd5829e8ba9.tar.xz systemd-47420573a778e83f2bddd536cf185cd5829e8ba9.zip |
network/route: find/distinguish routes in the same way that the kernel uses
The kernel uses different logics to find or distinguish IPv4 and IPv6 routes.
Let's follow the same way that the kernel uses.
See comments in the code for more details.
Diffstat (limited to 'src/network/networkd-route-nexthop.h')
-rw-r--r-- | src/network/networkd-route-nexthop.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/networkd-route-nexthop.h b/src/network/networkd-route-nexthop.h index 0a524400cf..f06a2c49ff 100644 --- a/src/network/networkd-route-nexthop.h +++ b/src/network/networkd-route-nexthop.h @@ -9,6 +9,7 @@ #include "conf-parser.h" #include "in-addr-util.h" #include "macro.h" +#include "siphash24.h" typedef struct Link Link; typedef struct Manager Manager; @@ -28,6 +29,9 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(RouteNextHop*, route_nexthop_free); void route_nexthops_done(Route *route); +void route_nexthops_hash_func(const Route *route, struct siphash *state); +int route_nexthops_compare_func(const Route *a, const Route *b); + int route_nexthop_get_link(Manager *manager, Link *link, const RouteNextHop *nh, Link **ret); int route_nexthops_is_ready_to_configure(const Route *route, Link *link); |