dpif-linux: Fix fd leak for vports that disappear from the datapath.
authorBen Pfaff <blp@nicira.com>
Thu, 2 May 2013 00:13:14 +0000 (17:13 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 13 Dec 2013 22:52:46 +0000 (14:52 -0800)
commit61eae43774eeb57d2dbe442b29220ed7ef2c3d03
treede59b1235c289821dfd6bd5ed968feef1a883383
parent8381a3d36c45ebfdcf3e0dc3c5dace94912216ba
dpif-linux: Fix fd leak for vports that disappear from the datapath.

When ovs-vswitchd deletes a port with dpif_linux_port_del(), that function
uses del_channel() to delete the corresponding channel, including closing
its Netlink socket fd.  However, if the vport gets removed by some other
process (e.g. "ip link delete" for veths) then this function never gets
called and thus the channel never gets deleted.

This commit fixes the problem by resynchronizing channels with the
datapath whenever a vport gets deleted.

Bug #16784.
Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/dpif-linux.c