]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: dhcp4: also set route MTU to prefix route and DNS routes
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 11 Apr 2021 10:12:27 +0000 (19:12 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 22 Apr 2021 23:49:29 +0000 (08:49 +0900)
src/network/networkd-dhcp4.c

index 9856f397c2379a08dda2e1cd39e5072f9bfd66a0..0c856720e9a0688a5b06196c010e36b2e00cd33b 100644 (file)
@@ -215,6 +215,7 @@ static int link_set_dhcp_prefix_route(Link *link) {
         route->scope = RT_SCOPE_LINK;
         route->protocol = RTPROT_DHCP;
         route->table = link_get_dhcp_route_table(link);
+        route->mtu = link->network->dhcp_route_mtu;
 
         return dhcp_route_configure(route, link);
 }
@@ -445,6 +446,7 @@ static int link_set_dns_routes(Link *link) {
         route->protocol = RTPROT_DHCP;
         route->priority = link->network->dhcp_route_metric;
         route->table = link_get_dhcp_route_table(link);
+        route->mtu = link->network->dhcp_route_mtu;
 
         for (int i = 0; i < n; i ++) {
                 route->dst.in = dns[i];