From e28730d44b257597b6c37f9040eee3fbd3a7ff43 Mon Sep 17 00:00:00 2001 From: Santhosh Manohar Date: Thu, 11 Aug 2016 17:51:13 -0700 Subject: [PATCH] Fix a panic introduced by #1389 Signed-off-by: Santhosh Manohar --- libnetwork/sandbox.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libnetwork/sandbox.go b/libnetwork/sandbox.go index ef082f2380..8a659b038c 100644 --- a/libnetwork/sandbox.go +++ b/libnetwork/sandbox.go @@ -567,7 +567,10 @@ func (sb *sandbox) ResolveName(name string, ipType int) ([]net.IP, bool) { newList := []*endpoint{} if !sb.controller.isDistributedControl() { newList = append(newList, getDynamicNwEndpoints(epList)...) - newList = append(newList, getIngressNwEndpoint(epList)) + ingressEP := getIngressNwEndpoint(epList) + if ingressEP != nil { + newList = append(newList, ingressEP) + } newList = append(newList, getLocalNwEndpoints(epList)...) epList = newList }