From 0e7a19521c3100b8854e2780c26ec705959f1987 Mon Sep 17 00:00:00 2001 From: Alessandro Boch Date: Mon, 4 Apr 2016 11:24:07 -0700 Subject: [PATCH] Have resources initialized before deleting overlay network - Otherwise a overlay network delete after daemon restart will hit a nil pointer dereference while releasing the vxlan id Signed-off-by: Alessandro Boch --- libnetwork/drivers/overlay/ov_network.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libnetwork/drivers/overlay/ov_network.go b/libnetwork/drivers/overlay/ov_network.go index 9d118ffb4e..18e527a2ba 100644 --- a/libnetwork/drivers/overlay/ov_network.go +++ b/libnetwork/drivers/overlay/ov_network.go @@ -104,6 +104,11 @@ func (d *driver) DeleteNetwork(nid string) error { return fmt.Errorf("invalid network id") } + // Make sure driver resources are initialized before proceeding + if err := d.configure(); err != nil { + return err + } + n := d.network(nid) if n == nil { return fmt.Errorf("could not find network with id %s", nid)