wake-on-arp icon indicating copy to clipboard operation
wake-on-arp copied to clipboard

Send WOL only on ARP broadcast messages

Open ignaciovidalfranco opened this issue 3 years ago • 3 comments

First of all, thank you for this piece of software! Although I'm struggling to make it work on my network (too many ARP requests from too many different devices), I think this software has potential.

Now, I'm testing this on my laptop and I noticed that an WOL gets triggered upon any ARP request that matches the specific MAC address.... Say, I got this on tcpcump_

38:de:ad:9b:xx:xx > 50:3e:aa:04:xx:x, ARP, length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.111 tell 192.168.0.70, length 28

38:de:ad:9b:xx:xx > 50:3e:aa:04:xx:xx, ARP, length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.111 tell 192.168.0.70, length 28

38:de:ad:9b:xx:xx > 50:3e:aa:04:xx:xx, ARP, length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.111 tell 192.168.0.70, length 28

38:de:ad:9b:xx:xx > ff:ff:ff:ff:ff:ff, ARP, length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.111 tell 192.168.0.70, length 28

Which caused this:

Magic packet to '192.168.0.111' sent by '192.168.0.70'
Magic packet to '192.168.0.111' sent by '192.168.0.70'
Magic packet to '192.168.0.111' sent by '192.168.0.70'
Magic packet to '192.168.0.111' sent by '192.168.0.70'

So, wouldn't it be useful if wake-on-arp only replied to messages being send with the broadcast destination? or at least handy if it can be configured that way?

Maybe this is just overcomplicating things, but there are my two cents.

ignaciovidalfranco avatar Oct 15 '22 20:10 ignaciovidalfranco

What is the different between ARP to 50:3e:aa:04:xx:xx and ARP to ff:ff:ff:ff:ff:ff?

Would be useful to have one line of description which kind of ARP requests this requested "Broadcast ARP only" filter does prevent. Because people like me don't know which kind of ARPs are not sent to broadcast mac. My idea is: each configuration need a reason to exist.

Currently, we only have source address filtering to exclude routers and hosts which should not automatically wake up the destination.

Falcosc avatar Oct 15 '22 20:10 Falcosc

Since I made this quite a while ago, I may have forgotten some of the details, but in short:

Is the "target to ff:ff:ff:ff:ff:ff" ARP request the ONLY one which is "Broadcast"? If so, implementing that (I think) should be trivial.

Then again I'd need to actually test that to see if that works. (Hopefully it does)

Also what Falco mentioned, we have source address filtering to prevent erroneous wake-ups. For example: your TV pinging the target device despite it not using it (as an example).

nikp123 avatar Oct 16 '22 09:10 nikp123

I would still like to know what the difference of these 2 ARP types is. If we just write "will only allow broadcast mac requests" nobody would know when this filter is useful and when not. Would be cool to have an example where an ARP to 50:3e:aa:04:xx:xx is not wanted.

Falcosc avatar Oct 16 '22 18:10 Falcosc