Merge pull request #684 from sanimej/bfix

Fixes #680
This commit is contained in:
Jana Radhakrishnan 2015-10-19 16:32:08 -07:00
commit a10c1e3460

View file

@ -179,6 +179,7 @@ func (n *network) destroySandbox() {
}
}
sbox.Destroy()
n.setSandbox(nil)
}
}
@ -193,7 +194,7 @@ func (n *network) initSubnetSandbox(s *subnet) error {
if err := sbox.AddInterface(brName, "br",
sbox.InterfaceOptions().Address(s.gwIP),
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))
@ -203,7 +204,7 @@ func (n *network) initSubnetSandbox(s *subnet) error {
if err := sbox.AddInterface(vxlanName, "vxlan",
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()