dbus: Deauthenticate instead of disassociate on disconnect command

This clears up authentication state in the driver and in case of
cfg80211, unlocks the BSS entry for the previously used AP. The
previous commit cf4783e35f changed
only the ctrl_iface DISCONNECT command behavior; this new commit
does the same for D-Bus commands.
This commit is contained in:
Jouni Malinen 2010-08-18 21:27:30 +03:00
parent 7e26053a2c
commit f9cd8587fb
2 changed files with 7 additions and 4 deletions

View file

@ -1300,7 +1300,8 @@ DBusMessage * wpas_dbus_handler_disconnect(DBusMessage *message,
{
if (wpa_s->current_ssid != NULL) {
wpa_s->disconnected = 1;
wpa_supplicant_disassociate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
wpa_supplicant_deauthenticate(wpa_s,
WLAN_REASON_DEAUTH_LEAVING);
return NULL;
}
@ -1433,7 +1434,8 @@ DBusMessage * wpas_dbus_handler_remove_network(DBusMessage *message,
}
if (ssid == wpa_s->current_ssid)
wpa_supplicant_disassociate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
wpa_supplicant_deauthenticate(wpa_s,
WLAN_REASON_DEAUTH_LEAVING);
out:
os_free(iface);

View file

@ -872,7 +872,8 @@ DBusMessage * wpas_dbus_iface_remove_network(DBusMessage *message,
}
if (ssid == wpa_s->current_ssid)
wpa_supplicant_disassociate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
wpa_supplicant_deauthenticate(wpa_s,
WLAN_REASON_DEAUTH_LEAVING);
reply = wpas_dbus_new_success_reply(message);
out:
@ -1141,7 +1142,7 @@ DBusMessage * wpas_dbus_iface_disconnect(DBusMessage *message,
struct wpa_supplicant *wpa_s)
{
wpa_s->disconnected = 1;
wpa_supplicant_disassociate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
return wpas_dbus_new_success_reply(message);
}