Skip to content
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

Device with "vendor-class-identifier" MAC Address and an "=" for IP Address #516

Closed
ajtatum opened this issue Dec 7, 2023 · 5 comments
Closed
Labels
bug 🐛 Something isn't working next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed. Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress.

Comments

@ajtatum
Copy link

ajtatum commented Dec 7, 2023

Describe the issue

There's a device on my network, I support, that's returning a MAC Address of "vendor-class-identifier" and an equal sign for the IP address. This breaks the front end in such a way that I can't view any devices. I'm not sure where this device is coming from or anything, but I was hoping to find a way so that it would simply skip the one record so that it can display the rest.

{
			"rowid": 101,
			"dev_MAC": "vendor-class-identifier",
			"dev_Name": "\"udhcp",
			"dev_Owner": "House",
			"dev_DeviceType": "",
			"dev_Vendor": null,
			"dev_Favorite": 0,
			"dev_Group": "",
			"dev_Comments": "",
			"dev_FirstConnection": "2023-12-07 12:40:07-05:00",
			"dev_LastConnection": "2023-12-07 12:40:07-05:00",
			"dev_LastIP": "=",
			"dev_StaticIP": 0,
			"dev_ScanCycle": 1,
			"dev_LogEvents": 1,
			"dev_AlertEvents": 1,
			"dev_AlertDeviceDown": 0,
			"dev_SkipRepeated": 0,
			"dev_LastNotification": "2023-12-07 12:40:12-05:00",
			"dev_PresentLastScan": 1,
			"dev_NewDevice": 1,
			"dev_Location": "",
			"dev_Archived": 0,
			"dev_Network_Node_MAC_ADDR": "",
			"dev_Network_Node_port": null,
			"dev_Icon": ""
		}
@jokob-sk
Copy link
Owner

jokob-sk commented Dec 7, 2023

Hi @ajtatum !

It would be good to know where this device comes from. Could you please try to check if you can find which plugin is discovering this device?

You can check enabled plugins and their output in the pialert.log or / and in the Plugins section where it might show up as well.

You could try searching for "vendor-class-identifier" in the log file to see when it comes up the first time. It seems to have been discovered pretty recently, but maybe you will have to delete it from the database and re-initilaize the app it to be re-discovered so we can debug further.

Let me know how you go and I can provide more guidance.
J

@jokob-sk jokob-sk added the Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress. label Dec 7, 2023
@ajtatum
Copy link
Author

ajtatum commented Dec 7, 2023

I should have checked this before, but I recently turned on DHCP Leases and have OPNsense send over it's dhcpd.leases file over to my NAS where Pi.Alert runs. When I looked at the logs more closely in Pi.Alert, it seemed to be stemming from that Plugin so I took a look at the dhcpd.leases file (I kind of assumed that the format of this file was standard, but perhaps not).

Here are a few entries:

lease 192.168.185.45 {
  starts 3 2023/12/06 18:52:49;
  ends 3 2023/12/06 20:52:49;
  cltt 3 2023/12/06 18:52:49;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet e0:46:ee:ff:fd:f7;
}
lease 192.168.145.27 {
  starts 3 2023/12/06 18:56:39;
  ends 3 2023/12/06 20:56:39;
  cltt 3 2023/12/06 18:56:39;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 44:07:0b:ee:32:bb;
  set vendor-class-identifier = "dhcpcd-6.8.2:Linux-3.8.13+:armv7l:Marvell";
  client-hostname "Google-Home-Mini";
}
lease 192.168.185.35 {
  starts 3 2023/11/22 02:41:42;
  ends 3 2023/11/22 04:41:42;
  tstp 3 2023/11/22 04:41:42;
  cltt 3 2023/11/22 02:41:42;
  binding state free;
  hardware ethernet 18:c2:3c:15:07:8f;
  uid "\001\030\302<\025\007\217";
  set vendor-class-identifier = "udhcp 1.22.1";
}

Most entries look like the first on; however, there are a handful that appear as the last two. If the first object is what's to be expected; I could probably run some script to remove all lines that start with "uid" and "set vendor-class-identifier". If the output is totally off, then I guess I won't bother with the plugin. Any thoughts?

(By the way, for now, I logged into the container and modified some of the Javascript that interacts with the data result set so that it filters out objects that have an improper IP or MAC, so at least now I can view the dashboard. This obviously isn't an ideal long term solution.)

@ajtatum
Copy link
Author

ajtatum commented Dec 10, 2023

Any ideas in regards to the formatting of the dhcp.leases file?

@jokob-sk
Copy link
Owner

Hi @ajtatum,
Thanks for the patience - recovering from the flu.

I implemented a MAC validity check which should fix this issue. The change is being deployed in the _dev image so would be great if you could give it a try.

Cheers,
j

@jokob-sk jokob-sk added bug 🐛 Something isn't working next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed. labels Dec 11, 2023
@jokob-sk
Copy link
Owner

closing as released 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed. Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress.
Projects
None yet
Development

No branches or pull requests

2 participants