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
test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address #84172
Comments
My FreeBSD VM has a NIC with the IPv6 address fe80::5054:ff:fe9: local-link IPv6 address. It's used by uuid._netstat_getnode() as a MAC address, but it seems like this IPv6 address doesn't respect RFC 4122 and so should be skipped. _find_mac_under_heading() should reject IPv6 address: only use MAC address. vstinner@freebsd$ uname -a ====================================================================== Traceback (most recent call last):
File "/usr/home/vstinner/python/master/Lib/test/test_uuid.py", line 767, in test_netstat_getnode
self.check_node(node, 'netstat')
File "/usr/home/vstinner/python/master/Lib/test/test_uuid.py", line 736, in check_node
self.assertTrue(0 < node < (1 << 48),
AssertionError: False is not true : fe805054fffe9 is not an RFC 4122 node ID ====================================================================== Traceback (most recent call last):
File "/usr/home/vstinner/python/master/Lib/test/test_uuid.py", line 767, in test_netstat_getnode
self.check_node(node, 'netstat')
File "/usr/home/vstinner/python/master/Lib/test/test_uuid.py", line 736, in check_node
self.assertTrue(0 < node < (1 << 48),
AssertionError: False is not true : fe805054fffe9 is not an RFC 4122 node ID It's using a qemu VM run by virt-manager. fe805054fffe9 seems to be the MAC address of my vtnet network interface: vstinner@freebsd$ netstat -ian |
It seems like this issue is a regression caused by the following change of bpo-28009: commit 0bcbfa4
which replaced: |
My fix is incomplete: the IPv6 address "123:2:3:4:5:6:7:8" is a valid IPv6 address and uuid.py accepts it as a valid MAC address, whereas it's not a MAC address. |
Ok, the new stricter parser should now cover all cases. If not, it should be easier to fix it ;-) I close the issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: