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

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

Closed
schoksey opened this issue Oct 6, 2020 · 2 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

@schoksey
Copy link
Author

schoksey commented Oct 6, 2020

Please ignore this, it's a duplicate of #65 - github error'd out with 404 but opened the issue anyways

@schoksey schoksey changed the title [10.9] netifaces.ifaddresses() on AF_NET6 returns CIDR with v6 netmask Dupliacate of #65 - please ignore [10.9] netifaces.ifaddresses() on AF_NET6 returns CIDR with v6 netmask Oct 6, 2020
@schoksey
Copy link
Author

schoksey commented Oct 6, 2020

Duplicate of #65

@schoksey schoksey closed this as completed Oct 6, 2020
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