bridge: Destroy ofproto before deleting dpif.
authorBen Pfaff <blp@nicira.com>
Thu, 31 Mar 2011 21:12:57 +0000 (14:12 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 31 Mar 2011 21:28:42 +0000 (14:28 -0700)
Otherwise the ofproto's attempt to flush flows from the dpif will fail with
an error, causing a spurious log message.

vswitchd/bridge.c

index bf89778c6d8c6084f075a125d0a657b914b533ba..72091a29aeb8ece223ad79049f83a5acb80f31bb 100644 (file)
@@ -1690,13 +1690,13 @@ bridge_destroy(struct bridge *br)
             port_destroy(port);
         }
         list_remove(&br->node);
+        ofproto_destroy(br->ofproto);
         error = dpif_delete(br->dpif);
         if (error && error != ENOENT) {
             VLOG_ERR("failed to delete %s: %s",
                      dpif_name(br->dpif), strerror(error));
         }
         dpif_close(br->dpif);
-        ofproto_destroy(br->ofproto);
         mac_learning_destroy(br->ml);
         hmap_destroy(&br->ifaces);
         hmap_destroy(&br->ports);