Fix: Only add SRV records that match the bucket name exactly (#7957)

Problem: MinIO incorrectly appends DNS SRV records of buckets that have a prefix match with a given bucket. E.g bucket1 would incorrectly get bucket's DNS records too.
Solution: This fix ensures that we only add SRV records that match the key exactly
This commit is contained in:
Harshavardhana 2019-07-20 03:29:05 -07:00 committed by kannappanr
parent 0373a1699b
commit 8b5e6e338c

View File

@ -84,7 +84,7 @@ func (c *coreDNS) Get(bucket string) ([]SrvRecord, error) {
if record.Key != "" {
continue
}
srvRecords = append(srvRecords, records...)
srvRecords = append(srvRecords, record)
}
}
if len(srvRecords) == 0 {