supplicant: handle some D-Bus spawn errors better

If D-Bus fails to spawn the supplicant it sometimes returns a method
timeout error instead of a spawn error.  We've seen that happen on
F18 when systemd is used to autolaunch the supplicant.  That causes
NM to assume that the supplicant crashed and thus never try to talk
to it again, on the assumption that (a) it crashed and (b) it will
crash again if we try to use it, and thus we'll be in a spawn loop.

First, (a) is not necessarily the case, and second, the supplicant
doesn't crash like that anymore.  So we're pretty safe to just talk
to the supplicant if it starts later instead of ignoring it if
we detect the timeout error.
This commit is contained in:
Dan Williams 2012-10-06 17:08:53 -05:00
parent 14e87a583a
commit 4cccab61ab

View file

@ -907,6 +907,7 @@ interface_add_cb (DBusGProxy *proxy,
|| g_error_matches (error, DBUS_GERROR, DBUS_GERROR_SPAWN_EXEC_FAILED)
|| g_error_matches (error, DBUS_GERROR, DBUS_GERROR_SPAWN_FORK_FAILED)
|| g_error_matches (error, DBUS_GERROR, DBUS_GERROR_SPAWN_FAILED)
|| g_error_matches (error, DBUS_GERROR, DBUS_GERROR_TIMEOUT)
|| dbus_g_error_has_name (error, DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND)) {
/* Supplicant wasn't running and could be launched via service
* activation. Wait for it to start by moving back to the INIT