Skip to content
Snippets Groups Projects
Commit 9c8c08ea authored by Jake Taylor's avatar Jake Taylor
Browse files

prevent updating with an empty ndf

parent f60fcac5
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment