Skip to content

Discovery failing on IPv4 only setups #1736

Description

@michaelherger

This code stems from #1366, which said "expose to both IPv4 and IPv6":

let address = if cfg!(windows) {
SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), *port)
} else {
// this creates a dual stack socket on non-windows systems
SocketAddr::new(Ipv6Addr::UNSPECIFIED.into(), *port)
};

Unfortunately it breaks discovery on systems set up with IPv4 only (eg. piCorePlayer.org, a TinyCore based distribution):

[2026-08-12T19:15:56Z WARN  libmdns] Failed to register IPv6 receiver: Os { code: 97, kind: Uncategorized, message: "Address family not supported by protocol" }

If I hardcode to using IPv4 only, it would run.

Shouldn't the code gracefully fall back to IPv4 in case IPv6 was not available?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions