mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 09:50:17 +01:00
device: destroy pending acd-managers when the device disconnects
We previously kept any acd-manager running if the device was
disconnected. It was possible to trigger a crash by setting a long
dad-timeout and interrupting the activation request:
nmcli con add type ethernet ifname eth0 con-name eth0+ ip4 1.2.3.4/32
nmcli con mod eth0+ ipv4.dad-timeout 10000
nmcli -w 2 con up eth0+
nmcli con down eth0+
After this, the n-acd timer would fire after 10 seconds and try to
disconnect an already disconnected device, throwing the assertion:
NetworkManager:ERROR:src/devices/nm-device.c:9845:
activate_stage5_ip4_config_result: assertion failed: (req)
Fixes: 28f6e8b4d2
This commit is contained in:
parent
ca9981eb5d
commit
260cded3d6
1 changed files with 2 additions and 3 deletions
|
|
@ -10391,6 +10391,8 @@ _cleanup_ip_pre (NMDevice *self, int addr_family, CleanupType cleanup_type)
|
|||
arp_cleanup (self);
|
||||
dnsmasq_cleanup (self);
|
||||
ipv4ll_cleanup (self);
|
||||
g_slist_free_full (priv->acd.dad_list, (GDestroyNotify) nm_acd_manager_destroy);
|
||||
priv->acd.dad_list = NULL;
|
||||
} else {
|
||||
g_slist_free_full (priv->dad6_failed_addrs, (GDestroyNotify) nmp_object_unref);
|
||||
priv->dad6_failed_addrs = NULL;
|
||||
|
|
@ -15559,9 +15561,6 @@ dispose (GObject *object)
|
|||
g_signal_handlers_disconnect_by_func (platform, G_CALLBACK (device_ipx_changed), self);
|
||||
g_signal_handlers_disconnect_by_func (platform, G_CALLBACK (link_changed_cb), self);
|
||||
|
||||
g_slist_free_full (priv->acd.dad_list, (GDestroyNotify) nm_acd_manager_destroy);
|
||||
priv->acd.dad_list = NULL;
|
||||
|
||||
arp_cleanup (self);
|
||||
|
||||
nm_clear_g_signal_handler (nm_config_get (), &priv->config_changed_id);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue