Commit 2f797c99 authored by Nevadita's avatar Nevadita
Browse files

map_cntrl: Fixed the 1905 ACK crash and added error TLV 17.2.36

parent d3268484
Pipeline #10238 failed with stages
in 1 minute and 13 seconds
......@@ -494,7 +494,7 @@ bool is_cmdu_for_us(void *module, uint16_t type)
/* TODO: handle cmdu types relevant for operating profile. */
if (type >= CMDU_TYPE_1905_START && type <= CMDU_TYPE_MAP_START) {
if (type >= CMDU_TYPE_1905_START && type <= CMDU_TYPE_1905_END) {
if (i1905ftable[type].handle)
return true;
} else if (type >= CMDU_TYPE_MAP_START && type <= CMDU_TYPE_MAP_END) {
......
......@@ -58,6 +58,33 @@ int debug_ap_autoconfig_wsc(void *cntlr, struct cmdu_cstruct *cmdu)
int debug_1905_ack(void *cntlr, struct cmdu_cstruct *cmdu)
{
trace("%s: --->\n", __func__);
trace("parsing 1905 ack of |%s:" MACFMT "|\n", cmdu->intf_name,
MAC2STR(cmdu->origin));
int i, j, k;
uint8_t *tlv = NULL;
for (i = 0; i < cmdu->num_tlvs; i++) {
tlv = (uint8_t *) cmdu->tlvs[i];
trace("CMDU type: %s\n", map_stringify_tlv_type(*tlv));
switch (*tlv) {
case MAP_TLV_ERROR_CODE:
{
struct tlv_error_code *p = (struct tlv_error_code *)tlv;
trace("\treason_code: %d\n",
p->reason_code);
trace("\tsta addr: " MACFMT "\n",
MAC2STR(p->addr));
break;
}
default:
fprintf(stdout, "unknown TLV in CMDU:|%s|",
map_stringify_cmdu_type(cmdu->message_type));
break;
}
trace("\n");
}
return 0;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment