-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Description
Update, Sep 15 2021 Current proposal is #42694 -@rsc
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()andisDeprecated()tonet.IP(similar toisLoopback). 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.Interfacetype to determine expired and temporary addresses?
Metadata
Metadata
Assignees
Type
Projects
Status