netdev-vport: Actually destroy the vport when "destroy" is called
authorJustin Pettit <jpettit@nicira.com>
Wed, 13 Oct 2010 07:14:31 +0000 (00:14 -0700)
committerJustin Pettit <jpettit@nicira.com>
Wed, 13 Oct 2010 07:14:31 +0000 (00:14 -0700)
Commit 2b9d65 (netdev-vport: Merge in netdev-patch and netdev-tunnel.)
refactored the common parts of the netdev-patch and netdev-tunnel
sources into netdev-vport.  During the refactoring, the "destroy" method
didn't inherit the netdev_vport_do_ioctl(ODP_VPORT_DEL, ...) call, which
is needed to actually destroy the device in the kernel.  This commit
fixes that.

Bug #3267

lib/netdev-vport.c

index 1ef9114..d354dc3 100644 (file)
@@ -169,6 +169,8 @@ netdev_vport_destroy(struct netdev_dev *netdev_dev_)
 {
     struct netdev_dev_vport *netdev_dev = netdev_dev_vport_cast(netdev_dev_);
 
+    netdev_vport_do_ioctl(ODP_VPORT_DEL, 
+                          (char *)netdev_dev_get_name(netdev_dev_));
     free(netdev_dev);
 }