From d90278cd51b82d91a495ba65f87bbd58488250d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 25 Nov 2026 20:10:39 +0800 Subject: [PATCH] Fix address filter matching for inverted legacy DNS rules with rule-sets A rule-set that is not merged into the outer rule is an additional condition of it, so its match still depends on deferred address filter conditions after the outer destination address items match. Pre-lookup matching cleared that dependency with the outer rule's satisfied groups, so inverted rules combining destination address items with such a rule-set were rejected before the lookup instead of being decided by the response. --- route/rule/rule_abstract.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/route/rule/rule_abstract.go b/route/rule/rule_abstract.go index cb7d5060..e2c42872 100644 --- a/route/rule/rule_abstract.go +++ b/route/rule/rule_abstract.go @@ -73,16 +73,10 @@ func (r *abstractDefaultRule) matchInner(metadata *adapter.InboundContext) bool return false } } - var matched bool if r.ruleSetItem != nil { - matched = r.ruleSetItem.matchWithOuterGroups(metadata, groups) - } else { - matched = groups.done() + return r.ruleSetItem.matchWithOuterGroups(metadata, groups) } - if matched { - metadata.DeferredIPCIDRMatchGroups &^= uint8(groups.satisfied) - } - return matched + return groups.done() } func (r *abstractDefaultRule) evaluateForMerge(metadata *adapter.InboundContext) (ruleGroupMatch, bool) {