@ -2524,6 +2524,22 @@ static int hostapd_ctrl_resend_group_m1(struct hostapd_data *hapd,
}
static int hostapd_ctrl_rekey_ptk ( struct hostapd_data * hapd , const char * cmd )
{
struct sta_info * sta ;
u8 addr [ ETH_ALEN ] ;
if ( hwaddr_aton ( cmd , addr ) )
return - 1 ;
sta = ap_get_sta ( hapd , addr ) ;
if ( ! sta | | ! sta - > wpa_sm )
return - 1 ;
return wpa_auth_rekey_ptk ( hapd - > wpa_auth , sta - > wpa_sm ) ;
}
static int hostapd_ctrl_get_pmksa_pmk ( struct hostapd_data * hapd , const u8 * addr ,
char * buf , size_t buflen )
{
@ -3670,6 +3686,9 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
} else if ( os_strncmp ( buf , " RESEND_GROUP_M1 " , 16 ) = = 0 ) {
if ( hostapd_ctrl_resend_group_m1 ( hapd , buf + 16 ) < 0 )
reply_len = - 1 ;
} else if ( os_strncmp ( buf , " REKEY_PTK " , 10 ) = = 0 ) {
if ( hostapd_ctrl_rekey_ptk ( hapd , buf + 10 ) < 0 )
reply_len = - 1 ;
} else if ( os_strcmp ( buf , " REKEY_GTK " ) = = 0 ) {
if ( wpa_auth_rekey_gtk ( hapd - > wpa_auth ) < 0 )
reply_len = - 1 ;