Skip to content

core & periphery only listen on IPv4, not IPv6 #313

@mbunkus

Description

@mbunkus

Both the core & the periphery daemons have their listening address hardcoded at 0.0.0.0. Only the port number to listen on is configurable. The unfortunate effect is that they only listen on IPv4, not IPv6, no matter whether the host has IPv6 configured or not.

Please add support for listening on IPv6, too, or at least for making the listening address configurable. Note that the equivalent of 0.0.0.0 in IPv4 is :: in IPv6, which if used together with a port number must be written as [::]:port so that the address part :: can be distinguished from the address/port separator :. Please note further that listening on :: will effectively listen on both IPv6 & IPv4 on some OSes (Linux) while only listening on IPv6 on others (Windows, if I'm not mistaken).

Hardcoded addresses:

Hardcoded IPv6 "listen on every interface, every address" would look like this:

  let socket_addr =
    SocketAddr::from_str(&format!("[::]:{}", core_config().port))
      .context("failed to parse socket addr")?;

Thanks for considering.

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