mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 04:08:01 +02:00
device: fix assertion failure caused by DAD array reuse
This commit fixes an assertion failure caused by the `conflicts` array being reused
when both IPv4 and IPv6 duplicate address detection occurs.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1747
Fixes: afa208c862 ('core: return conflicting addresses from nm_l3cfg_check_ready()')
This commit is contained in:
parent
8ed1b8daec
commit
aa84b5f935
1 changed files with 2 additions and 2 deletions
|
|
@ -10369,7 +10369,6 @@ _dev_ipmanual_check_ready(NMDevice *self)
|
|||
gboolean has_carrier;
|
||||
NML3CfgCheckReadyFlags flags;
|
||||
gboolean ready;
|
||||
gs_unref_array GArray *conflicts = NULL;
|
||||
int IS_IPv4;
|
||||
|
||||
if (priv->ipmanual_data.state_4 != NM_DEVICE_IP_STATE_PENDING
|
||||
|
|
@ -10403,7 +10402,8 @@ _dev_ipmanual_check_ready(NMDevice *self)
|
|||
flags |= NM_L3CFG_CHECK_READY_FLAGS_IP6_DAD_READY;
|
||||
|
||||
for (IS_IPv4 = 0; IS_IPv4 < 2; IS_IPv4++) {
|
||||
const int addr_family = IS_IPv4 ? AF_INET : AF_INET6;
|
||||
const int addr_family = IS_IPv4 ? AF_INET : AF_INET6;
|
||||
gs_unref_array GArray *conflicts = NULL;
|
||||
|
||||
ready = nm_l3cfg_check_ready(priv->l3cfg,
|
||||
priv->l3cds[L3_CONFIG_DATA_TYPE_MANUALIP].d,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue