Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Changed behavior for netifaces.ifaddresses AF_INET6 in **python3-netifaces-0.10.9** #65

Open
schoksey opened this issue Oct 6, 2020 · 0 comments

Comments

@schoksey
Copy link

schoksey commented Oct 6, 2020

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

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

No branches or pull requests

1 participant