mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-26 17:00:32 +01:00
bluetooth: don't set the ifindex after the device has been activated
The Bluetooth DUN device's NMModem would signal the reset of ifindex to zero when it's disconnected and the NMDeviceBt would accordingly update the bluetooth device's ip ifindex. This is not okay since commitab4578302d('device: refactor nm_device_set_ip_ifindex() and set_ip_iface()') which, although claiming to be a refactoring, made such use of nm_device_set_ip_ifindex() illegal. Resetting the ifindex is anyway not necessary, since it's taken care of _cleanup_generic_post(). Let's leave the ifindex alone once the device is activated, in a manner analogous to what NMDeviceModem. Fixes:ab4578302d('device: refactor nm_device_set_ip_ifindex() and set_ip_iface()') Fixes:78ca2a70c7('device: don't set invalid ip-iface'): (cherry picked from commita5ca504b5b) (cherry picked from commitfb874e6cda)
This commit is contained in:
parent
325da5a92c
commit
230eaa861b
1 changed files with 3 additions and 0 deletions
|
|
@ -550,6 +550,9 @@ ip_ifindex_changed_cb (NMModem *modem, GParamSpec *pspec, gpointer user_data)
|
|||
{
|
||||
NMDevice *device = NM_DEVICE (user_data);
|
||||
|
||||
if (!nm_device_is_activating (device))
|
||||
return;
|
||||
|
||||
if (!nm_device_set_ip_ifindex (device,
|
||||
nm_modem_get_ip_ifindex (modem))) {
|
||||
nm_device_state_changed (device,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue