More strict capwap actube and wtp.

FossilOrigin-Name: 73d6e8e84bdf334760945de51e4f4f4b14e15a34fed5477700e3bb388aa4b727
This commit is contained in:
7u83@mail.ru
2015-04-26 13:48:40 +00:00
parent 434305390b
commit e9b94947a9
5 changed files with 33 additions and 14 deletions

View File

@ -13,6 +13,16 @@ int cw_in_check_join_resp(struct conn *conn, struct cw_action_in *a, uint8_t * d
cw_action_in_t * mlist[60];
mbag_item_t * jresult = mbag_get(conn->incomming,CW_ITEM_RESULT_CODE);
if (jresult ) {
if (!cw_rcok(jresult->dword)){
return jresult->dword;
}
}
/* Check for mandatory elements */
int n = cw_check_missing_mand(mlist,conn,a);
if (n && conn->strict_capwap) {
@ -27,7 +37,6 @@ int cw_in_check_join_resp(struct conn *conn, struct cw_action_in *a, uint8_t * d
mbag_item_t * jresult = mbag_get(conn->incomming, CW_ITEM_RESULT_CODE);
if ( jresult ) {
return jresult->dword;

View File

@ -5,10 +5,12 @@
#include "capwap_items.h"
#include "capwap.h"
static int cw_put_encryption_subelems(uint8_t *dst)
static int cw_put_encryption_subelems(uint8_t *dst,int capwap_mode)
{
cw_put_word(dst,0x01);
return 2;
if (capwap_mode==CW_MODE_CISCO){
cw_put_word(dst,0x01);
return 2;
}
int n=2;
@ -34,9 +36,10 @@ int cw_out_wtp_descriptor(struct conn *conn, struct cw_action_out *a, uint8_t *
// XXX Dummy WTP Descriptor Header
uint8_t *d = dst+4;
d+=cw_put_byte(d,2); //max radios
d+=cw_put_byte(d,conn->radios->count); //max radios
d+=cw_put_byte(d,2); //radios in use
d+=cw_put_encryption_subelems(d);
d+=cw_put_encryption_subelems(d,conn->capwap_mode);
mbag_item_t * i;
i = mbag_get(mbag,CW_ITEM_WTP_HARDWARE_VERSION);