reset WTP state when going into DTLS TD
This commit is contained in:
parent
7eddb74767
commit
a3c2e52d3c
@ -70,10 +70,10 @@ static int wtp_init(void) {
|
||||
g_wtp.validdtlsdatapolicy = CAPWAP_ACDESC_CLEAR_DATA_CHANNEL_ENABLED;
|
||||
|
||||
/* Tx fragment packets */
|
||||
g_wtp.mtu = CAPWAP_MTU_DEFAULT;
|
||||
g_wtp.requestfragmentpacket = capwap_list_create();
|
||||
g_wtp.responsefragmentpacket = capwap_list_create();
|
||||
g_wtp.remoteseqnumber = WTP_INIT_REMOTE_SEQUENCE;
|
||||
|
||||
wtp_reset_state();
|
||||
|
||||
/* AC information */
|
||||
g_wtp.discoverytype.type = CAPWAP_DISCOVERYTYPE_TYPE_UNKNOWN;
|
||||
|
@ -560,3 +560,19 @@ void wtp_dfa_retransmition_timeout(struct capwap_timeout* timeout, unsigned long
|
||||
capwap_timeout_set(g_wtp.timeout, g_wtp.idtimercontrol, WTP_RETRANSMIT_INTERVAL,
|
||||
wtp_dfa_retransmition_timeout, NULL, NULL);
|
||||
}
|
||||
|
||||
void wtp_reset_state(void)
|
||||
{
|
||||
/* reset WTP state */
|
||||
|
||||
wtp_free_reference_last_request();
|
||||
wtp_free_reference_last_response();
|
||||
wtp_free_packet_rxmng();
|
||||
|
||||
g_wtp.mtu = CAPWAP_MTU_DEFAULT;
|
||||
g_wtp.remotetype = 0;
|
||||
g_wtp.remoteseqnumber = WTP_INIT_REMOTE_SEQUENCE;
|
||||
|
||||
memset(&g_wtp.dtls.localaddr, 0, sizeof(g_wtp.dtls.localaddr));
|
||||
memset(&g_wtp.dtls.peeraddr, 0, sizeof(g_wtp.dtls.peeraddr));
|
||||
}
|
||||
|
@ -70,4 +70,6 @@ void wtp_ieee80211_packet(uint8_t radioid, const struct ieee80211_header* header
|
||||
void wtp_recv_data_keepalive(void);
|
||||
void wtp_recv_data(uint8_t* buffer, int length);
|
||||
|
||||
void wtp_reset_state(void);
|
||||
|
||||
#endif /* __WTP_DFA_HEADER__ */
|
||||
|
@ -77,9 +77,7 @@ static void wtp_dfa_state_dtlsteardown_timeout(struct capwap_timeout* timeout,
|
||||
}
|
||||
|
||||
/* */
|
||||
wtp_free_reference_last_request();
|
||||
wtp_free_reference_last_response();
|
||||
wtp_free_packet_rxmng();
|
||||
wtp_reset_state();
|
||||
|
||||
/* */
|
||||
if (!g_wtp.running) {
|
||||
|
Loading…
Reference in New Issue
Block a user