wtp: rework kernel socket handling
Switch to a connected UDP kernel socket. Comparing the local and remote IPs is no longer required and handling different IP versions and UDP types is automatic. The WTP logic needs to reopen the socket on demand now.
This commit is contained in:
@ -39,8 +39,9 @@ void wtp_start_datachannel(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Connect to AC data channel */
|
||||
if (!wtp_kmod_connect(&dataaddr.ss, &g_wtp.sessionid, g_wtp.mtu)) {
|
||||
/* 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)) {
|
||||
/* Reset AC Prefered List Position */
|
||||
g_wtp.acpreferedselected = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user