Skip to content
Snippets Groups Projects

agent_map: send policy config to returning nodes

Closed Jakob Olsson requested to merge vlan-reconf-while-away into release-6.5
3 files
+ 83
0
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 46
0
@@ -104,6 +104,14 @@ static int check_supported_band_tlv(struct tlv *t)
sizeof(struct tlv_supported_band));
}
/* Check 1905.1 AL MAC address type TLV */
static int check_client_assoc_event_tlv(struct tlv *t)
{
/* macaddr (6 bytes) + macaddr (6 bytes) + assoc event (1 byte) */
return check_serialized_tlv(t,
sizeof(struct tlv_client_assoc_event));
}
static int check_service_tlv(struct tlv *t)
{
int offset = 0;
@@ -824,3 +832,41 @@ bool validate_ap_autoconfig_response(struct cmdu_buff *cmdu, struct tlv *tv[][16
return true;
}
bool validate_topology_notification(struct cmdu_buff *cmdu, struct tlv *tv[][16])
{
struct tlv_policy a_policy[] = {
[0] = { .type = TLV_TYPE_AL_MAC_ADDRESS_TYPE,
.present = TLV_PRESENT_ONE,
.minlen = 6,
.maxlen = 6,
},
[1] = { .type = MAP_TLV_CLIENT_ASSOCIATION_EVENT,
.present = TLV_PRESENT_OPTIONAL_MORE,
.minlen = 13,
.maxlen = 13,
}
};
int ret;
int num = 0;
trace("%s |" MACFMT "|CMDU: ap autoconfig response\n",
__func__, MAC2STR(cmdu->origin));
ret = cmdu_parse_tlvs(cmdu, tv, a_policy, 2);
if (ret) {
dbg("%s: parse_tlv failed\n", __func__);
return false;
}
/* Parse SupportedRole TLV */
if (check_al_mac_addr_type_tlv(tv[0][0]))
return false;
while (tv[1][num]) {
if (check_client_assoc_event_tlv(tv[1][num++]))
return false;
}
return true;
}
Loading