From dd47163bea753daba5204333c2764594f94d6a60 Mon Sep 17 00:00:00 2001 From: dyhkwong <50692134+dyhkwong@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:00:43 +0800 Subject: [PATCH] Fix source_ip_is_private matching --- route/rule_item_ip_is_private.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/route/rule_item_ip_is_private.go b/route/rule_item_ip_is_private.go index 4d511fdf..d7341645 100644 --- a/route/rule_item_ip_is_private.go +++ b/route/rule_item_ip_is_private.go @@ -24,8 +24,8 @@ func (r *IPIsPrivateItem) Match(metadata *adapter.InboundContext) bool { } else { destination = metadata.Destination.Addr } - if destination.IsValid() && !N.IsPublicAddr(destination) { - return true + if destination.IsValid() { + return !N.IsPublicAddr(destination) } for _, destinationAddress := range metadata.DestinationAddresses { if !N.IsPublicAddr(destinationAddress) {