Fixed: Does RuleSet resolve ip logic modification
This commit is contained in:
parent
2cd16ea478
commit
eb07d8b820
2 changed files with 2 additions and 2 deletions
|
@ -126,7 +126,6 @@ func NewRuleSetProvider(name string, behavior P.RuleType, interval time.Duration
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
rp.shouldResolveIP = false
|
|
||||||
rp.setRules(rules)
|
rp.setRules(rules)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -242,5 +241,6 @@ func (rp *ruleSetProvider) setRules(rules interface{}) {
|
||||||
rp.IPCIDRRules = rules.(*trie.IpCidrTrie)
|
rp.IPCIDRRules = rules.(*trie.IpCidrTrie)
|
||||||
rp.shouldResolveIP = true
|
rp.shouldResolveIP = true
|
||||||
default:
|
default:
|
||||||
|
rp.shouldResolveIP = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ func (rs *RuleSet) Payload() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rs *RuleSet) ShouldResolveIP() bool {
|
func (rs *RuleSet) ShouldResolveIP() bool {
|
||||||
return rs.getProviders().Behavior() != P.Domain
|
return rs.getProviders().ShouldResolveIP()
|
||||||
}
|
}
|
||||||
func (rs *RuleSet) getProviders() P.RuleProvider {
|
func (rs *RuleSet) getProviders() P.RuleProvider {
|
||||||
if rs.ruleProvider == nil {
|
if rs.ruleProvider == nil {
|
||||||
|
|
Loading…
Reference in a new issue