Skip to content

UDP is broken #12

@niansa

Description

@niansa

Bug Report

What's the issue you encountered?

When creating a UDP socket, the socket fails to receive any data. bind() calls return no error (returning 0), but select() then recv() or recvfrom() never returns data.

  • ICMP pings are answered
  • TCP servers work fine
  • UDP sockets silently drop packets

How can the issue be reproduced?

  1. Create a UDP socket:
int sock = socket(AF_INET, SOCK_DGRAM, 0);
  1. Bind the socket:
sockaddr_in sa{};
sa.sin_family = AF_INET;
sa.sin_port = htons(5055);
sa.sin_addr.s_addr = htonl(INADDR_ANY);
bind(sock, (struct sockaddr*)&sa, sizeof(sa));
  1. Send UDP packets from a PC to the DS's IP address on port 5055
  2. Call recvfrom() on the DS
  3. No data is received

Environment?

  • What host OS are you using? Debian 13 on amd64
  • Official release or unofficial/self-compiled build: official release from devkitpros package manager

Additional context?

I also noticed that passing IPPROTO_UDP to socket() instead of 0 causes socket to error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions