Fix veth leak in overlay driver

- Because of the lazy logic in Leave(), the overlay
  veth end is not moved from the sandbox to the host
  network namspace until the last endpoint leaves.
  We cannot rely on this logic to clear the veth pairs,
  because on last endpoint leave we have no reference to
  the other N-1 veth names.

- The fix is to delete the container veth end on endpoint delete.
  This anyways deletes both veth ends, regardless they are in different
  namespaces.

Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
Alessandro Boch
2016-03-07 14:59:29 -08:00
parent bb3c060954
commit dbf16c8302

View File

@@ -54,7 +54,7 @@ func (d *driver) Join(nid, eid string, sboxKey string, jinfo driverapi.JoinInfo,
return err
}
ep.ifName = overlayIfName
ep.ifName = containerIfName
// Set the container interface and its peer MTU to 1450 to allow
// for 50 bytes vxlan encap (inner eth header(14) + outer IP(20) +