al45tair / netifaces

MIT License
325 stars 81 forks source link

Dupliacate of #65 - please ignore [10.9] netifaces.ifaddresses() on AF_NET6 returns CIDR with v6 netmask #64

Closed schoksey closed 3 years ago

schoksey commented 3 years ago

Hi,

Can someone please confirm if there is a regression between python-netifaces-0.10.4 and python3-netifaces-0.10.9 where netifaces.ifaddresses() on AF_NET6 returns the v6 netmask entry with a the CIDR. Is this by design, and if so why is it not consistent with AF_NET for the v4 netmasks?

Changed behavior seen for AF_INET6 in python3-netifaces-0.10.9 Python 3.6.8 (default, Dec 5 2019, 15:45:45) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux Type "help", "copyright", "credits" or "license" for more information.

import netifaces netifaces.ifaddresses('br_mgmt')[netifaces.AF_INET6][0].get('netmask') 'ffff:ffff:ffff:ffff::/64' netifaces.ifaddresses('br_mgmt')[netifaces.AF_INET][0].get('netmask') '255.255.255.0'

Behavior seen for AF_INET6 in python-netifaces-0.10.4 Python 2.7.5 (default, Feb 26 2020, 04:21:27) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import netifaces netifaces.ifaddresses('br_mgmt')[netifaces.AF_INET6][0].get('netmask') 'ffff:ffff:ffff:ffff::' netifaces.ifaddresses('br_mgmt')[netifaces.AF_INET][0].get('netmask') '255.255.255.0'

Would appreciate if someone can please confirm if this is expected and the inconsistency between v4 and v6 in the netifaces 10.9 version.

Thanks, Sharmin

schoksey commented 3 years ago

Please ignore this, it's a duplicate of https://github.com/al45tair/netifaces/issues/65 - github error'd out with 404 but opened the issue anyways

schoksey commented 3 years ago

Duplicate of https://github.com/al45tair/netifaces/issues/65