misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-02-20 04:27:35 +01:00
commit efe9fd1ab9
2 changed files with 3 additions and 3 deletions

View file

@ -154,7 +154,7 @@ func (lan *LAN) shouldIgnore(ip, mac string) bool {
return true return true
} }
// skip broadcast macs // skip broadcast macs
if strings.ToLower(mac) == BroadcastMacS { if strings.ToLower(mac) == BroadcastMac {
return true return true
} }
// skip everything which is not in our subnet (multicast noise) // skip everything which is not in our subnet (multicast noise)

View file

@ -12,13 +12,13 @@ import (
const ( const (
MonitorModeAddress = "0.0.0.0" MonitorModeAddress = "0.0.0.0"
BroadcastMac = "ff:ff:ff:ff:ff:ff"
IPv4MulticastStart = "01:00:5e:00:00:00" IPv4MulticastStart = "01:00:5e:00:00:00"
IPv4MulticastEnd = "01:00:5e:7f:ff:ff" IPv4MulticastEnd = "01:00:5e:7f:ff:ff"
) )
var ( var (
BroadcastMac = []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff} BroadcastHw = []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
BroadcastMacS = "ff:ff:ff:ff:ff:ff"
IPv4Validator = regexp.MustCompile("^[0-9\\.]+/?\\d*$") IPv4Validator = regexp.MustCompile("^[0-9\\.]+/?\\d*$")
) )