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 c64f50fdcb
commit e0259ddea0

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