IP adress config.
FossilOrigin-Name: 8b789ffc73b809ef9ad3a1422912b0369ca28edfc4f6dab4b3032890ace98f44
This commit is contained in:
parent
85b14ab7c8
commit
752e985c86
@ -27,6 +27,7 @@
|
|||||||
#include "cw/vendors.h"
|
#include "cw/vendors.h"
|
||||||
|
|
||||||
char * conf_primary_if=0;
|
char * conf_primary_if=0;
|
||||||
|
char * conf_ip=0;
|
||||||
char * conf_wtpname=0;
|
char * conf_wtpname=0;
|
||||||
char * conf_dtls_psk=0;
|
char * conf_dtls_psk=0;
|
||||||
char * conf_sslkeyfilename=0;
|
char * conf_sslkeyfilename=0;
|
||||||
@ -94,6 +95,7 @@ LONGSTRS conf_timer_cfgstrs[] = {
|
|||||||
|
|
||||||
int wtpconf_primary_if()
|
int wtpconf_primary_if()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!conf_primary_if ) {
|
if (!conf_primary_if ) {
|
||||||
conf_primary_if = sock_get_primary_if(AF_INET6);
|
conf_primary_if = sock_get_primary_if(AF_INET6);
|
||||||
if (!conf_primary_if)
|
if (!conf_primary_if)
|
||||||
@ -107,7 +109,10 @@ int wtpconf_primary_if()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!sock_getifhwaddr(conf_primary_if,conf_macaddress,&conf_macaddress_len)){
|
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;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -223,6 +228,7 @@ int wtpconf_preinit()
|
|||||||
int wtpconf_init()
|
int wtpconf_init()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if (!wtpconf_primary_if()){
|
if (!wtpconf_primary_if()){
|
||||||
cw_log(LOG_ERR,"Fatal: Error initialing primary interface.");
|
cw_log(LOG_ERR,"Fatal: Error initialing primary interface.");
|
||||||
goto errX;
|
goto errX;
|
||||||
|
@ -35,6 +35,7 @@ extern bstr_t conf_board_revision;
|
|||||||
|
|
||||||
extern struct sockaddr_storage * conf_preffered_ac_sa;
|
extern struct sockaddr_storage * conf_preffered_ac_sa;
|
||||||
extern char * conf_primary_if;
|
extern char * conf_primary_if;
|
||||||
|
extern char * conf_ip;
|
||||||
|
|
||||||
extern char ** conf_ac_list;
|
extern char ** conf_ac_list;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user