diff --git a/network/lan.go b/network/lan.go index 8a2c0af7..7d2566a3 100644 --- a/network/lan.go +++ b/network/lan.go @@ -150,7 +150,7 @@ func (lan *LAN) shouldIgnore(ip, mac string) bool { return true } // skip broadcast addresses - if strings.HasSuffix(ip, ".255") { + if strings.HasSuffix(ip, BroadcastSuffix) { return true } // skip broadcast macs diff --git a/network/net.go b/network/net.go index b9d605db..05530cc5 100644 --- a/network/net.go +++ b/network/net.go @@ -12,6 +12,7 @@ import ( const ( MonitorModeAddress = "0.0.0.0" + BroadcastSuffix = ".255" BroadcastMac = "ff:ff:ff:ff:ff:ff" IPv4MulticastStart = "01:00:5e:00:00:00" IPv4MulticastEnd = "01:00:5e:7f:ff:ff"