Repository navigation
Replies: 2 comments
|
Spot on, both places. Fixed for the next version, thanks! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
POST /api/brands/previewreturns{"brand": null}for a valid MAC written without separators, depending on its last byte.Steps to reproduce
Vedetta 1.1.1 (Docker). Same prefix each time, empty
name:mac90BFD9000000"Smart Innovation"90BFD9000002null90:BF:D9:00:00:02"Smart Innovation"Expected: all three give the same brand.
Cause
vedetta/app/recognition/vendor_lookup.py(unchanged onmain, 3ea8ee8):Without separators,
split(":")[0]is the whole address, so& 0x02tests a bit of the last byte instead of the U/L bit of the first one.lookup_registrantaccepts the 12-digit form, but then treats about half of these addresses as private and returnsNone.Possible fix
This keeps working for
:and-, including single-digit octets.vedetta/app/scan/dhcp.pyhas a secondis_private_macthat splits on:only. From reading the code it has the same problem without separators, and returnsFalsefor any dash-separated address. I have not seen an effect from that one; I only hit the bug through the preview endpoint.All reactions