New submission from Andres Petralli <[email protected]>:
uuid.py is getting a 64 bit hardware address for the loopback adapter in High
Sierra, specifically in _ifconfig_getnode(). The function expects a 48 bit mac
address, but is instead getting 64 bits back and converting it to an int value
that is too long for the subsequent call in uuid.py. Apple must have moved to
using EUI-64 for the loopback adapters.
This is a sample output of the call to ifconfig that is being parsed:
b'lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384\n'
b'\toptions=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>\n'
b'\tinet 127.0.0.1 netmask 0xff000000 \n'
b'\tinet6 ::1 prefixlen 128 \n'
b'\tlladdr 70:cd:60:ff:ab:cd:ef:12 \n'
As you can see, the lladdr is longer than the usual 48 bit mac address but is
nontheless returned for the node value, which then triggers
ValueError('field 6 out of range (need a 48-bit value)')
Full traceback:
Traceback (most recent call last):
File "/Users/andy/Desktop/test.py", line 3, in <module>
str(uuid.uuid1())
File
"/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/uuid.py",
line 607, in uuid1
clock_seq_hi_variant, clock_seq_low, node), version=1)
File
"/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/uuid.py",
line 168, in __init__
raise ValueError('field 6 out of range (need a 48-bit value)')
ValueError: field 6 out of range (need a 48-bit value)
----------
components: macOS
messages: 309554
nosy: anpetral, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: uuid1() broken on macos high sierra
type: crash
versions: Python 3.6
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32502>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com