mod_capwap sends correct wtp descriptor now.

FossilOrigin-Name: b1f651a31ae1205d51b70d058e975756b6a302d5c75b5a98e441f3369d5fe5d2
This commit is contained in:
7u83@mail.ru
2016-03-04 21:32:01 +00:00
parent b47702131d
commit d85ef39abe
7 changed files with 40 additions and 14 deletions

View File

@ -5,7 +5,7 @@ include ../../Config.mak
OBJS:=$(patsubst %.o,$(ARCH)/%.o,$(OBJS))
CFLAGS = -Wall -g -O0 -D_REENTRANT -DWITH_IPV6 -DWITH_RMAC_SUPPORT -I ../../ -I../
CFLAGS = -Wall -g -O0 -D_REENTRANT -DWITH_IPV6 $(COMPDEFS) -DWITH_RMAC_SUPPORT -I ../../ -I../
LIBDIR=../../lib/$(ARCH)

View File

@ -45,7 +45,9 @@ int capwap_out_wtp_descriptor(struct conn *conn, struct cw_action_out *a, uint8_
cw_log(LOG_ERR, "Can't send Hardware Version in WTP Descriptor, not set.");
}
i = mbag_get(mbag,CW_ITEM_WTP_SOFTWARE_VERSION);
if ( i ) {
d += cw_put_version(d,CW_SUBELEM_WTP_SOFTWARE_VERSION,i->data);
}
@ -53,6 +55,14 @@ int capwap_out_wtp_descriptor(struct conn *conn, struct cw_action_out *a, uint8_
cw_log(LOG_ERR, "Can't send Software Version in WTP descriptor, not set.");
}
i = mbag_get(mbag,CW_ITEM_WTP_BOOTLOADER_VERSION);
if ( i ) {
d += cw_put_version(d,CW_SUBELEM_WTP_BOOTLOADER_VERSION,i->data);
}
else {
cw_log(LOG_ERR, "Can't send Software Version in WTP descriptor, not set.");
}
int len = d-dst-4;
return len + cw_put_elem_hdr(dst,a->elem_id,len);