Reload function for Hostapd

Teresa gooog77 at
Sat Mar 29 04:55:10 EST 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");
 /* 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*****************//
//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;


Thank you everybody...thanks.

More information about the HostAP mailing list