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

IPv6 link-local netmasks appear wrong on Windows 10 #7

Open
robertsdotpm opened this issue Jun 22, 2022 · 0 comments
Open

IPv6 link-local netmasks appear wrong on Windows 10 #7

robertsdotpm opened this issue Jun 22, 2022 · 0 comments

Comments

@robertsdotpm
Copy link

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.

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

No branches or pull requests

1 participant