report supported Split MAC profiles and validate it in AC requests

This commit is contained in:
Andreas Schultz 2016-08-17 16:01:53 +02:00
parent de0ffd5153
commit 8cc6559f08
4 changed files with 26 additions and 0 deletions

View File

@ -173,6 +173,7 @@ void wtp_create_radioadmstate_element(struct capwap_packet_txmng* txmngpacket);
void wtp_create_radioopsstate_element(struct capwap_packet_txmng* txmngpacket);
void wtp_create_80211_wtpradioinformation_element(struct capwap_packet_txmng* txmngpacket);
void wtp_create_80211_encryption_capability_elements(struct capwap_packet_txmng *txmngpacket);
void wtp_create_80211_supported_mac_profiles_elements(struct capwap_packet_txmng *txmngpacket);
struct wtp_radio;

View File

@ -51,6 +51,7 @@ static void wtp_send_discovery_request()
if (g_wtp.binding == CAPWAP_WIRELESS_BINDING_IEEE80211) {
wtp_create_80211_wtpradioinformation_element(txmngpacket);
wtp_create_80211_encryption_capability_elements(txmngpacket);
wtp_create_80211_supported_mac_profiles_elements(txmngpacket);
}
/* CAPWAP_ELEMENT_MTUDISCOVERY */ /* TODO */

View File

@ -48,6 +48,7 @@ void wtp_dfa_state_join_enter(void)
if (g_wtp.binding == CAPWAP_WIRELESS_BINDING_IEEE80211) {
wtp_create_80211_wtpradioinformation_element(txmngpacket);
wtp_create_80211_encryption_capability_elements(txmngpacket);
wtp_create_80211_supported_mac_profiles_elements(txmngpacket);
}
capwap_packet_txmng_add_message_element(txmngpacket, CAPWAP_ELEMENT_ECNSUPPORT, &g_wtp.ecn);

View File

@ -99,3 +99,26 @@ void wtp_create_80211_encryption_capability_elements(struct capwap_packet_txmng
wtp_create_80211_encryption_capability_element(txmngpacket, radio);
}
}
/* */
void wtp_create_80211_supported_mac_profiles_elements(struct capwap_packet_txmng *txmngpacket)
{
struct capwap_80211_supported_mac_profiles_element *element;
switch (g_wtp.mactype.type) {
case CAPWAP_SPLITMAC:
case CAPWAP_LOCALANDSPLITMAC:
element = alloca(sizeof(struct capwap_80211_supported_mac_profiles_element) +
sizeof(uint8_t));
element->supported_mac_profilescount = 1;
element->supported_mac_profiles[0] = 0; /* IEEE 802.11 Split MAC Profile with WTP
encryption */
capwap_packet_txmng_add_message_element(txmngpacket,
CAPWAP_ELEMENT_80211_SUPPORTED_MAC_PROFILES, element);
break;
default:
break;
}
}