1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
This commit is contained in:
Santhosh Manohar 2015-10-19 02:35:54 -07:00
parent d8e14c9efc
commit 316a652e6e

View file

@ -179,6 +179,7 @@ func (n *network) destroySandbox() {
} }
} }
sbox.Destroy() sbox.Destroy()
n.setSandbox(nil)
} }
} }
@ -193,7 +194,7 @@ func (n *network) initSubnetSandbox(s *subnet) error {
if err := sbox.AddInterface(brName, "br", if err := sbox.AddInterface(brName, "br",
sbox.InterfaceOptions().Address(s.gwIP), sbox.InterfaceOptions().Address(s.gwIP),
sbox.InterfaceOptions().Bridge(true)); err != nil { sbox.InterfaceOptions().Bridge(true)); err != nil {
return fmt.Errorf("bridge creation in sandbox failed for subnet %q: %v", s.subnetIP.IP.String(), err) return fmt.Errorf("bridge creation in sandbox failed for subnet %q: %v", s.subnetIP.String(), err)
} }
vxlanName, err := createVxlan(n.vxlanID(s)) vxlanName, err := createVxlan(n.vxlanID(s))
@ -203,7 +204,7 @@ func (n *network) initSubnetSandbox(s *subnet) error {
if err := sbox.AddInterface(vxlanName, "vxlan", if err := sbox.AddInterface(vxlanName, "vxlan",
sbox.InterfaceOptions().Master(brName)); err != nil { sbox.InterfaceOptions().Master(brName)); err != nil {
return fmt.Errorf("vxlan interface creation failed for subnet %q: %v", s.subnetIP.IP.String(), err) return fmt.Errorf("vxlan interface creation failed for subnet %q: %v", s.subnetIP.String(), err)
} }
n.Lock() n.Lock()