IP adress config.

FossilOrigin-Name: 8b789ffc73b809ef9ad3a1422912b0369ca28edfc4f6dab4b3032890ace98f44
This commit is contained in:
7u83@mail.ru 2016-03-31 05:52:15 +00:00
parent 85b14ab7c8
commit 752e985c86
2 changed files with 8 additions and 1 deletions

View File

@ -27,6 +27,7 @@
#include "cw/vendors.h"
char * conf_primary_if=0;
char * conf_ip=0;
char * conf_wtpname=0;
char * conf_dtls_psk=0;
char * conf_sslkeyfilename=0;
@ -94,6 +95,7 @@ LONGSTRS conf_timer_cfgstrs[] = {
int wtpconf_primary_if()
{
if (!conf_primary_if ) {
conf_primary_if = sock_get_primary_if(AF_INET6);
if (!conf_primary_if)
@ -107,7 +109,10 @@ int wtpconf_primary_if()
}
if (!sock_getifhwaddr(conf_primary_if,conf_macaddress,&conf_macaddress_len)){
cw_log(LOG_ERR,"Fatal: Unable to detect link layer address for %s.",conf_primary_if);
cw_log(LOG_ERR,"Fatal: Unable to detect link layer address for %s:",conf_primary_if,
strerror(errno));
return 0;
};
@ -223,6 +228,7 @@ int wtpconf_preinit()
int wtpconf_init()
{
if (!wtpconf_primary_if()){
cw_log(LOG_ERR,"Fatal: Error initialing primary interface.");
goto errX;

View File

@ -35,6 +35,7 @@ extern bstr_t conf_board_revision;
extern struct sockaddr_storage * conf_preffered_ac_sa;
extern char * conf_primary_if;
extern char * conf_ip;
extern char ** conf_ac_list;