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

Proposal: Extra methods for net.IP package to determine temporary and deprecated IPv6 addresses #42694

Open
jeroenjacobs79 opened this issue Nov 18, 2020 · 0 comments
Labels
Projects
Milestone

Comments

@jeroenjacobs79
Copy link

@jeroenjacobs79 jeroenjacobs79 commented Nov 18, 2020

Background

IPv6 has a concept of "privacy extensions" (RFC4941). When these extensions are active, a temporary IPv6 address is created, and is used for outbound connections. One this address expires, it gets the status "expired", and a new temporary IPv6 address is created.

Reason for this proposal

At the moment, when we use net.Interfaces(), we can get a list of associated addresses using the .Addrs() method. However, there is no platform-independent way to determine if the IPv6 address are temporary or deprecated. We need to resort to running and parsing output of ip, ifconfig, and ipconfig. IPv6 keeps growing, so frameworks and programming languages need to support the more advanced features of IPv6 in the near future.

Possible solutions

  • Add functions like IsTemporary() and isDeprecated() to net.IP (similar to isLoopback). However, that might not be the best solution, as the temporary nature of the address is not strictly tied to the numbers of the IP address.
  • Add extra functions to net.Interface type to determine expired and temporary addresses?
@gopherbot gopherbot added this to the Proposal milestone Nov 18, 2020
@gopherbot gopherbot added the Proposal label Nov 18, 2020
@ianlancetaylor ianlancetaylor added this to Incoming in Proposals Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Proposals
Incoming
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants