summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp4.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-01-07 02:35:07 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-01-07 06:04:00 +0100
commitd32a520b095f7b795b37f32c059085c6d929bbc4 (patch)
tree43e489dab5f84d8d1738e2737663ac5265bef5cc /src/network/networkd-dhcp4.c
parentlogind: don't use assertion for deserialized_pid (diff)
downloadsystemd-d32a520b095f7b795b37f32c059085c6d929bbc4.tar.xz
systemd-d32a520b095f7b795b37f32c059085c6d929bbc4.zip
network/route-metric: introduce RouteMetric
Then, split out route metric handling from networkd-route.c to networkd-route-metric.c. No functional change, just refactoring and preparation for later commits.
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r--src/network/networkd-dhcp4.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index 8aee30e726..4fada25a9c 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -380,14 +380,14 @@ static int dhcp4_request_route(Route *in, Link *link) {
route->priority = link->network->dhcp_route_metric;
if (!route->table_set)
route->table = link_get_dhcp4_route_table(link);
- if (route->mtu == 0)
- route->mtu = link->network->dhcp_route_mtu;
- if (route->quickack < 0)
- route->quickack = link->network->dhcp_quickack;
- if (route->initcwnd == 0)
- route->initcwnd = link->network->dhcp_initial_congestion_window;
- if (route->initrwnd == 0)
- route->initrwnd = link->network->dhcp_advertised_receive_window;
+ if (route->metric.mtu == 0)
+ route->metric.mtu = link->network->dhcp_route_mtu;
+ if (route->metric.quickack < 0)
+ route->metric.quickack = link->network->dhcp_quickack;
+ if (route->metric.initcwnd == 0)
+ route->metric.initcwnd = link->network->dhcp_initial_congestion_window;
+ if (route->metric.initrwnd == 0)
+ route->metric.initrwnd = link->network->dhcp_advertised_receive_window;
if (route_get(NULL, link, route, &existing) < 0) /* This is a new route. */
link->dhcp4_configured = false;