[2.1] netaddr assumes MAC OUI is ascii
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Mike Pontillo | ||
python-netaddr (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Triaged
|
Medium
|
Unassigned | ||
Zesty |
Triaged
|
Medium
|
Unassigned | ||
Artful |
Won't Fix
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Unassigned |
Bug Description
This causes a traceback when we try to get the MAC organization, as follows:
--- <exception caught here> ---
File "/usr/lib/
result = inContext.theWork()
File "/usr/lib/
File "/usr/lib/
return self.currentCon
File "/usr/lib/
return func(*args,**kw)
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
return func_outside_
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwds)
File "/usr/lib/
for obj in objs
File "/usr/lib/
for obj in objs
File "/usr/lib/
return self.dehydrate(obj, data, for_list=for_list)
File "/usr/lib/
File "/usr/lib/
return get_mac_
File "/usr/lib/
return get_eui_
File "/usr/lib/
File "/usr/lib/
return OUI(self.value >> 24)
File "/usr/lib/
data = fh.read(size)
File "/usr/lib/
return codecs.
builtins.
Related branches
- Blake Rouse (community): Approve
-
Diff: 42 lines (+14/-0)2 files modifiedsrc/provisioningserver/utils/network.py (+5/-0)
src/provisioningserver/utils/tests/test_network.py (+9/-0)
summary: |
- netaddr assumes MAC OUI is ascii + [2.1] netaddr assumes MAC OUI is ascii |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in maas: | |
assignee: | nobody → Mike Pontillo (mpontillo) |
milestone: | none → 2.1.0 |
Changed in maas: | |
status: | Triaged → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
This seems to be a bug in netaddr and/or a side effect of corrupt entries, in oui.txt, depending on how you approach the problem.
In '/usr/lib/ python3/ dist-packages/ netaddr/ eui/oui. txt' there are entries such as:
00-22-59 (hex) Guangzhou New Postcom Equipment Co.,Ltd.
No. 3¡ ¡Guangpuxi Road,Guangzhou Science City,
Guangzhou Guangdong 510663
CHINA
002259 (base 16) Guangzhou New Postcom Equipment Co.,Ltd.
Note the non-ASCII characters. (They don't look correct, so I doubt the entries in this file were imported with a consistent source encoding.) There are numerous examples of characters like this if you search through the file for characters with an 8th bit set.