From 4a8bedcd8980aed7b41a0f76e76e00dab58798c7 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Tue, 11 Mar 2025 09:41:47 +0100 Subject: [PATCH] device: remove the prefix-delegation IP configuration on cleanup When a device in IPv6 shared mode obtains a prefix, it adds a new l3cd of type L3_CONFIG_DATA_TYPE_PD_6 for that prefix. However, that l3cd is never removed later and so the address lingers on the interface even after the connection goes down. Remove the l3cd on cleanup. --- src/core/devices/nm-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 3ddd5ffe4..a6d4acc49 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -13457,6 +13457,8 @@ _dev_ipsharedx_cleanup(NMDevice *self, int addr_family) nm_clear_l3cd(&priv->ipshared_data_4.v4.l3cd); _dev_l3_register_l3cds_set_one(self, L3_CONFIG_DATA_TYPE_SHARED_4, NULL, FALSE); + } else { + _dev_l3_register_l3cds_set_one(self, L3_CONFIG_DATA_TYPE_PD_6, NULL, FALSE); } _dev_ipsharedx_set_state(self, addr_family, NM_DEVICE_IP_STATE_NONE);