Fix: exclude the broadcast address to fake ip pool
This commit is contained in:
@ -10,6 +10,7 @@ type Enhancer interface {
|
||||
FakeIPEnabled() bool
|
||||
MappingEnabled() bool
|
||||
IsFakeIP(net.IP) bool
|
||||
IsFakeBroadcastIP(net.IP) bool
|
||||
IsExistFakeIP(net.IP) bool
|
||||
FindHostByIP(net.IP) (string, bool)
|
||||
}
|
||||
@ -38,6 +39,14 @@ func IsFakeIP(ip net.IP) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func IsFakeBroadcastIP(ip net.IP) bool {
|
||||
if mapper := DefaultHostMapper; mapper != nil {
|
||||
return mapper.IsFakeBroadcastIP(ip)
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func IsExistFakeIP(ip net.IP) bool {
|
||||
if mapper := DefaultHostMapper; mapper != nil {
|
||||
return mapper.IsExistFakeIP(ip)
|
||||
|
Reference in New Issue
Block a user