diff --git a/network/gateway/hostPool.go b/network/gateway/hostPool.go index 173ca2e2a691f94c0b78d4065e9d3bd9ece7ddda..ad3da5b24194d0f071226fc3536fdc5901e083ca 100644 --- a/network/gateway/hostPool.go +++ b/network/gateway/hostPool.go @@ -125,6 +125,11 @@ func newHostPool(poolParams PoolParams, rng *fastRNG.StreamGenerator, ndf *ndf.N // UpdateNdf Mutates internal ndf to the given ndf func (h *HostPool) UpdateNdf(ndf *ndf.NetworkDefinition) { + if len(ndf.Gateways) == 0 { + jww.WARN.Printf("Unable to UpdateNdf: no gateways available") + return + } + h.ndfMux.Lock() h.ndf = ndf