From 791abb08930387b5dc86aa5c24047eba6d3b5b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 31 Mar 2026 17:28:52 +0800 Subject: [PATCH] dns: remove dead lookupStrategyAllowsQueryType helper --- dns/router.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/dns/router.go b/dns/router.go index 4f10ffb7a..583374766 100644 --- a/dns/router.go +++ b/dns/router.go @@ -584,17 +584,6 @@ func (r *Router) resolveLookupStrategy(options adapter.DNSQueryOptions) C.Domain return r.defaultDomainStrategy } -func lookupStrategyAllowsQueryType(strategy C.DomainStrategy, qType uint16) bool { - switch strategy { - case C.DomainStrategyIPv4Only: - return qType == mDNS.TypeA - case C.DomainStrategyIPv6Only: - return qType == mDNS.TypeAAAA - default: - return true - } -} - func withLookupQueryMetadata(ctx context.Context, qType uint16) context.Context { ctx, metadata := adapter.ExtendContext(ctx) metadata.QueryType = qType