NetworkManager/libnm
Dan Williams ba7359441b libnm-glib/libnm/vpn: fix handling of ConnectInteractive() failure (rh #1298732)
If the plugin supports interactive mode, but the VPN binary (like vpnc
or openvpn) doesn't support it, then the plugin should return
NM_VPN_PLUGIN_ERROR_INTERACTIVE_NOT_SUPPORTED from its connect_interactive()
hook.  This lets NetworkManager know to fall back to plain Connect().

Since this notification is done through an error return, the VPN service
plugin code sees the failure and moves the plugin state back to
STOPPED.  NetworkManager sees that state change, and terminates the
connection attempt while waiting for a reply to the Connect() method.

(VPN service plugins that don't support interactive mode at all don't
have this problem because that error is returned before the plugin's
state is moved to STARTING.)

To fix this, do two things:

1) if the connect_interactive() hook fails and returns the error
NM_VPN_PLUGIN_ERROR_INTERACTIVE_NOT_SUPPORTED, postpone the STOPPED
state change for a few seconds to allow NM time to fall back to
plain Connect().  We still want to move the plugin state back to
STOPPED eventually, because otherwise it could stay in STARTING
forever.

2) change state to STARTING only if the connect/connect_interactive
plugin hooks were successful.  Otherwise the plugin would still be
in STARTING state, and it's not valid to call Connect()/ConnectInteractive()
during the STARTING state.

https://mail.gnome.org/archives/networkmanager-list/2016-February/msg00091.html
https://bugzilla.redhat.com/show_bug.cgi?id=1298732
(cherry picked from commit abc700c5c7)
2016-03-02 11:28:27 +01:00
..
tests build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h" 2015-09-30 23:35:52 +02:00
generate-plugin-docs.pl trivial: fix a comment typo in generate-plugin-docs.pl 2014-11-19 17:54:03 +01:00
generate-setting-docs.py python: use gi.require_version() in generate-setting-docs.py and examples 2015-11-11 15:47:13 +01:00
libnm.pc.in libnm: drop libdbus-glib from pkg-config file 2015-01-22 13:31:45 -06:00
libnm.ver libnm-core: add Wake-on-LAN properties to NMSettingWired 2015-08-21 18:12:36 +02:00
Makefile.am build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h" 2015-09-30 23:35:52 +02:00
NetworkManager.h libnm: rename NMSecretAgent to NMSecretAgentOld 2014-11-21 12:17:41 -05:00
nm-access-point.c libnm: fix nm_access_point_get_last_seen() code doc after 1e85c358 2015-08-09 14:30:02 +02:00
nm-access-point.h libnm: add NM_AVAILABLE_IN_1_0_6 for new API nm_access_point_get_last_seen() 2015-08-09 11:04:13 +02:00
nm-active-connection.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-active-connection.h libnm: create NMDhcpConfig as parent of NMDhcp4Config and NMDhcp6Config 2014-11-07 07:49:40 -05:00
nm-client.c libnm: fix the callback in g_simple_async_result_new() 2015-08-21 13:43:05 +02:00
nm-client.h nm-manager: add 'metered' property 2015-07-22 13:52:46 +02:00
nm-dbus-helpers.c libnm,dbus-helpers: include glib-compat for g_test_initialized() 2015-06-22 17:57:03 +02:00
nm-dbus-helpers.h libnm: drop _nm_dbus_register_error_domain() 2014-10-22 08:29:10 -04:00
nm-device-adsl.c libnm*: fix library gettext usage 2014-11-13 17:18:42 -05:00
nm-device-adsl.h libnm: merge device-type-specific errors into NMDeviceError 2014-10-22 08:29:08 -04:00
nm-device-bond.c libnm*: fix library gettext usage 2014-11-13 17:18:42 -05:00
nm-device-bond.h libnm: merge device-type-specific errors into NMDeviceError 2014-10-22 08:29:08 -04:00
nm-device-bridge.c libnm*: fix library gettext usage 2014-11-13 17:18:42 -05:00
nm-device-bridge.h libnm: merge device-type-specific errors into NMDeviceError 2014-10-22 08:29:08 -04:00
nm-device-bt.c libnm*: fix library gettext usage 2014-11-13 17:18:42 -05:00
nm-device-bt.h libnm: merge device-type-specific errors into NMDeviceError 2014-10-22 08:29:08 -04:00
nm-device-ethernet.c libnm*: fix library gettext usage 2014-11-13 17:18:42 -05:00
nm-device-ethernet.h libnm: merge device-type-specific errors into NMDeviceError 2014-10-22 08:29:08 -04:00
nm-device-generic.c libnm*: fix library gettext usage 2014-11-13 17:18:42 -05:00
nm-device-generic.h libnm: merge device-type-specific errors into NMDeviceError 2014-10-22 08:29:08 -04:00
nm-device-infiniband.c libnm*: fix library gettext usage 2014-11-13 17:18:42 -05:00
nm-device-infiniband.h libnm: merge device-type-specific errors into NMDeviceError 2014-10-22 08:29:08 -04:00
nm-device-modem.c libnm*: fix library gettext usage 2014-11-13 17:18:42 -05:00
nm-device-modem.h libnm: merge device-type-specific errors into NMDeviceError 2014-10-22 08:29:08 -04:00
nm-device-olpc-mesh.c libnm*: fix library gettext usage 2014-11-13 17:18:42 -05:00
nm-device-olpc-mesh.h libnm: merge device-type-specific errors into NMDeviceError 2014-10-22 08:29:08 -04:00
nm-device-private.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-device-team.c libnm*: fix library gettext usage 2014-11-13 17:18:42 -05:00
nm-device-team.h libnm: merge device-type-specific errors into NMDeviceError 2014-10-22 08:29:08 -04:00
nm-device-vlan.c libnm: add missing (transfer) annotation for nm_device_vlan_get_parent() 2014-11-25 12:48:11 +01:00
nm-device-vlan.h libnm: add :parent property for VLAN devices 2014-11-24 10:33:22 +01:00
nm-device-wifi.c libnm: add new functions allowing passing options to RequestScan() D-Bus call 2015-08-14 13:30:17 +02:00
nm-device-wifi.h libnm: add new functions allowing passing options to RequestScan() D-Bus call 2015-08-14 13:30:17 +02:00
nm-device-wimax.c libnm*: fix library gettext usage 2014-11-13 17:18:42 -05:00
nm-device-wimax.h libnm: merge device-type-specific errors into NMDeviceError 2014-10-22 08:29:08 -04:00
nm-device.c core,libnm: add 'metered' property to NMDevice 2015-07-22 13:52:45 +02:00
nm-device.h core,libnm: add 'metered' property to NMDevice 2015-07-22 13:52:45 +02:00
nm-dhcp-config.c docs: misc small fixes 2014-12-18 13:46:11 -05:00
nm-dhcp-config.h libnm: create NMDhcpConfig as parent of NMDhcp4Config and NMDhcp6Config 2014-11-07 07:49:40 -05:00
nm-dhcp4-config.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-dhcp4-config.h libnm: create NMDhcpConfig as parent of NMDhcp4Config and NMDhcp6Config 2014-11-07 07:49:40 -05:00
nm-dhcp6-config.c libnm: make NMDhcp6Config inherit from NMDhcpConfig 2015-01-02 20:39:20 +01:00
nm-dhcp6-config.h libnm: create NMDhcpConfig as parent of NMDhcp4Config and NMDhcp6Config 2014-11-07 07:49:40 -05:00
nm-ip-config.c docs: misc small fixes 2014-12-18 13:46:11 -05:00
nm-ip-config.h libnm: create NMIPConfig as parent of NMIP4Config and NMIP6Config 2014-11-07 07:49:40 -05:00
nm-ip4-config.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-ip4-config.h libnm: create NMIPConfig as parent of NMIP4Config and NMIP6Config 2014-11-07 07:49:40 -05:00
nm-ip6-config.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-ip6-config.h libnm: create NMIPConfig as parent of NMIP4Config and NMIP6Config 2014-11-07 07:49:40 -05:00
nm-manager.c nm-manager: add 'metered' property 2015-07-22 13:52:46 +02:00
nm-manager.h nm-manager: add 'metered' property 2015-07-22 13:52:46 +02:00
nm-object-cache.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-object-cache.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-object-private.h trivial: make _nm_object_reload_properties() private to nm-object.c 2014-11-06 20:51:58 -06:00
nm-object.c libnm,nm-object: fix tracing of object removal 2015-03-16 10:57:09 +01:00
nm-object.h libnm: consolidate NMClientError and NMObjectError 2014-10-22 08:29:10 -04:00
nm-remote-connection-private.h libnm: add libnm/libnm-core (part 1) 2014-08-01 14:34:04 -04:00
nm-remote-connection.c nm-remote-connection: take a reference to self while calling get_settings 2015-05-05 16:37:06 +02:00
nm-remote-connection.h libnm: drop unused NMRemoteConnectionError 2014-10-22 08:29:08 -04:00
nm-remote-settings.c libnm*: fix library gettext usage 2014-11-13 17:18:42 -05:00
nm-remote-settings.h libnm: change GSList to GPtrArray in libnm methods 2014-10-28 17:17:17 -04:00
nm-secret-agent-old.c libnm: fix take ownership of floating argument in NMSecretAgentOld:get_secrets_cb() 2015-06-03 19:45:08 +02:00
nm-secret-agent-old.h libnm: (trivial) correct an example in NMSecretAgentOldGetSecretsFunc docs 2014-11-26 14:07:46 +01:00
nm-types.h libnm: rename NMSecretAgent to NMSecretAgentOld 2014-11-21 12:17:41 -05:00
nm-vpn-connection.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-vpn-connection.h libnm: add nm-types.h, to avoid include loops 2014-10-10 13:10:18 -04:00
nm-vpn-editor-plugin.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-vpn-editor-plugin.h libnm, docs: docs fixes 2014-11-07 13:16:54 -05:00
nm-vpn-plugin-old.c libnm-glib/libnm/vpn: fix handling of ConnectInteractive() failure (rh #1298732) 2016-03-02 11:28:27 +01:00
nm-vpn-plugin-old.h libnm: merge nm-vpn-plugin-utils into nm-vpn-plugin-old 2014-10-28 14:50:27 -04:00
nm-wimax-nsp.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-wimax-nsp.h libnm, docs: docs fixes 2014-11-07 13:16:54 -05:00