-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Output from netifaces.ifaddresses("enp3s0")[netifaces.AF_INET6]:
[{'addr': 'some link local address here%enp3s0', 'netmask': 'ffff:ffff:ffff:ffff::/64'}]
The netmask for link-local in IPv6 is: 'fe80:0000:0000:0000:0000:0000:0000:0000.' It's specified to be /10 but in practice people use /64. I showed it using the uncompressed form of the address to avoid confusion. The last 64 bits are the host portion.
I'm also not sure the netmask returned for IPv6 'global addresses' makes sense either. With IPv4, you might write something like 0.0.0.0? But netifaces returns FF:FF:... setting all bits to one. It might make more sense to return something like ::/128 -- there is no network part for such global addresses.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels