Reading wtp descriptor works now - at least cisco
FossilOrigin-Name: ee2e8a3fdf9d353237161a0af0148367afc20e8020315108c02154d9df521938
This commit is contained in:
@ -3,6 +3,18 @@
|
||||
#include "capwap.h"
|
||||
#include "capwap_items.h"
|
||||
#include "cw_types.h"
|
||||
#include "keys.h"
|
||||
|
||||
|
||||
static struct cw_DescriptorSubelemDef allowed_default[] = {
|
||||
{-1,CW_SUBELEM_WTP_HARDWARE_VERSION, CW_KEY_HARDWARE, 1024,0},
|
||||
{-1,CW_SUBELEM_WTP_SOFTWARE_VERSION, CW_KEY_SOFTWARE, 1024.0},
|
||||
{-1,CW_SUBELEM_WTP_BOOTLOADER_VERSION, CW_KEY_BOOTLOADER, 1024,0},
|
||||
{-1,CW_SUBELEM_WTP_OTHERSOFTWARE_VERSION, CW_KEY_OTHER_SOFTWARE, 1024,0},
|
||||
{0,0, NULL, 0,0}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Read WTP Descriptor in Cisco-Style (Draft 7)
|
||||
@ -30,20 +42,13 @@ int cw_read_wtp_descriptor_7(mavl_t cfg, struct conn *conn,
|
||||
pos = 2;
|
||||
|
||||
/* Encryption element, for now dumy XXX */
|
||||
//cw_get_word(data + pos + 2);
|
||||
/* //cw_get_word(data + pos + 2);*/
|
||||
pos += 2;
|
||||
|
||||
|
||||
static struct cw_DescriptorSubelemDef allowed_default[] = {
|
||||
{-1,CW_SUBELEM_WTP_HARDWARE_VERSION, CW_ITEM_WTP_HARDWARE_VERSION, 1024,0},
|
||||
{-1,CW_SUBELEM_WTP_SOFTWARE_VERSION, CW_ITEM_WTP_SOFTWARE_VERSION, 1024.0},
|
||||
{-1,CW_SUBELEM_WTP_BOOTLOADER_VERSION, CW_ITEM_WTP_SOFTWARE_VERSION, 1024,0},
|
||||
{-1,CW_SUBELEM_WTP_OTHERSOFTWARE_VERSION, CW_ITEM_WTP_SOFTWARE_VERSION, 1024,0},
|
||||
{0,0, NULL, 0,0}
|
||||
};
|
||||
|
||||
if (!allowed)
|
||||
allowed=allowed_default;
|
||||
|
||||
return cw_read_descriptor_subelems(cfg, data + pos, len - pos, allowed);
|
||||
return cw_read_descriptor_subelems(cfg, eh->key, data + pos, len - pos, allowed);
|
||||
}
|
||||
|
Reference in New Issue
Block a user