mirror of
https://github.com/ScottESanDiego/virtwold.git
synced 2025-01-03 03:25:18 +00:00
Listen for 234 byte packets too, which is WOL with password
This commit is contained in:
parent
899e83af50
commit
dd49f4ba6c
@ -6,6 +6,8 @@
|
|||||||
//
|
//
|
||||||
// Assumes the VM has a static MAC configured
|
// Assumes the VM has a static MAC configured
|
||||||
// Assumes libvirtd connection is at /var/run/libvirt/libvirt-sock
|
// Assumes libvirtd connection is at /var/run/libvirt/libvirt-sock
|
||||||
|
//
|
||||||
|
// Filters on len=144 (WOL packet) and len=234 (WOL packet with password)
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@ -25,9 +27,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var iface string // Interface we'll listen on
|
var iface string // Interface we'll listen on
|
||||||
var buffer = int32(1600) // Buffer for packets received
|
var buffer = int32(1600) // Buffer for packets received
|
||||||
var filter = "udp and broadcast and len = 144" // PCAP filter to catch UDP WOL packets
|
var filter = "udp and broadcast and (len = 144 or len=234)" // PCAP filter to catch UDP WOL packets
|
||||||
|
|
||||||
flag.StringVar(&iface, "interface", "", "Network interface name to listen on")
|
flag.StringVar(&iface, "interface", "", "Network interface name to listen on")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
Loading…
Reference in New Issue
Block a user