diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-04-17 19:04:20 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-04-21 06:55:02 +0200 |
commit | 415deef9c3e97211c862f39aceabf8e1f1485a41 (patch) | |
tree | ee7b2fe0814acb451cea27a9bc2f75f984ce837c /src/network/networkd-dhcp4.c | |
parent | network: add RouteMetric= setting in [Address] section (diff) | |
download | systemd-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.c | 1 |
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 */ |