Do not send duplicates

This commit is contained in:
2026-07-10 19:17:57 +05:30
parent abf1d8c175
commit cc5e33c31a
4 changed files with 70 additions and 48 deletions
+16 -19
View File
@@ -1,7 +1,8 @@
# Wolz
- Broadcast Wake on Lan (WoL) magic packet to network devices in the local network.
- WoL only works if the target network interface supports it and is not in low power mode. Check [arch wiki](https://wiki.archlinux.org/title/Wake-on-LAN) on this subject to setup your device to wakup
- WoL only works if the target network interface supports it and is not in low power mode.
- Check [arch wiki](https://wiki.archlinux.org/title/Wake-on-LAN) on this subject to setup your device to Wakup on LAN.
## Usage
@@ -9,31 +10,27 @@ Run `wolz` to view the help text.
## Troubleshooting
This tool broadcasts the magic packet to the limited broadcast address 255.255.255.255 and port 9.
This tool broadcasts the magic packet to the broadcast address (and port 9) of all networks the physical interfaces connect to.
Install `tcpdump` to inspect the network traffic published to the limited broadcast address (255.255.255.255) and port 9
Install `tcpdump` to inspect the network traffic on the receiving node. And execute the tool from the source node.
```bash
$> # Update `enp42s0` to your interface name.
$> # To find out the interface to which the kernel
$> # routes the packets to, do
$> # ip route get 255.255.255.255
$> sudo tcpdump -i enp42s0 udp and host 255.255.255.255 and port 9 -n -XX
$> sudo tcpdump -i enp42s0 udp and port 9 -n -XX
$>
$> # Sample output for mac 04:7c:16:6e:c0:2f
0x0000: 4500 0082 6153 4000 4011 ceb6 0a60 0002 E...aS@.@....`..
0x0010: ffff ffff 8bd0 0009 006e b739 ffff ffff .........n.9....
0x0020: ffff 047c 166e c02f 047c 166e c02f 047c ...|.n./.|.n./.|
0x0030: 166e c02f 047c 166e c02f 047c 166e c02f .n./.|.n./.|.n./
0x0040: 047c 166e c02f 047c 166e c02f 047c 166e .|.n./.|.n./.|.n
0x0050: c02f 047c 166e c02f 047c 166e c02f 047c ./.|.n./.|.n./.|
0x0060: 166e c02f 047c 166e c02f 047c 166e c02f .n./.|.n./.|.n./
0x0070: 047c 166e c02f 047c 166e c02f 047c 166e .|.n./.|.n./.|.n
0x0080: c02f ./
$> # Sample output for mac aa:bb:cc:dd:ee:ff
18:56:47.573848 IP 192.168.0.10.34801 > 192.168.0.255.9: UDP, length 102
0x0000: ffff ffff ffff dca6 324f e820 0800 4500 ........2O....E.
0x0010: 0082 adf8 4000 4011 0a19 c0a8 000a c0a8 ....@.@.........
0x0020: 00ff 87f1 0009 006e 8b27 ffff ffff ffff .......n.'......
0x0030: aabb ccdd eeff aabb ccdd eeff aabb ccdd ................
0x0040: eeff aabb ccdd eeff aabb ccdd eeff aabb ................
0x0050: ccdd eeff aabb ccdd eeff aabb ccdd eeff ................
0x0060: aabb ccdd eeff aabb ccdd eeff aabb ccdd ................
0x0070: eeff aabb ccdd eeff aabb ccdd eeff aabb ................
0x0080: ccdd eeff aabb ccdd eeff aabb ccdd eeff ................
```
If you have VPN enabled, depending on the configuration the kernel might route it to the tunnel interface, and the tool will not work.
To debug TCP packets intended to wolz-daemon, run
```