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

@bradfitz
Copy link
Contributor

Seems fine to me.

@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
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
Contributor

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

@rsc rsc moved this to Accepted in Proposals Aug 10, 2022
@rsc rsc added this to Proposals Aug 10, 2022
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 <[email protected]>
Reviewed-by: David Chase <[email protected]>
Reviewed-by: Damien Neil <[email protected]>
Run-TryBot: Brad Fitzpatrick <[email protected]>
Reviewed-by: Tobias Klauser <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Matt Layher <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
Auto-Submit: Damien Neil <[email protected]>
@golang golang locked and limited conversation to collaborators Oct 21, 2023
@rsc rsc removed this from Proposals Oct 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants