mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-04-11 17:47:20 +10:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user