Fix missing rule_set_ipcidr_match_source item in DNS rules

This commit is contained in:
世界
2024-02-21 14:27:55 +08:00
parent 0843c22e83
commit f6ced68f38
8 changed files with 62 additions and 40 deletions

View File

@@ -47,7 +47,10 @@ func (r *RuleSetItem) Match(metadata *adapter.InboundContext) bool {
return false
}
func (r *RuleSetItem) ContainsIPCIDRRule() bool {
func (r *RuleSetItem) ContainsDestinationIPCIDRRule() bool {
if r.ipcidrMatchSource {
return false
}
return common.Any(r.setList, func(ruleSet adapter.RuleSet) bool {
return ruleSet.Metadata().ContainsIPCIDRRule
})