secchan: Flush datapath flow table when initializing the switch.
authorBen Pfaff <blp@nicira.com>
Thu, 5 Mar 2009 01:32:53 +0000 (17:32 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 5 Mar 2009 01:34:50 +0000 (17:34 -0800)
The switch can't recover the entire OpenFlow state from the datapath, so
it has the choice of either guessing at some missing information (which
seems undesirable) or just flushing the table.  The latter is easier, so
do that.

secchan/ofproto.c

index b14556c36dfa7719c8cd2a90b86ed288bcd80498..7828b134967f50fd75bd1b39f0e7ff602f373ef6 100644 (file)
@@ -222,6 +222,7 @@ ofproto_create(const char *datapath, struct ofproto **ofprotop)
         dpif_close(&dpif);
         return error;
     }
+    dpif_flow_flush(&dpif);
 
     /* Start monitoring datapath ports for status changes. */
     error = dpifmon_create(&dpif, &dpifmon);