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 917514e09f
commit 71d1879bd6
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
})