]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
D-Bus: Do not send network notification for all P2P groups
authorJouni Malinen <j@w1.fi>
Sat, 31 Aug 2013 13:44:42 +0000 (16:44 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 31 Aug 2013 13:44:42 +0000 (16:44 +0300)
Previously, network added event was skipping during group formation.
However, this did not necessarily catch all cases of temporary P2P
network blocks. Check ssid->p2p_group to make this behavior more
consistent by avoiding all P2P groups.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/notify.c

index 35a029f24f36c8e5f3a3e58054d36383349ba915..40cffdfff258549a026f8dc6d31d7f7de60b99f3 100644 (file)
@@ -222,7 +222,7 @@ void wpas_notify_network_added(struct wpa_supplicant *wpa_s,
         * applications since these network objects won't behave like
         * regular ones.
         */
-       if (wpa_s->global->p2p_group_formation != wpa_s)
+       if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s)
                wpas_dbus_register_network(wpa_s, ssid);
 }
 
@@ -250,7 +250,7 @@ void wpas_notify_network_removed(struct wpa_supplicant *wpa_s,
 {
        if (wpa_s->wpa)
                wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid);
-       if (wpa_s->global->p2p_group_formation != wpa_s)
+       if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s)
                wpas_dbus_unregister_network(wpa_s, ssid->id);
 #ifdef CONFIG_P2P
        wpas_p2p_network_removed(wpa_s, ssid);