projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4ff062
)
network: dhcp4: also apply RouteMetric= setting in [DHCPv4] to prefix route
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Sat, 17 Apr 2021 17:04:20 +0000
(
02:04
+0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 21 Apr 2021 04:55:02 +0000
(13:55 +0900)
src/network/networkd-dhcp4.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-dhcp4.c
b/src/network/networkd-dhcp4.c
index 215705712163a89cb362761c1c3bd3ab61b7a3af..85b909e576b31ce8ed7947794ceba9003d336c98 100644
(file)
--- 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 */