Skip to content

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

@robertsdotpm

Description

@robertsdotpm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions