manager: Keep volatile/external connections while referenced by async_op_lst
If an NMSettingsConnection with the VOLATILE
or EXTERNAL
flags is created and passed to nm_manager_activate_connection
, it's immediately scheduled for deletion in an idle callback and will likely be deleted before the authorization step in nm_manager_activate_connection
finishes and the connection will be aborted. This is because there's no NMActiveConnection in priv->active_connection_lst_head
referencing it until _internal_activate_device()
.
In this commit I change active_connection_find_by_connection
to also look for connections in priv->async_op_lst_head
.
The reason I want this to work is because I'm possibly misusing nm_manager_activate_connection
-- see !670 (closed) -- although I can't see a reason passing NMSettingsConnections with those flags shouldn't be supported by nm_manager_activate_connection
.