From f893a88f5e939d2fbaa2e18d2350623d5579caaf Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Thu, 29 Dec 2016 12:29:39 -0300 Subject: [PATCH] Fix sort for catch all server --- core/pkg/ingress/sort_ingress.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/pkg/ingress/sort_ingress.go b/core/pkg/ingress/sort_ingress.go index cc5f2d76d8..621b95232d 100644 --- a/core/pkg/ingress/sort_ingress.go +++ b/core/pkg/ingress/sort_ingress.go @@ -54,6 +54,10 @@ type ServerByName []*Server func (c ServerByName) Len() int { return len(c) } func (c ServerByName) Swap(i, j int) { c[i], c[j] = c[j], c[i] } func (c ServerByName) Less(i, j int) bool { + // special case for catch all server + if c[j].Hostname == "_" { + return false + } return c[i].Hostname < c[j].Hostname }