wifi: clear wireless secrets tries counter when deactivating
If NM asks for secrets, and then a client calls ActivateDevice on that same connection, the secrets tries counter doesn't get reset and NM then thinks we need completely new secrets when we really don't since the old secrets request isn't valid anymore. Found by Evan Broder
This commit is contained in:
@@ -1232,6 +1232,15 @@ real_deactivate_quickly (NMDevice *dev)
|
||||
NMDeviceWifi *self = NM_DEVICE_WIFI (dev);
|
||||
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
|
||||
NMAccessPoint *orig_ap = nm_device_wifi_get_activation_ap (self);
|
||||
NMActRequest *req;
|
||||
NMConnection *connection;
|
||||
|
||||
req = nm_device_get_act_request (dev);
|
||||
if (req) {
|
||||
connection = nm_act_request_get_connection (req);
|
||||
/* Clear wireless secrets tries when deactivating */
|
||||
g_object_set_data (G_OBJECT (connection), WIRELESS_SECRETS_TRIES, NULL);
|
||||
}
|
||||
|
||||
cleanup_association_attempt (self, TRUE);
|
||||
|
||||
|
Reference in New Issue
Block a user