dhcp: don't schedule commit of type "update" when clearing acd

We don't know the reason why the DHCP client is being stopped. It is
wrong to schedule a commit of type "update" because the device could
be now unmanaged. Schedule instead a commit of type "auto", which
automatically determines the type of commit based on registered
handles.

(cherry picked from commit a49913504d)
This commit is contained in:
Beniamino Galvani 2023-09-05 17:53:33 +02:00
parent b4f0b504d4
commit 233d89da4b

View file

@ -527,7 +527,7 @@ _acd_reglist_data_remove(NMDhcpClient *self, guint idx, gboolean do_log)
nm_clear_l3cd(&reglist_data->l3cd);
nm_l3cfg_commit_on_idle_schedule(priv->config.l3cfg, NM_L3_CFG_COMMIT_TYPE_UPDATE);
nm_l3cfg_commit_on_idle_schedule(priv->config.l3cfg, NM_L3_CFG_COMMIT_TYPE_AUTO);
g_array_remove_index(priv->v4.acd.reglist, idx);