From 87255e4ff0ce9b0def941200329b650d172738b3 Mon Sep 17 00:00:00 2001 From: Raghav Gulati Date: Mon, 20 Aug 2018 17:09:53 -0700 Subject: [PATCH] Ensure duplicate transports are filtered Without adding the transport to the set, we'll never identify if there are duplicates in the slice of secure transports provided by the config. --- config/security.go | 1 + 1 file changed, 1 insertion(+) diff --git a/config/security.go b/config/security.go index c363972..0aa6989 100644 --- a/config/security.go +++ b/config/security.go @@ -61,6 +61,7 @@ func makeSecurityTransport(h host.Host, tpts []MsSecC) (security.Transport, erro if _, ok := transportSet[tptC.ID]; ok { return nil, fmt.Errorf("duplicate security transport: %s", tptC.ID) } + transportSet[tptC.ID] = tptC } for _, tptC := range tpts { tpt, err := tptC.SecC(h) -- GitLab