P2P: Fix network removal on P2P connect to select correct block
If wpa_s->current_ssid is not set (e.g., after disconnection that did not result in immediate group removal), an incorrect group could have been removed since the network block iteration here could select the network block that is used to store persistent group credentials. Fix this by verifying that disabled != 2 to avoid picking the network block that could not have been the temporary P2P group. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
		
							parent
							
								
									ec947ffcd8
								
							
						
					
					
						commit
						6d22a377bd
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -260,7 +260,7 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s, | ||||||
| 		 */ | 		 */ | ||||||
| 		ssid = wpa_s->conf->ssid; | 		ssid = wpa_s->conf->ssid; | ||||||
| 		while (ssid) { | 		while (ssid) { | ||||||
| 			if (ssid->p2p_group) | 			if (ssid->p2p_group && ssid->disabled != 2) | ||||||
| 				break; | 				break; | ||||||
| 			ssid = ssid->next; | 			ssid = ssid->next; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Jouni Malinen
						Jouni Malinen