some improvements to support Cisco.
FossilOrigin-Name: 9f0d9e58d55f90bd2020ef622b2501bccbb6038972c04550cb06248139b080c5
This commit is contained in:
@ -153,6 +153,12 @@ int read_config(const char * filename){
|
||||
if (str)
|
||||
conf_sslcertfilename=strdup(str);
|
||||
|
||||
|
||||
str = uci_lookup_option_string(ctx,section,"ssl_cipher");
|
||||
if (str)
|
||||
conf_dtls_cipher=strdup(str);
|
||||
|
||||
|
||||
str = uci_lookup_option_string(ctx,section,"vendor_id");
|
||||
if (str)
|
||||
conf_vendor_id=atoi(str);
|
||||
@ -163,6 +169,13 @@ int read_config(const char * filename){
|
||||
bstr_replace(&conf_software_version,s);
|
||||
}
|
||||
|
||||
str = uci_lookup_option_string(ctx,section,"serial_no");
|
||||
if (str){
|
||||
uint8_t * s = bstr_create_from_cfgstr(str);
|
||||
bstr_replace(&conf_serial_no,s);
|
||||
}
|
||||
|
||||
|
||||
str = uci_lookup_option_string(ctx,section,"model_no");
|
||||
if (str){
|
||||
uint8_t * s = bstr_create_from_cfgstr(str);
|
||||
|
@ -46,6 +46,8 @@ int join_state(struct conn * conn)
|
||||
|
||||
struct cwrmsg * cwrmsg = conn_get_message(conn);
|
||||
|
||||
printf("Received %08p\n",cwrmsg);
|
||||
|
||||
// cw_log_debug0("Received message %i",cwrmsg->seqnum);
|
||||
|
||||
if (cwrmsg->type != CWMSG_JOIN_RESPONSE || cwrmsg->seqnum != conn->seqnum){
|
||||
@ -117,15 +119,12 @@ int join(struct sockaddr *sa)
|
||||
sock_addrtostr(sa,str,100);
|
||||
cw_log(LOG_ERR,"Can't establish DTLS connection to %s",str);
|
||||
close(sockfd);
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
exit(0);
|
||||
|
||||
#endif
|
||||
cw_dbg (DBG_DTLS,"DTLS session established with %s, cipher=%s",sock_addr2str(sa),dtls_get_cipher(conn));
|
||||
exit(0);
|
||||
|
||||
|
||||
#ifdef WITH_CW_LOG_DEBUG
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "capwap/sock.h"
|
||||
#include "capwap/cw_log.h"
|
||||
|
||||
#include "capwap/bstr.h"
|
||||
|
||||
|
||||
char * conf_primary_if=0;
|
||||
char * conf_wtpname=0;
|
||||
@ -69,7 +71,7 @@ uint32_t * conf_hardware_vendor_id;
|
||||
uint8_t * conf_hardware_version;
|
||||
|
||||
uint8_t * conf_model_no;
|
||||
uint8_t * cont_serial_no;
|
||||
uint8_t * conf_serial_no;
|
||||
|
||||
|
||||
LONGSTRS conf_timer_cfgstrs[] = {
|
||||
@ -136,9 +138,10 @@ int wtpconf_name()
|
||||
|
||||
|
||||
char * default_ac_list[] = {
|
||||
"192.168.0.255",
|
||||
// "192.168.0.255",
|
||||
"255.255.255.255",
|
||||
// "224.0.1.140",
|
||||
// "192.168.0.12"
|
||||
};
|
||||
|
||||
int wtpconf_ac_list()
|
||||
@ -198,7 +201,8 @@ int wtpconf_preinit()
|
||||
|
||||
|
||||
conf_vendor_id = CONF_DEFAULT_VENDOR_ID;
|
||||
conf_software_version = bstr_create(CONF_DEFAULT_SOFTWARE_VERSION);
|
||||
conf_software_version = bstr_create_from_cfgstr(CONF_DEFAULT_SOFTWARE_VERSION);
|
||||
conf_serial_no = bstr_create_from_cfgstr(CONF_DEFAULT_SERIAL_NO);
|
||||
|
||||
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ extern uint32_t * conf_hardware_vendor_id;
|
||||
extern uint8_t * conf_hardware_version;
|
||||
|
||||
extern uint8_t * conf_model_no;
|
||||
extern uint8_t * cont_serial_no;
|
||||
extern uint8_t * conf_serial_no;
|
||||
|
||||
|
||||
|
||||
|
@ -13,9 +13,12 @@
|
||||
struct wtpinfo * get_wtpinfo()
|
||||
{
|
||||
struct wtpinfo * wtpinfo;
|
||||
|
||||
|
||||
wtpinfo=malloc(sizeof(struct wtpinfo));
|
||||
memset(wtpinfo,0,sizeof(struct wtpinfo));
|
||||
|
||||
wtpinfo->capwap_mode=CWMODE_CISCO;
|
||||
wtpinfo->name = (uint8_t*)"wtp";
|
||||
wtpinfo->location = (uint8_t*)"Unknown";
|
||||
|
||||
@ -26,7 +29,7 @@ struct wtpinfo * get_wtpinfo()
|
||||
|
||||
}
|
||||
*/
|
||||
wtpinfo->serial_no="123456789";
|
||||
wtpinfo->serial_no=conf_serial_no;
|
||||
wtpinfo->vendor_id=conf_vendor_id;
|
||||
|
||||
wtpinfo->model_no=conf_model_no;
|
||||
|
@ -18,6 +18,10 @@ config 'wtp'
|
||||
option ssl_cert
|
||||
option ssl_key
|
||||
|
||||
# ciphers
|
||||
#
|
||||
option ssl_cipher
|
||||
|
||||
# vendor id
|
||||
# set the vendor id as integer value
|
||||
# default is gnu
|
||||
@ -29,7 +33,7 @@ config 'wtp'
|
||||
|
||||
|
||||
config 'dbg'
|
||||
# defbug options
|
||||
# debug options
|
||||
option dtls 0
|
||||
option dtls_detail 0
|
||||
option dtls_bio 0
|
||||
|
Reference in New Issue
Block a user