From e0259ddea01852a6b328138b5cbd892a4962848a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 31 Mar 2026 17:39:51 +0800 Subject: [PATCH] dns: remove redundant DNSResponse assignment in addressLimitResponseCheck MatchAddressLimit internally copies metadata and sets DNSResponse, making the prior assignment in the closure unnecessary. --- dns/router.go | 1 - 1 file changed, 1 deletion(-) diff --git a/dns/router.go b/dns/router.go index 407f14f9c..55433fc8c 100644 --- a/dns/router.go +++ b/dns/router.go @@ -916,7 +916,6 @@ func addressLimitResponseCheck(rule adapter.DNSRule, metadata *adapter.InboundCo responseMetadata := *metadata return func(response *mDNS.Msg) bool { checkMetadata := responseMetadata - checkMetadata.DNSResponse = response return rule.MatchAddressLimit(&checkMetadata, response) } }