Currently, link_stop_engines(), link_drop_config(), and link_drop_foreign_config()
do nothing when the interface is unmanaged. So this does not change anything.
But returning earlier should be clear and safer for protecting configs
on unmanaged interfaces.
/* let's shortcut things for CAN which doesn't need most of what's done below. */
return 0;
- if (link->network && link->network->ignore_carrier_loss)
+ if (!link->network)
+ return 0;
+
+ if (link->network->ignore_carrier_loss)
return 0;
r = link_stop_engines(link, false);