dns: remove redundant DNSResponse assignment in addressLimitResponseCheck

MatchAddressLimit internally copies metadata and sets DNSResponse,
making the prior assignment in the closure unnecessary.
This commit is contained in:
世界
2026-03-31 17:39:51 +08:00
parent 4152022b89
commit 8be4f38eaf

View File

@@ -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)
}
}