Skip to content

Commit fbf67cb

Browse files
committed
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>
1 parent 080bedd commit fbf67cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/overlay/joinleave.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (d *driver) Join(nid, eid string, sboxKey string, jinfo driverapi.JoinInfo,
5454
return err
5555
}
5656

57-
ep.ifName = overlayIfName
57+
ep.ifName = containerIfName
5858

5959
// Set the container interface and its peer MTU to 1450 to allow
6060
// for 50 bytes vxlan encap (inner eth header(14) + outer IP(20) +

0 commit comments

Comments
 (0)