aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/notify.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-06-10 20:58:21 (GMT)
committerJouni Malinen <j@w1.fi>2015-06-10 21:02:05 (GMT)
commit661888be399b58f60b2e51a977b9a99599875840 (patch)
treeadcca3d3ed161b0af5a3ba4cd4ac8090e8deed9f /wpa_supplicant/notify.c
parent3a59cda1d0c5159e26f2e28397218ced17f2ed4c (diff)
downloadhostap-661888be399b58f60b2e51a977b9a99599875840.zip
hostap-661888be399b58f60b2e51a977b9a99599875840.tar.gz
hostap-661888be399b58f60b2e51a977b9a99599875840.tar.bz2
P2P: Fix persistent group profile on manual disabled=2 change
ssid->p2p_persistent_group was left to its old value when changing a network profile to/from P2P persistent group type (disabled=2). This could result in unexpected behavior when using an incomplete persistent group profile. This was mainly visible through D-Bus network profile handling where a persistent group would not be unregistered insome cases. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/notify.c')
-rw-r--r--wpa_supplicant/notify.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index c60d404..822db74 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -790,10 +790,12 @@ void wpas_notify_network_type_changed(struct wpa_supplicant *wpa_s,
ssid->disabled = 0;
wpas_dbus_unregister_network(wpa_s, ssid->id);
ssid->disabled = 2;
+ ssid->p2p_persistent_group = 1;
wpas_dbus_register_persistent_group(wpa_s, ssid);
} else {
/* Changed from persistent group to normal network profile */
wpas_dbus_unregister_persistent_group(wpa_s, ssid->id);
+ ssid->p2p_persistent_group = 0;
wpas_dbus_register_network(wpa_s, ssid);
}
#endif /* CONFIG_P2P */