mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 00:40:11 +01:00
core: don't fail if at least one static address passes DAD
It seems more useful to have a best effort approach and configure
everything we can; in that way we achieve at least some connectivity,
and then sysadmin can check the logs in case something is
missing. Currently instead, the whole activation fails (so, no address
is configured) if just one of the addresses fails DAD.
Ideally, we should have a way to make this configurable; but for now,
implement the more useful behavior as default.
(cherry picked from commit a45024714f)
This commit is contained in:
parent
3ddd1d6e7b
commit
cb3463bbc1
1 changed files with 18 additions and 6 deletions
|
|
@ -10403,12 +10403,24 @@ _dev_ipmanual_check_ready(NMDevice *self)
|
|||
addr_family,
|
||||
flags,
|
||||
&conflicts);
|
||||
if (conflicts) {
|
||||
_dev_ipmanual_set_state(self, addr_family, NM_DEVICE_IP_STATE_FAILED);
|
||||
_dev_ip_state_check_async(self, AF_UNSPEC);
|
||||
} else if (ready) {
|
||||
_dev_ipmanual_set_state(self, addr_family, NM_DEVICE_IP_STATE_READY);
|
||||
_dev_ip_state_check_async(self, AF_UNSPEC);
|
||||
if (ready) {
|
||||
guint num_addrs = 0;
|
||||
|
||||
num_addrs =
|
||||
nm_l3_config_data_get_num_addresses(priv->l3cds[L3_CONFIG_DATA_TYPE_MANUALIP].d,
|
||||
addr_family);
|
||||
|
||||
if (conflicts && conflicts->len == num_addrs) {
|
||||
_LOGD_ipmanual(addr_family, "all manual addresses failed DAD, failing");
|
||||
_dev_ipmanual_set_state(self, addr_family, NM_DEVICE_IP_STATE_FAILED);
|
||||
_dev_ip_state_check_async(self, AF_UNSPEC);
|
||||
} else {
|
||||
if (conflicts) {
|
||||
_LOGD_ipmanual(addr_family, "some manual addresses passed DAD, continuing");
|
||||
}
|
||||
_dev_ipmanual_set_state(self, addr_family, NM_DEVICE_IP_STATE_READY);
|
||||
_dev_ip_state_check_async(self, AF_UNSPEC);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue