Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/netip: add IPv6Loopback #51777

Closed
mdlayher opened this issue Mar 17, 2022 · 6 comments
Closed

net/netip: add IPv6Loopback #51777

mdlayher opened this issue Mar 17, 2022 · 6 comments

Comments

@mdlayher
Copy link
Member

We already have net.IPv6loopback today, but lack an equivalent in net/netip. I'd like to propose adding netip.IPv6Loopback specifically; IPv6 defines exactly one loopback address: ::1.

IPv4 assigns the entire 127.0.0.0/8 and thus should be out of scope for this proposal.

Concretely:

// IPv6Loopback returns the IPv6 loopback address ::1.
func IPv6Loopback() Addr { return AddrFrom16([16]byte{15: 0x01}) }

See also #51766 for a similar addition and rationale. Thanks!

/cc @bradfitz @danderson @josharian

@gopherbot gopherbot added this to the Proposal milestone Mar 17, 2022
@ianlancetaylor
Copy link
Contributor

CC @bradfitz @josharian

@ianlancetaylor ianlancetaylor added this to Incoming in Proposals (old) Mar 18, 2022
@bradfitz
Copy link
Contributor

Seems fine to me.

@rsc rsc moved this from Incoming to Active in Proposals (old) Jun 1, 2022
@rsc
Copy link
Contributor

rsc commented Jun 1, 2022

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@rsc
Copy link
Contributor

rsc commented Jun 8, 2022

Based on the discussion above, this proposal seems like a likely accept.
— rsc for the proposal review group

@rsc rsc moved this from Active to Likely Accept in Proposals (old) Jun 8, 2022
@rsc rsc moved this from Likely Accept to Accepted in Proposals (old) Jun 15, 2022
@rsc
Copy link
Contributor

rsc commented Jun 15, 2022

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— rsc for the proposal review group

@rsc rsc changed the title proposal: net/netip: add IPv6Loopback net/netip: add IPv6Loopback Jun 15, 2022
@rsc rsc modified the milestones: Proposal, Backlog Jun 15, 2022
@mdlayher mdlayher self-assigned this Jun 15, 2022
@gopherbot
Copy link

Change https://go.dev/cl/412475 mentions this issue: net/netip: add IPv6LinkLocalAllRouters and IPv6Loopback

romaindoumenc pushed a commit to TroutSoftware/go that referenced this issue Nov 3, 2022
Fixes golang#51766
Fixes golang#51777

Change-Id: I0510175c20c06442d78b2581cfe218e66be1c35b
Reviewed-on: https://go-review.googlesource.com/c/go/+/412475
Auto-Submit: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Auto-Submit: Damien Neil <dneil@google.com>
@golang golang locked and limited conversation to collaborators Oct 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

5 participants