Skip to content

F-13971: Ignore zero-length datagrams in DTLS demux server - #634

Open
julek-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
julek-wolfssl:fenrir-13971-dtls-demux-empty-datagram
Open

julek-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
julek-wolfssl:fenrir-13971-dtls-demux-empty-datagram

Conversation

@julek-wolfssl

Copy link
Copy Markdown
Member
  • recvfrom() returns 0 for an empty UDP datagram, which the server treated as fatal, allowing any peer to stop it with a single empty packet.
  • Empty datagrams are now ignored instead of causing termination.
  • EINTR/EAGAIN are retried, and other receive errors are reported.

recvfrom() returns 0 for an empty UDP datagram. The server treated that
as fatal, so any peer could stop it with a single empty packet. Also
retry EINTR/EAGAIN and report other receive errors.
Copilot AI lite review requested due to automatic review settings September 24, 2026 13:19
@julek-wolfssl julek-wolfssl self-assigned this Sep 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved review issues remain.

Review effort: Lite
Findings: None

What changed in this PR

Updates the DTLS demux server to ignore empty UDP datagrams and handle transient receive errors safely.

Changes:

  • Retries interrupted or temporarily unavailable receives.
  • Reports other recvfrom() errors.
  • Ignores zero-length datagrams.
File Description
dtls/​server-dtls-demux.c Improves UDP receive error and empty-datagram handling.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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