Commit bc1d1c9d authored by Thomas Haller's avatar Thomas Haller

vpn: avoid calling call_plugin_disconnect() without proxy

Got an assertion due to priv-proxy unset.
  NMDevice:
    - _platform_link_cb_idle()
     - nm_device_unrealize() [NMDeviceTun]
      - nm_device_state_changed()
       - _set_state_full()
         NMVpnConnection:
           - _set_vpn_state()
            - call_plugin_disconnect()

It seam to me, that can only happen if the NMVpnConnection never
completed on_proxy_acquired() and is still in preparing state when
being disconnected.

Avoid that be checking whether we have a proxy.

https://bugzilla.redhat.com/show_bug.cgi?id=1442064
parent 67d144dd
......@@ -646,7 +646,8 @@ _set_vpn_state (NMVpnConnection *self,
}
/* Tear down and clean up the connection */
call_plugin_disconnect (self);
if (priv->proxy)
call_plugin_disconnect (self);
vpn_cleanup (self, parent_dev);
/* fall through */
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment