Skip to content

net: clarification on the use of 0.0.0.0/8, ::/128 and ::ffff:0.0.0.0/128 as destination #22827

Open
@mikioh

Description

@mikioh

The fixes for #6290 and #18806 revealed that the use of special IP addresses, 0.0.0.0/8 or ::/128, as the destination is confusing especially when working with datagram transport protocols as described in #22811. It would be better to clarify and to implement consistent API semantics (because some of the special addresses is prohibited from using the destination IP address, so the existing behavior is Go-specific extended interpretation) for avoiding unnecessary confusion.

Just FYI:

  • 0.0.0.0/8 is defined in section 3.2.1.3 of RFC 1122 as "this host on this network." For historical reasons, some IP stack implementations allow to use 0.0.0.0/32 as the destination address of IP packets, but in general it's prohibited from using as the destination address,
  • ::/128 is defined in section 2.5.2 of RFC 4291 as "the unspecified address." It's clearly stated that the unspecified address must not be used as the destination address and I've never seen IP stack implementation that allows to use the unspecified address as the destination address (I guess that IPv6 protocol conformance tools did a great job.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.help wanted

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions