seriousm4x / UpSnap

A simple wake on lan web app written with SvelteKit, Go and PocketBase.
MIT License
2.19k stars 80 forks source link

[BUG] System does not Except DNS Names instead of IP-Adress #570

Closed Technik-YVWW closed 4 months ago

Technik-YVWW commented 4 months ago

The bug

Hello,,

i love your system and it works very good. But The Field IP-Adress in the Device-Section accept a Normal DNS. but with it in does not wake up a machine.

Here are the error from the log: 2024/05/12 14:02:12 wake.go:16: Wake triggered for < PC-NAME > 2024/05/12 14:02:12 handlers.go:31: ip not a valid ipv4 address

with a Custom Wakeup Command (etherwake), it is OK -and yes the ping too. but it was very very better if it works with the normal wake up, because most tools only need the mac to wakeup, not the ip.

Thanks for your Good work!

Damodara

The OS that UpSnap is running on

Archlinux Roling

Version of UpSnap

4.2.9-1

Your docker-compose.yml content

No Docker, its a Proxmox Container, Installed over yay -Sy aur/upsnap-bin

Reproduction steps

1. Change the Device ip to its Name or Create a New Device with name in IP-Adress field instead of IP
2. Click on the Machine to Wake-UP
3. See the Logs

Additional information

No response

seriousm4x commented 4 months ago

The IP address is used to calculate the broadcast IP address for wake requests. If you set the IP to a FQDN name it will fail because upsnap tries to interpret the string as an IP address.

but it was very very better if it works with the normal wake up, because most tools only need the mac to wakeup, not the ip.

Another discussion if the IP field should be non-required: https://github.com/seriousm4x/UpSnap/issues/583