Reload function for Hostapd
Teresa
gooog77
Sat Mar 29 01:55:10 PST 2003
Dear All,
I try to implement reload function for Hostapd.
But it's seems 802.1x didnt work....
Can someone please take a look at these code...and give me some advices...
Please...I really really need your help.
=============================================================
static void handle_reload(.....)
{
.......
hostapd *hapd = (hostapd *) eloop_ctx;
struct hostapd_config *newconf;
printf("Signal %d received - reloading configuration\n", sig);
newconf = hostapd_config_read(hapd->config_fname);
if (newconf == NULL) {
printf("Failed to read new configuration file - continuing "
"with old.\n");
return;
}
/* TODO: update dynamic data based on changed configuration items
* (e.g., open/close sockets, remove stations added to deny list, etc.)
*/
//*************Here is what I add*****************//
hostapd_config_free(hapd->conf);
//close socket
if(hapd->auth_serv_sock >=0 )
close(hapd->auth_serv_sock >=0);
if(hapd->acct_serv_sock >=0 )
close(hapd->acct_serv_sock >=0);
sta = hapd->sta_list;
hapd->conf = newconf;
hostapd_init_sockets(hapd);
ieee802_1x_init(hapd);
hostpad_free_stas(hapd);
}
=============================================================
Thank you everybody...thanks.
More information about the Hostap
mailing list