Skip to content
  • Dan Williams's avatar
    core: let device classes indicate their HW address will never change (bgo #701744) · fe5f0d20
    Dan Williams authored
    Bluetooth device hardware addresses won't change during the lifetime
    of the object (since that would mean a completely new device) and
    they also won't have an ifindex because they aren't netdevices.
    
    Various bits of the core periodically call nm_device_update_hw_address()
    to update a device's hardware address, but this function expects that
    any device with a hardware address also has an ifindex.  Except that
    Bluetooth devices don't because they aren't netdevices.
    
    Modify the get_hw_address_length() function to return a boolean
    indicating whether or not the address can ever change, and set that
    for BT devices.  nm_device_update_hw_address() then exits early if
    there's no point in re-checking the hardware address, avoiding the
    assertion.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701744
    fe5f0d20