]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix regression in P2P group interface removal
authorJouni Malinen <j@w1.fi>
Sun, 24 Nov 2013 10:41:32 +0000 (12:41 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 24 Nov 2013 10:41:32 +0000 (12:41 +0200)
Commit 390e489c0d9415caf103367136eaa534b559837c extended hostapd BSS
interface removal capabilities. However, it ended up causing a
regression in wpa_supplicant P2P group interface handling. That P2P
group interface is removed through another driver_nl80211.c BSS context
and as such, the bss->added_if is not set. Fix this by verifying whether
the request is for another ifindex and if so, removing the interface
even if added_if is not marked.

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

src/drivers/driver_nl80211.c

index eaca17250287388cba2ae2e9b75215275f8d3666..64ab29a6356e7aacc6842fe1f1d701af784dfda2 100644 (file)
@@ -9490,7 +9490,7 @@ static int wpa_driver_nl80211_if_remove(struct i802_bss *bss,
 
        wpa_printf(MSG_DEBUG, "nl80211: %s(type=%d ifname=%s) ifindex=%d added_if=%d",
                   __func__, type, ifname, ifindex, bss->added_if);
-       if (ifindex > 0 && bss->added_if)
+       if (ifindex > 0 && (bss->added_if || bss->ifindex != ifindex))
                nl80211_remove_iface(drv, ifindex);
 
        if (type != WPA_IF_AP_BSS)