implement station inactivity timeout
After the max station inactivity has expired, a probe request (a data null frame) is sent to the station. It the station does not ACK this frame, it is removed from the WTP. Note: inactivity timeout is not the same as the CAPWAP Idle Timeout. The CAPWAP Idle Timeout would remove a station due to inactivity even when it is still reachable from the WTP. In contrast, the inactivity timeout probes whether the station is still present and only removes it when not.
This commit is contained in:
@ -57,6 +57,7 @@ static int wtp_init(void)
|
||||
g_wtp.ecn.flag = CAPWAP_LIMITED_ECN_SUPPORT;
|
||||
g_wtp.transport.type = CAPWAP_UDP_TRANSPORT;
|
||||
g_wtp.statisticstimer.timer = WTP_STATISTICSTIMER_INTERVAL / 1000;
|
||||
g_wtp.sta_max_inactivity = WIFI_STATIONS_DEFAULT_STA_MAX_INACTIVITY;
|
||||
|
||||
g_wtp.mactype.type = CAPWAP_LOCALMAC;
|
||||
g_wtp.mactunnel.mode = CAPWAP_WTP_LOCAL_BRIDGING;
|
||||
@ -1041,6 +1042,16 @@ static int wtp_parsing_configuration_1_0(config_t* config) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (config_lookup_int(config, "application.timer.inactivity", &configInt) == CONFIG_TRUE) {
|
||||
if ((configInt < 0) || (configInt > 3600)) {
|
||||
log_printf(LOG_ERR, "Invalid configuration file, "
|
||||
"invalid application.timer.inactivity value");
|
||||
return 0;
|
||||
}
|
||||
g_wtp.sta_max_inactivity = (unsigned short)configInt;
|
||||
}
|
||||
|
||||
/* Set DTLS of WTP */
|
||||
if (config_lookup_bool(config, "application.dtls.enable", &configBool) == CONFIG_TRUE) {
|
||||
if (configBool != 0) {
|
||||
|
Reference in New Issue
Block a user