rework kernel socket handling to use udp tunnel infrastructure

Reimplmenting what is already there doesn't make sense. Switch
to the existing and UDP tunnel support code and handle the data
channel as a connected UDP socket
This commit is contained in:
Andreas Schultz
2016-02-22 16:54:54 +01:00
parent cc5b38f322
commit f3119eec8d
9 changed files with 92 additions and 151 deletions

View File

@ -40,8 +40,8 @@ void wtp_start_datachannel(void) {
#endif
/* Bind data address and Connect to AC data channel */
if (wtp_kmod_bind(g_wtp.net.localaddr.ss.ss_family) ||
!wtp_kmod_connect(&dataaddr.ss, &g_wtp.sessionid, g_wtp.mtu)) {
if (wtp_kmod_create(g_wtp.net.localaddr.ss.ss_family, &dataaddr.ss, &g_wtp.sessionid, g_wtp.mtu) == 0) {
capwap_logging_error("Data channel connected");
/* Reset AC Prefered List Position */
g_wtp.acpreferedselected = 0;