Fix source_ip_is_private matching
This commit is contained in:
@@ -24,12 +24,14 @@ func (r *IPIsPrivateItem) Match(metadata *adapter.InboundContext) bool {
|
|||||||
} else {
|
} else {
|
||||||
destination = metadata.Destination.Addr
|
destination = metadata.Destination.Addr
|
||||||
}
|
}
|
||||||
if destination.IsValid() && !N.IsPublicAddr(destination) {
|
if destination.IsValid() {
|
||||||
return true
|
return !N.IsPublicAddr(destination)
|
||||||
}
|
}
|
||||||
for _, destinationAddress := range metadata.DestinationAddresses {
|
if !r.isSource {
|
||||||
if !N.IsPublicAddr(destinationAddress) {
|
for _, destinationAddress := range metadata.DestinationAddresses {
|
||||||
return true
|
if !N.IsPublicAddr(destinationAddress) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|||||||
Reference in New Issue
Block a user