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

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

net/netip: add IPv6Loopback #51777

mdlayher opened this issue Mar 17, 2022 · 6 comments

Comments

@mdlayher
Copy link
Member

@mdlayher mdlayher commented Mar 17, 2022

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

@ianlancetaylor ianlancetaylor commented Mar 18, 2022

CC @bradfitz @josharian

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

@bradfitz bradfitz commented Mar 18, 2022

Seems fine to me.

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

@rsc 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 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 Jun 8, 2022
@rsc rsc moved this from Likely Accept to Accepted in Proposals Jun 15, 2022
@rsc
Copy link
Contributor

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

@gopherbot gopherbot commented Jun 15, 2022

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

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

No branches or pull requests

5 participants