Fix capwap protocol and optional wireless information header.

Complete IEEE802.11 frames tunnel WTP side.
Now WTP can send data packets to the AC.
This commit is contained in:
vemax78
2014-06-09 22:30:04 +02:00
parent 67daa8dcbb
commit 089a044f3f
16 changed files with 405 additions and 91 deletions

View File

@ -62,6 +62,7 @@ static int wtp_init(void) {
g_wtp.mactype.type = CAPWAP_LOCALMAC;
g_wtp.mactunnel.mode = CAPWAP_WTP_LOCAL_BRIDGING;
g_wtp.tunneldataframe = WTP_TUNNEL_DATA_FRAME_KERNELMODE;
/* DTLS */
g_wtp.validdtlsdatapolicy = CAPWAP_ACDESC_CLEAR_DATA_CHANNEL_ENABLED;
@ -650,6 +651,19 @@ static int wtp_parsing_configuration_1_0(config_t* config) {
g_wtp.mactunnel.mode |= CAPWAP_WTP_LOCAL_BRIDGING;
}
}
if (config_lookup_string(config, "application.tunnelmode.dataframe", &configString) == CONFIG_TRUE) {
if (!strcmp(configString, "none")) {
g_wtp.tunneldataframe = WTP_TUNNEL_DATA_FRAME_NONE;
} else if (!strcmp(configString, "kernelmode")) {
g_wtp.tunneldataframe = WTP_TUNNEL_DATA_FRAME_KERNELMODE;
} else if (!strcmp(configString, "usermode")) {
g_wtp.tunneldataframe = WTP_TUNNEL_DATA_FRAME_USERMODE;
} else {
capwap_logging_error("Invalid configuration file, unknown application.tunnelmode.dataframe value");
return 0;
}
}
}
/* Set mactype of WTP */