From 8b5e6e338c2e724311608fb3016541f62bba8722 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 20 Jul 2019 03:29:05 -0700 Subject: [PATCH] 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 --- pkg/dns/etcd_dns.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/dns/etcd_dns.go b/pkg/dns/etcd_dns.go index 3a63bd713..44802c0a8 100644 --- a/pkg/dns/etcd_dns.go +++ b/pkg/dns/etcd_dns.go @@ -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 {