nm: use device's Disconnect instead of DeactivateConnection
According to NM's documentation: - connection down: Deactivate a connection from a device without preventing the device from further auto-activation. - device down: Disconnect a device and prevent the device from automatically activating further connections without user/manual intervention. The documentation about the D-Bus Device.Disconnect method says the same. Use Device.Disconnect to prevent from unwanted connection activations on devices whose desired state is `down`. Previously, to avoid uwnanted activations we just deleted any other connection that matches the device. However, we didn't delete connections with "multiconnect" that also match other devices to avoid affecting to other devices. In this case, the multiconnect connection may auto- activate on the device after doing connection down on the previous active connection. Using Device.Disconnect it won't happen. Note that this problem still exists when using `state: absent`. In that case the multiconnect connection will auto-activate after a reboot. This needs to be fixed separately. Signed-off-by: Íñigo Huguet <ihuguet@riseup.net>
Í
Íñigo Huguet committed
f632625f7b92beee3e424ca9746dad977c42e30a
Parent: 9f5d066
Committed by Gris Ge <fge@redhat.com>
on 8/6/2025, 1:31:52 PM