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
MAC Vendor is not recognised for BC:24:11 #618
Comments
Could we add 84:28:59, c4:82:e1 & D8:D6:68 to the list as well? Possibilty the option to do lookups via https://macaddress.io/ api to update local Unkown OUI's ? |
Some observations pertain to the vendor update workflow.
/usr/share/ieee-data path does not exist (at least for my Proxmox LXC bookworm pve). back/update_vendors.sh Also, ieee-oui.txt does not seem to have not updated during installation
dev_MAC is stored in lower case Vendor MAC is upper case. Two never matches during update_vendors workflow. server/device.py
First vendor name will be missing. server/device.py
The sql query is looking for '(unknown)'. Arp-scan returns '(Unknown)'. front/plugins/vendor_update/script.py Other possible patterns include (Unknown) (802.1Q VLAN={vlanID})
I ended up doing the following.
|
@fcschow thanks a lot for this investigation - this helps a lot to quickly try to fix things.
server/device.py I don't think that's the case, as the script cycles thru all lines in that file and matches the beginning of the line with the beginning of the device mac: # Open the vendors file
with open(vendorsPath, 'r') as f:
# Iterate over each line in the file
for line in f:
# Convert the line to lowercase for case-insensitive matching
line_lower = line.lower()
# Check if the lowercase line starts with the MAC address prefix
if line_lower.startswith(mac_start_string6):
# Split the line into two parts using space as the delimiter
parts = line.split(' ', 1)
# Check if there are at least two parts after splitting
if len(parts) > 1:
# Extract the vendor from the second part and strip whitespace
vendor = parts[1].strip()
# Log debug information
mylog('debug', [f"[Vendor Check] Found '{vendor}' for '{pMAC}' in {vendorsPath}"])
# Return the vendor
return vendor
else:
# Log an error if the line couldn't be processed after matching
mylog('debug', [f'[Vendor Check] ⚠ ERROR: Match found, but line could not be processed: "{line_lower}"'])
# Return -1 to indicate error
return -1
|
I think it's a missing perl package - trying to rebuild it with it and see if that helps. |
This should be fixed in the next release. If you can, please have a look at the It would be great if you could test this (backup everything first or use a new container) on your end by switching to the above image and letting me know if the issue was resolved. Thanks in advance, |
I misspoke on the 'First vendor name missing'. It should be that the first part of the vendor's name missing. For example, See ieee-oui.txt file structure. |
Hey @jokob-sk You are right, get-iab and get-oui are perl scripts. Perl will increase image size for around 40MB. I was looking into this last night, I might come up with solution that doesn't use perl. |
Hi @vladaurosh - thanks for looking into it - I think I solved it with the last 2 commits without using Perl |
That's awesome @jokob-sk |
Thanks for the quick turnaround.. Please note vendor name will be stored in lower case as follows. |
Hi @fcschow , Thanks for checking, but the vendor name is not stored in lower case. I checked it in many setup and also the code only does the comparison on the lower case line version, the actual line variable is used to extract the vendor: for line in f:
line_lower = line.lower() # Convert line to lowercase for case-insensitive matching
if line_lower.startswith(mac_start_string6):
parts = line.split(' ', 1) # 👈 line variable used not line_lower
if len(parts) > 1:
vendor = parts[1].strip()
mylog('debug', [f"[Vendor Check] Found '{vendor}' for '{pMAC}' in {vendorsPath}"])
return vendor
else:
mylog('debug', [f'[Vendor Check] ⚠ ERROR: Match found, but line could not be processed: "{line_lower}"'])
return -1 |
Hi @fcschow ,
I also couldn't reproduce this behavior. Could you please provide me with screenshots? |
Sorry, my bad. U r correct.
|
My bad. I see it now. The code uses the custom ieee-oui_all_filtered.txt file for looking up the vendor MAC/name. My apologies.
|
All good @fcschow - it's always better to have someone check the code for bugs :) |
Hi @jokob-sk, I am having issue with netalertx-dev:latest and netalertx-dev:sha-45be8a0 from dockerHub. The settings page is not rendering properly See below. In essence, all plugins configurations are not rendered. If I revert back to netalertx:latest. The page renders properly.
|
Hi @fcschow , Can you please post a screenshot of the browser dev console of any errors that are logged? I think refreshing the cache/using an incognito window or clicking the refresh button might fix this: |
Brilliant. Runs in incognito window fixed the issue. Thanks @jokob-sk. |
Hi @jokob-sk , Observation again. Plz see /app/server/device.py below.
|
@fcschow - you are correct - thanks! fixed :) |
released -> closing for now |
Is there an existing issue for this?
Current Behavior
The MAC Vendor is not recognised for BC:24:11 prefixed mac addresses. They show in devices with a mac vendor of "(Unknown)" ...
Expected Behavior
The MAC Vendor for BC:24:11 prefixed mac addresses should be shown as "Proxmox Server Solutions GmbH" according to https://macvendors.com
Steps To Reproduce
Create a device with a virtual mac address of BC:24:11:xx:xx:xx and it will show as being of vendor "(Unknown)" rather than "Proxmox Server Solutions GmbH" in pialert.
pialert.conf
No response
docker-compose.yml
No response
What branch are you running?
Dev
pialert.log
No response
Debug enabled
The text was updated successfully, but these errors were encountered: