Skip to content

libnm/client: don't reset properties when interface goes away

Lubomir Rintel requested to merge lr/object-removal into main

In case the D-Bus interfaces start dropping off (typically all off them go one by one when the object is being deleted), don't reset the properties.

Instead, keep them at the values they have. Otherwise, whoever subscribes to the remove signal is going to see a blank shell of an object instead of what it used to be in its heyday.

One example of where this is not good is when the device-removed signal is emmitted, the device no longer has the ifname:

  $ nmcli monitor
  <quit NetworkManager>
  (null): device removed
  (null): device removed
  ...

Keep the properties as they are until the object finally goes away.

Edited by Lubomir Rintel

Merge request reports