summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-manager.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-02-14 19:29:55 +0100
committerLennart Poettering <lennart@poettering.net>2021-02-17 19:40:02 +0100
commit0c0585ca25e28112fdd679ca37cd361c20901a02 (patch)
tree21043680d06142f93304215aa178284b10dce4e8 /src/network/networkd-manager.c
parentnetwork: nexthop: first create nexthops with ID (diff)
downloadsystemd-0c0585ca25e28112fdd679ca37cd361c20901a02.tar.xz
systemd-0c0585ca25e28112fdd679ca37cd361c20901a02.zip
network: enumerate nexthops before routes
Preparation for the later commits. Routes may have RTA_NH_ID attribute. To resolve the nexthop ID, all nexthops must be enumerated earlier.
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r--src/network/networkd-manager.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index debd9f1ecc..70c5c30b30 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -1099,6 +1099,10 @@ int manager_enumerate(Manager *m) {
if (r < 0)
return log_error_errno(r, "Could not enumerate neighbors: %m");
+ r = manager_enumerate_nexthop(m);
+ if (r < 0)
+ return log_error_errno(r, "Could not enumerate nexthop rules: %m");
+
r = manager_enumerate_routes(m);
if (r < 0)
return log_error_errno(r, "Could not enumerate routes: %m");
@@ -1107,10 +1111,6 @@ int manager_enumerate(Manager *m) {
if (r < 0)
return log_error_errno(r, "Could not enumerate routing policy rules: %m");
- r = manager_enumerate_nexthop(m);
- if (r < 0)
- return log_error_errno(r, "Could not enumerate nexthop rules: %m");
-
return 0;
}