diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-01-17 06:15:46 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-01-17 06:16:21 +0100 |
commit | a47a6daebe0af26c07d8d423225eb4add110793c (patch) | |
tree | 4cb197e7e743f5ef4bf0251a53c23adcaa2051dc | |
parent | Merge pull request #11441 from poettering/foreach-string-rework (diff) | |
download | systemd-a47a6daebe0af26c07d8d423225eb4add110793c.tar.xz systemd-a47a6daebe0af26c07d8d423225eb4add110793c.zip |
network: update address when static address was already configured by DHCP
Fixes #11458.
-rw-r--r-- | src/network/networkd-link.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 3661498f39..e767f5d60a 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1095,7 +1095,11 @@ static int link_request_set_addresses(Link *link) { return r; LIST_FOREACH(addresses, ad, link->network->static_addresses) { - r = address_configure(ad, link, address_handler, false); + bool update; + + update = address_get(link, ad->family, &ad->in_addr, ad->prefixlen, NULL) > 0; + + r = address_configure(ad, link, address_handler, update); if (r < 0) { log_link_warning_errno(link, r, "Could not set addresses: %m"); link_enter_failed(link); |