From 84859e20c4415ae3e108cba431f76e936c70e583 Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Wed, 30 Mar 2016 09:20:04 +0200 Subject: [PATCH] also clear the local control port when resetting the WTP state Without reseting the port, the new control socket will be bound to the same port as the old one. --- src/wtp/wtp_dfa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wtp/wtp_dfa.c b/src/wtp/wtp_dfa.c index 29cd593..6217c9b 100644 --- a/src/wtp/wtp_dfa.c +++ b/src/wtp/wtp_dfa.c @@ -583,4 +583,6 @@ void wtp_reset_state(void) memset(&g_wtp.dtls.localaddr, 0, sizeof(g_wtp.dtls.localaddr)); memset(&g_wtp.dtls.peeraddr, 0, sizeof(g_wtp.dtls.peeraddr)); + + CAPWAP_SET_NETWORK_PORT(&g_wtp.net.localaddr, 0); }