aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Chen <jimmycmchen@google.com>2021-08-18 13:21:30 +0800
committerJimmy Chen <jimmycmchen@google.com>2021-08-25 02:37:51 +0000
commit7a3f120155038f909e149d04d44bef801e3bf8fc (patch)
tree1d1313cc42416fdb3a7d20dda191698ecb697316
parent7ad2a87249ffb01964735a4f3c908aee536bf856 (diff)
downloadwpa_supplicant_8-7a3f120155038f909e149d04d44bef801e3bf8fc.tar.gz
p2p: remove all p2p groups when p2p dev interface is removed.
The p2p dev interface is not a top interface, but a child of the global interface. When this interface is removed, p2p groups will not be removed. To avoid leaking p2p groups, p2p groups should be removed when p2p dev interface is removed. Bug: 195618672 Test: create a group and remove the top interface by wpa_cli command. Change-Id: Ia3e0c0512314ae55dee9a81661f51eee6e8e3428 Merged-In: Ia3e0c0512314ae55dee9a81661f51eee6e8e3428 (cherry picked from commit 0e73c009c960899568be5976bffdd77d836e959a)
-rw-r--r--wpa_supplicant/wpa_supplicant.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index ff3a9646..3471b995 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -6694,7 +6694,7 @@ static void wpa_supplicant_deinit_iface(struct wpa_supplicant *wpa_s,
struct wpa_global *global = wpa_s->global;
struct wpa_supplicant *iface, *prev;
- if (wpa_s == wpa_s->parent)
+ if (wpa_s == wpa_s->parent || (wpa_s == wpa_s->p2pdev && wpa_s->p2p_mgmt))
wpas_p2p_group_remove(wpa_s, "*");
iface = global->ifaces;