veth: Do a better job cleaning up on rmmod
[openvswitch] / ofproto / in-band.c
index aa522de2713c7b0b3e199953281652a1821849d8..444e69d4f27ddfee812c2e1c37273a639e01320a 100644 (file)
@@ -692,8 +692,11 @@ void
 in_band_run(struct in_band *ib)
 {
     struct in_band_remote *r;
+    bool local_change, remote_change;
 
-    if (!refresh_local(ib) && !refresh_remotes(ib)) {
+    local_change = refresh_local(ib);
+    remote_change = refresh_remotes(ib);
+    if (!local_change && !remote_change) {
         /* Nothing changed, nothing to do. */
         return;
     }
@@ -740,10 +743,12 @@ in_band_wait(struct in_band *in_band)
     }
 }
 
+/* ofproto has flushed all flows from the flow table and it is calling us back
+ * to allow us to reinstall the ones that are important to us. */
 void
 in_band_flushed(struct in_band *in_band)
 {
-    clear_rules(in_band);
+    add_rules(in_band);
 }
 
 int