Skip to content

Add UDP support to NetX sockets for DTLS sessions#10501

Open
hmohide wants to merge 2 commits into
wolfSSL:masterfrom
hmohide:feature/dtls-netx-udp
Open

Add UDP support to NetX sockets for DTLS sessions#10501
hmohide wants to merge 2 commits into
wolfSSL:masterfrom
hmohide:feature/dtls-netx-udp

Conversation

@hmohide

@hmohide hmohide commented May 19, 2026

Copy link
Copy Markdown

Description

Add UDP support to NetX sockets for DTLS sessions

Fixes zd#

src/internal.c
src/wolfio.c
wolfssl/internal.h
wolfssl/wolfio.h

Testing

Yes, verified the DTLS communication with multiple session

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@hmohide

hmohide commented May 19, 2026

Copy link
Copy Markdown
Author

@dgarske i have rebased. Please check

@wolfSSL-Bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@dgarske

dgarske commented May 19, 2026

Copy link
Copy Markdown
Member

Okay to test. Thank you @hmohide . Contributor agreement on file.

@hmohide

hmohide commented May 22, 2026

Copy link
Copy Markdown
Author

@dgarske do i need do something for this PR?

@dgarske

dgarske commented May 27, 2026

Copy link
Copy Markdown
Member

Jenkins retest this please. History lost

@dgarske

dgarske commented May 27, 2026

Copy link
Copy Markdown
Member

@dgarske do i need do something for this PR?

Not from what I can tell. I will let you know. Thanks @hmohide

@dgarske

dgarske commented Jun 8, 2026

Copy link
Copy Markdown
Member

Jenkins retest this please. History lost

@dgarske dgarske self-requested a review June 8, 2026 22:47
Comment thread wolfssl/internal.h
typedef struct NetX_Ctx {
NX_TCP_SOCKET* nxSocket; /* send/recv socket handle */
NX_TCP_SOCKET* nxTcpSocket; /* send/recv tcp socket handle */
NX_UDP_SOCKET* nxUdpSocket; /* send/recv udp socket handle */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps only include this in the struct when WOLFSSL_DTLS is defined? Same with the other two at bottom?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guarded with WOLFSSL_DTLS

Comment thread src/wolfio.c

if(nxCtx->nxdIp->nxd_ip_version == NX_IP_VERSION_V4)
{
status = nx_udp_socket_send(nxCtx->nxUdpSocket, packet, nxCtx->nxdIp->nxd_ip_address.v4, (UINT)(*nxCtx->nxPort));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overlong lines added:
src/wolfio.c:2721         status = nx_udp_socket_send(nxCtx->nxUdpSocket, packet, nxCtx->nxdIp->nxd_ip_address.v4, (UINT)(*nxCtx->nxPort));
src/wolfio.c:2729         status = nxd_udp_socket_send(nxCtx->nxUdpSocket, packet, nxCtx->nxdIp, (UINT)(*nxCtx->nxPort));
src/wolfio.c:2749 void wolfSSL_SetIO_NetX_Dtls(WOLFSSL* ssl, NX_UDP_SOCKET* nxsocket, NXD_ADDRESS *nxdip, USHORT *nxport, ULONG waitoption)
wolfssl/wolfio.h:793     WOLFSSL_LOCAL int NetX_ReceiveFrom(WOLFSSL *ssl, char *buf, int sz, void *ctx);
wolfssl/wolfio.h:798     WOLFSSL_API void wolfSSL_SetIO_NetX_Dtls(WOLFSSL* ssl, NX_UDP_SOCKET* nxsocket, 
    check-source-text fail_A

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guarded with WOLFSSL_DTLS

@dgarske

dgarske commented Jun 10, 2026

Copy link
Copy Markdown
Member

@hmohide looks like that last push didn't get those fixes? Could just be Github but I don't see them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants