summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp4.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-01-16 05:01:27 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-01-19 02:23:14 +0100
commit2f542fc3d40b511f78b9610ba96eb973d6e6f72c (patch)
tree53c741afaf9328e01693232adce071386bdf4b48 /src/network/networkd-dhcp4.c
parentnetwork/route-nexthop: introduce route_adjust_nexthops() and route_nexthops_n... (diff)
downloadsystemd-2f542fc3d40b511f78b9610ba96eb973d6e6f72c.tar.xz
systemd-2f542fc3d40b511f78b9610ba96eb973d6e6f72c.zip
network: adjust nexthops of dynamic routes before requesting
No effective functionality is changed. Preparation for later commits.
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r--src/network/networkd-dhcp4.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index d07b56142c..2afda41ab5 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -390,6 +390,10 @@ static int dhcp4_request_route(Route *in, Link *link) {
if (r < 0)
return r;
+ r = route_adjust_nexthops(route, link);
+ if (r < 0)
+ return r;
+
if (route_get(NULL, link, route, &existing) < 0) /* This is a new route. */
link->dhcp4_configured = false;
else