/* This function will be called whenever a station associates with the AP */
void hostapd_new_assoc_sta(hostapd *hapd, struct sta_info *sta, int reassoc)
{
	if (hapd->tkip_countermeasures) {
		hostapd_sta_deauth(hapd, sta->addr,
				   WLAN_REASON_MICHAEL_MIC_FAILURE);
		return;
	}

	/* IEEE 802.11F (IAPP) */
	if (hapd->conf->ieee802_11f)
		iapp_new_station(hapd->iapp, sta);

	/* Start accounting here, if IEEE 802.1X and WPA are not used.
	 * IEEE 802.1X/WPA code will start accounting after the station has
	 * been authorized. */
	if (!hapd->conf->ieee802_1x && !hapd->conf->wpa)
		accounting_sta_start(hapd, sta);

	/* Start IEEE 802.1X authentication process for new stations */
	ieee802_1x_new_station(hapd, sta);
	if (reassoc)
		wpa_sm_event(hapd, sta, WPA_REAUTH);
	else
		wpa_new_station(hapd, sta);
}
Beispiel #2
0
void hostapd_reassoc_sta(hostapd *hapd, struct sta_info *sta)
{
	/* IEEE 802.11F (IAPP) */
	if (hapd->conf->ieee802_11f)
		iapp_new_station(hapd->iapp, sta);

	/* Start accounting here, if IEEE 802.1X is not used. IEEE 802.1X code
	 * will start accounting after the station has been authorized. */
	if (!hapd->conf->ieee802_1x)
		accounting_sta_start(hapd, sta);
		
	/* Let 802.1x decide wether it should run or not */ 
	ieee802_1x_new_station(hapd, sta);
}
Beispiel #3
0
/* This function will be called whenever a station associates with the AP */
void hostapd_new_assoc_sta(hostapd *hapd, struct sta_info *sta)
{
	/* IEEE 802.11f (IAPP) */
	if (hapd->conf->ieee802_11f)
		iapp_new_station(hapd, sta);

	/* Start accounting here, if IEEE 802.1X is not used. IEEE 802.1X code
	 * will start accounting after the station has been authorized. */
	if (!hapd->conf->ieee802_1x)
		accounting_sta_start(hapd, sta);

	/* Start IEEE 802.1x authentication process for new stations */
	ieee802_1x_new_station(hapd, sta);
	wpa_new_station(hapd, sta);
}
Beispiel #4
0
/* This function will be called whenever a station associates with the AP */
void hostapd_new_assoc_sta(hostapd *hapd, struct sta_info *sta)
{

	if (hapd->tkip_countermeasures) {
		hostapd_sta_deauth(hapd, sta->addr, 
				     WLAN_REASON_MICHAEL_MIC_FAILURE);
		return;
	}
	
	/* IEEE 802.11F (IAPP) */
	if (hapd->conf->ieee802_11f)
		iapp_new_station(hapd->iapp, sta);

	/* Start accounting here, if IEEE 802.1X is not used. IEEE 802.1X code
	 * will start accounting after the station has been authorized. */
	if (!hapd->conf->ieee802_1x)
		accounting_sta_start(hapd, sta);

#ifdef JUMPSTART
	if (hapd->conf->js_p1) {
		/* Only one STA at a time to attempt Jumpstart */
		if (!hapd->jsw_profile->p1_in_progress) {
			hapd->jsw_profile->p1_in_progress = 1;
			HOSTAPD_DEBUG(HOSTAPD_DEBUG_MINIMAL, 
				      "JUMPSTART: " MACSTR 
				      " %s: starting P1\n",
				       MAC2STR(sta->addr), __func__); 
			js_p1_new_station(hapd, sta);
			/* Start the JS state machine */
			smSendEvent(sta->js_session, JSW_EVENT_ASSOC);
			
		} else {
			HOSTAPD_DEBUG(HOSTAPD_DEBUG_MINIMAL, 
				      "JUMPSTART: " MACSTR
				      "%s: P1 running with another STA."
				      " Disassoc\n",
				       MAC2STR(sta->addr), __func__); 
			hostapd_sta_disassoc(hapd, sta->addr, 
					     WLAN_REASON_UNSPECIFIED);
		}	
		return;
	}
#endif /* JUMPSTART */

	/* Start IEEE 802.1x authentication process for new stations */
	ieee802_1x_new_station(hapd, sta);
	wpa_new_station(hapd, sta);
}