summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp4.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-04-17 19:04:20 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-04-21 06:55:02 +0200
commit415deef9c3e97211c862f39aceabf8e1f1485a41 (patch)
treeee7b2fe0814acb451cea27a9bc2f75f984ce837c /src/network/networkd-dhcp4.c
parentnetwork: add RouteMetric= setting in [Address] section (diff)
downloadsystemd-415deef9c3e97211c862f39aceabf8e1f1485a41.tar.xz
systemd-415deef9c3e97211c862f39aceabf8e1f1485a41.zip
network: dhcp4: also apply RouteMetric= setting in [DHCPv4] to prefix route
Diffstat (limited to '')
-rw-r--r--src/network/networkd-dhcp4.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index 2157057121..85b909e576 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 */