veth: Do a better job cleaning up on rmmod
[openvswitch] / ofproto / in-band.c
index 82e51c726897cba787bbb834d9523fc8c3a4151b..444e69d4f27ddfee812c2e1c37273a639e01320a 100644 (file)
  *      problems and amount of processing, we decided to hold off for
  *      the time-being.
  *
- *    - Multiple Controllers.  There is nothing intrinsic in the high-
- *      level design that prevents using multiple (known) controllers, 
- *      however, the current implementation's data structures assume
- *      only one.
- *
  *    - Differing Controllers for Switches.  All switches must know
  *      the L3 addresses for all the controllers that other switches 
  *      may use, since rules need to be set up to allow traffic related
@@ -697,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;
     }
@@ -745,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