NetworkManager/libnm-glib
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
libnm-glib-test.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
libnm-glib-vpn.pc.in release: bump version to 0.9.0 2011-08-22 20:33:07 -05:00
libnm-glib-vpn.ver libnm-glib-vpn: add support for interactive secrets requests 2013-07-31 08:16:40 -05:00
libnm-glib.pc.in libnm-glib,libnm-util: -glib requires -util, -util requires NetworkManager 2013-03-14 10:23:19 -05:00
libnm-glib.ver wifi: expose the last_seen property for a NMAccessPoint 2015-08-07 12:38:24 -05:00
libnm_glib.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
libnm_glib.h libnm-glib: deprecate original libnm_glib bits 2010-03-10 09:18:08 -08: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
nm-access-point.c wifi: expose the last_seen property for a NMAccessPoint 2015-08-07 12:38:24 -05:00
nm-access-point.h libnm-glib: 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-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-client.c libnm-glib: fix another memory leak around update_permissions() 2016-01-26 12:35:16 +01:00
nm-client.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-dbus-helpers-private.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-dbus-helpers.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-adsl.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-adsl.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-bond.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-bond.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-bridge.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-bridge.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-bt.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-bt.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-ethernet.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-ethernet.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-generic.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-generic.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-infiniband.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-infiniband.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-modem.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-modem.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-olpc-mesh.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-olpc-mesh.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-private.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-team.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-team.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -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-glib: add :parent property for VLAN devices 2014-11-24 10:33:22 +01:00
nm-device-wifi.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-wifi.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-wimax.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-wimax.h libnm-util, libnm-glib: whitespace fixes 2014-07-15 09:44:55 -04:00
nm-device.c docs: misc small fixes 2014-12-18 13:46:11 -05:00
nm-device.h libnm-glib: implement nm_device_delete() for D-Bus device' Delete() method 2014-07-22 14:24:42 +02:00
nm-dhcp4-config.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-dhcp4-config.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-dhcp6-config.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-dhcp6-config.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-ip4-config.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-ip4-config.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-ip6-config.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-ip6-config.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-object-cache.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-object-cache.h libnm-glib: fix a crash when using multiple NMClients 2014-08-01 12:12:42 -04:00
nm-object-private.h libnm-util, libnm-glib: whitespace fixes 2014-07-15 09:44:55 -04:00
nm-object.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-object.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-remote-connection-private.h libnm-util, libnm-glib: whitespace fixes 2014-07-15 09:44:55 -04:00
nm-remote-connection.c libnm*: fix library gettext usage 2014-11-13 17:18:42 -05:00
nm-remote-connection.h libnm-util, libnm-glib: whitespace fixes 2014-07-15 09:44:55 -04:00
nm-remote-settings.c libnm-glib: avoid coverity warning 2015-06-25 20:50:54 +02:00
nm-remote-settings.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-secret-agent.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-secret-agent.h docs: misc small fixes 2014-12-18 13:46:11 -05:00
nm-types-private.h libnm-util, libnm-glib: whitespace fixes 2014-07-15 09:44:55 -04:00
nm-types.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-types.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-vpn-connection.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-vpn-connection.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-vpn-plugin-ui-interface.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-vpn-plugin-ui-interface.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-vpn-plugin-utils.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-vpn-plugin-utils.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-vpn-plugin.c libnm-glib/libnm/vpn: fix handling of ConnectInteractive() failure (rh #1298732) 2016-03-02 11:28:27 +01:00
nm-vpn-plugin.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-wimax-nsp.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-wimax-nsp.h docs: misc small fixes 2014-12-18 13:46:11 -05:00