l3cfg: fix assertion failure

Fix the following assertion failure:

  src/core/nm-l3cfg.c:2636:_l3_acd_data_state_change: assertion failed: (!acd_data->nacd_probe)

When AcdData enters state NM_L3_ACD_ADDR_STATE_READY, the duplicate
address detection procedure completed successfully but the address is
not configured yet on the interface. In the READY state we don't clear
the probe because the same probe can be reused also for defending the
address. Change the assertion.

https://bugzilla.redhat.com/show_bug.cgi?id=2026288
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1035
This commit is contained in:
Beniamino Galvani
2021-11-24 15:56:49 +01:00
parent 6a68008e44
commit 9a76b07f74

View File

@@ -2629,12 +2629,13 @@ handle_init:
acd_data->nacd_probe = n_acd_probe_free(acd_data->nacd_probe); acd_data->nacd_probe = n_acd_probe_free(acd_data->nacd_probe);
_l3_acd_data_timeout_schedule(acd_data, 0); _l3_acd_data_timeout_schedule(acd_data, 0);
return; return;
case NM_L3_ACD_ADDR_STATE_READY:
case NM_L3_ACD_ADDR_STATE_USED: case NM_L3_ACD_ADDR_STATE_USED:
case NM_L3_ACD_ADDR_STATE_CONFLICT: case NM_L3_ACD_ADDR_STATE_CONFLICT:
case NM_L3_ACD_ADDR_STATE_EXTERNAL_REMOVED: case NM_L3_ACD_ADDR_STATE_EXTERNAL_REMOVED:
nm_assert(!acd_data->nacd_probe); nm_assert(!acd_data->nacd_probe);
return; return;
case NM_L3_ACD_ADDR_STATE_READY:
return;
} }
nm_assert_not_reached(); nm_assert_not_reached();
return; return;