Block forever

This commit is contained in:
Josh Deprez 2024-04-23 11:58:01 +10:00
parent 74936edbdd
commit 9be67557c3
Signed by: josh
SSH key fingerprint: SHA256:zZji7w1Ilh2RuUpbQcqkLPrqmRwpiCSycbF2EfKm6Kw

View file

@ -32,7 +32,6 @@ import (
"regexp" "regexp"
"strings" "strings"
"sync" "sync"
"time"
"gitea.drjosh.dev/josh/jrouter/aurp" "gitea.drjosh.dev/josh/jrouter/aurp"
"gitea.drjosh.dev/josh/jrouter/router" "gitea.drjosh.dev/josh/jrouter/router"
@ -118,7 +117,8 @@ func main() {
myHWAddr = ethernet.Addr(netHWAddr) myHWAddr = ethernet.Addr(netHWAddr)
} }
pcapHandle, err := pcap.OpenLive(cfg.EtherTalk.Device, 4096, true, 100*time.Millisecond) //pcapHandle, err := pcap.OpenLive(cfg.EtherTalk.Device, 4096, true, 100*time.Millisecond)
pcapHandle, err := pcap.OpenLive(cfg.EtherTalk.Device, 4096, true, pcap.BlockForever)
if err != nil { if err != nil {
log.Fatalf("Couldn't open %q for packet capture: %v", cfg.EtherTalk.Device, err) log.Fatalf("Couldn't open %q for packet capture: %v", cfg.EtherTalk.Device, err)
} }