From 693157a8d79147397e7afbc985f26383bd389cc3 Mon Sep 17 00:00:00 2001 From: Bob Van Zant Date: Tue, 26 Sep 2017 17:26:35 -0700 Subject: [PATCH] Detect changes in SNI maps too --- core/pkg/ingress/types_equals.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/core/pkg/ingress/types_equals.go b/core/pkg/ingress/types_equals.go index fc62def57..cfe2fa065 100644 --- a/core/pkg/ingress/types_equals.go +++ b/core/pkg/ingress/types_equals.go @@ -100,6 +100,23 @@ func (c1 *Configuration) Equal(c2 *Configuration) bool { } } + if len(c1.SNIEndpoints) != len(c2.SNIEndpoints) { + return false + } + + for _, sni1 := range c1.SNIEndpoints { + found := false + for _, sni2 := range c2.SNIEndpoints { + if (&sni1).Equal(&sni2) { + found = true + break + } + } + if !found { + return false + } + } + if len(c1.UDPEndpoints) != len(c2.UDPEndpoints) { return false }