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

This commit is contained in:
evilsocket 2018-02-20 04:26:19 +01:00
parent ccffeff28f
commit c0981ea9e6
2 changed files with 2 additions and 1 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) == "ff:ff:ff:ff:ff:ff" { if strings.ToLower(mac) == BroadcastMacS {
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

@ -18,6 +18,7 @@ const (
var ( var (
BroadcastMac = []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff} BroadcastMac = []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*$")
) )