From: Yu Watanabe Date: Sat, 17 Apr 2021 17:04:20 +0000 (+0900) Subject: network: dhcp4: also apply RouteMetric= setting in [DHCPv4] to prefix route X-Git-Tag: v249-rc1~375^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=415deef9c3e97211c862f39aceabf8e1f1485a41;p=thirdparty%2Fsystemd.git network: dhcp4: also apply RouteMetric= setting in [DHCPv4] to prefix route --- diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 21570571216..85b909e576b 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -893,6 +893,7 @@ static int dhcp4_update_address(Link *link, bool announce) { if (prefixlen <= 30) addr->broadcast.s_addr = address.s_addr | ~netmask.s_addr; SET_FLAG(addr->flags, IFA_F_NOPREFIXROUTE, !link_prefixroute(link)); + addr->route_metric = link->network->dhcp_route_metric; /* allow reusing an existing address and simply update its lifetime * in case it already exists */