mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-22 10:46:59 +00:00
cloud-setup: fix replacing IPv4 addresses during update
If previously the profile would track two addresses ("10.116.1.130/24",
"10.116.1.65/24"), and during an update the second address was removed
(leaving "10.116.1.130/24"), then the addresses of the profile were
wrongly not changed.
The effect is that removing a secondary IP address might not take
effect.
Fix that.
https://bugzilla.redhat.com/show_bug.cgi?id=1920838
Fixes: 69f048bf0c
('cloud-setup: add tool for automatic IP configuration in cloud')
This commit is contained in:
parent
94a75c8cd6
commit
bbd36be44a
|
@ -704,7 +704,7 @@ nmcs_setting_ip_replace_ipv4_addresses(NMSettingIPConfig *s_ip,
|
|||
|
||||
i_next++;
|
||||
}
|
||||
if (any_changes) {
|
||||
if (!any_changes) {
|
||||
while (i_next < num) {
|
||||
nm_setting_ip_config_remove_address(s_ip, --num);
|
||||
any_changes = TRUE;
|
||||
|
|
Loading…
Reference in a new issue