Hi Grant,

On Tue, 2013-05-28 at 19:13 -0700, Grant Erickson wrote:
> I am debugging an issue in which there are reports of not being able
> to connect to or see a particular SSID scanned (let me know if you
> want specific details) for an extended period (several hours).
> 
> I've been able to correlate them back to this check-in:
> 
>       commit b0cb897fe9fc4d29b07eb1356d61f641cbe594a1
>       Author: Patrik Flykt <[email protected]>
>       Date:   Fri Dec 2 13:55:36 2011 +0200
> 
>               wifi: Disable network in disconnected state
>       
>               Disable WiFi network when it ends up in disconnected state
>               in order to prevent wpa_supplicant looping forever retrying.
>       
>               Fixes BMC#23973
> 
>       diff --git a/plugins/wifi.c b/plugins/wifi.c
>       index 745c2cb..538230a 100644
>       --- a/plugins/wifi.c
>       +++ b/plugins/wifi.c
>       @@ -912,12 +912,6 @@ static connman_bool_t
> handle_4way_handshake_failure(GSupplicantInterface *interf
>               if (wifi->retries < MAXIMUM_RETRIES)
>                       return TRUE;
>  
>       -   /* We disable the selected network, if not then
>       -    * wpa_supplicant will loop retrying */
>       -   if (g_supplicant_interface_enable_selected_network(interface,
>       -                               FALSE) != 0)
>       -       DBG("Could not disables selected network");
>       -
>               connman_network_set_error(network,
> CONNMAN_NETWORK_ERROR_INVALID_KEY);
>  
>               return FALSE;
>       @@ -987,6 +981,12 @@ static void interface_state(GSupplicantInterface
> *interface)
>                                                       network, wifi) == TRUE)
>                               break;
>  
>       +       /* We disable the selected network, if not then
>       +        * wpa_supplicant will loop retrying */
>       +       if (g_supplicant_interface_enable_selected_network(interface,
>       +                       FALSE) != 0)
>       +           DBG("Could not disables selected network");
>       +
>                       connman_network_set_associating(network, FALSE);
>                       connman_network_set_connected(network, FALSE);
>                       break;
> 
> Under what circumstances would such a network get re-enabled? As far
> as I can tell, a complete system reboot or network stack restart is
> it; otherwise, that SSID / network appears to be disabled
> indefinitely.
> 
> Thoughts or insights?

This change doesn't seem to be the cause you are looking for.

This part of the code is called when going to state
G_SUPPLICANT_STATE_DISCONNECTED. If the code setting
g_supplicant_interface_enable_selected_network() to FALSE is wrong when
handle_4way_handshake_failure() returns FALSE, then every disconnected
WiFi network should require the same reboot. This because
handle_4way_handshake_failure() also returns FALSE if the previous state
was not a 4-way handshake, i.e. it was already properly connected or
something else.

(Re-)Enabling a supplicant interface is handled by wpa_supplicant
itself.

So the cause of this is (unfortunately) somewhere else. That particular
patch is awfully old and I don't remember anything recent resembling the
described behavior.


Cheers,

        Patrik

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to