ovs-vsctl: When deleting a real bridge, delete ports of child fake bridges.
authorBen Pfaff <blp@nicira.com>
Fri, 5 Feb 2010 22:10:02 +0000 (14:10 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 8 Feb 2010 22:16:18 +0000 (14:16 -0800)
Otherwise these ports and their interfaces hang around unreferenced.

utilities/ovs-vsctl.c

index 981a4e29ae86e1064cb76dc7495f31cf8af1e63b..8ee18d78ea3b0c489cd4ef38e091f90d0dc4b038 100644 (file)
@@ -897,7 +897,7 @@ cmd_del_br(struct vsctl_context *ctx)
 
         SHASH_FOR_EACH (node, &info.ports) {
             struct vsctl_port *port = node->data;
-            if (port->bridge == bridge
+            if (port->bridge == bridge || port->bridge->parent == bridge
                 || !strcmp(port->port_cfg->name, bridge->name)) {
                 del_port(&info, port);
             }