Просмотр исходного кода

Revert "embed: fix HTTPs + DNS SRV discovery"

This reverts commit f79d5aaca475f6d36985856f2fba5b2ed3df7249.
Gyu-Ho Lee 8 лет назад
Родитель
Сommit
fe7b094f63
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      embed/config.go

+ 1 - 3
embed/config.go

@@ -444,9 +444,7 @@ func (cfg *Config) PeerURLsMapAndToken(which string) (urlsmap types.URLsMap, tok
 		}
 		}
 		clusterStr := strings.Join(clusterStrs, ",")
 		clusterStr := strings.Join(clusterStrs, ",")
 		if strings.Contains(clusterStr, "https://") && cfg.PeerTLSInfo.CAFile == "" {
 		if strings.Contains(clusterStr, "https://") && cfg.PeerTLSInfo.CAFile == "" {
-			// SRV targets have subdomains under the given DNSCluster, so wildcard matching
-			// is needed.
-			cfg.PeerTLSInfo.ServerName = "*." + cfg.DNSCluster
+			cfg.PeerTLSInfo.ServerName = cfg.DNSCluster
 		}
 		}
 		urlsmap, err = types.NewURLsMap(clusterStr)
 		urlsmap, err = types.NewURLsMap(clusterStr)
 		// only etcd member must belong to the discovered cluster.
 		// only etcd member must belong to the discovered cluster.