fix: dns mismatched qname matching (#99)

This commit is contained in:
mzz 2023-05-27 13:51:19 +08:00 committed by GitHub
parent 38b2f7b169
commit d9f6fa7aee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ const (
DnsRequestOutboundIndex_LogicalAnd DnsRequestOutboundIndex = 0xFF DnsRequestOutboundIndex_LogicalAnd DnsRequestOutboundIndex = 0xFF
DnsRequestOutboundIndex_LogicalMask DnsRequestOutboundIndex = 0xFE DnsRequestOutboundIndex_LogicalMask DnsRequestOutboundIndex = 0xFE
DnsRequestOutboundIndex_UserDefinedMax = DnsRequestOutboundIndex_AsIs - 1 DnsRequestOutboundIndex_UserDefinedMax = DnsRequestOutboundIndex_Reject - 1
) )
func (i DnsRequestOutboundIndex) String() string { func (i DnsRequestOutboundIndex) String() string {

View File

@ -73,7 +73,7 @@ func (b *RequestMatcherBuilder) addQName(f *config_parser.Function, key string,
} }
b.simulatedDomainSet = append(b.simulatedDomainSet, routing.DomainSet{ b.simulatedDomainSet = append(b.simulatedDomainSet, routing.DomainSet{
Key: consts.RoutingDomainKey(key), Key: consts.RoutingDomainKey(key),
RuleIndex: len(b.simulatedDomainSet), RuleIndex: len(b.rules),
Domains: values, Domains: values,
}) })
upstreamId, err := b.upstreamToId(upstream.Name) upstreamId, err := b.upstreamToId(upstream.Name)

View File

@ -132,7 +132,7 @@ func (b *ResponseMatcherBuilder) addQName(f *config_parser.Function, key string,
} }
b.simulatedDomainSet = append(b.simulatedDomainSet, routing.DomainSet{ b.simulatedDomainSet = append(b.simulatedDomainSet, routing.DomainSet{
Key: consts.RoutingDomainKey(key), Key: consts.RoutingDomainKey(key),
RuleIndex: len(b.simulatedDomainSet), RuleIndex: len(b.rules),
Domains: values, Domains: values,
}) })
upstreamId, err := b.upstreamToId(upstream.Name) upstreamId, err := b.upstreamToId(upstream.Name)