in-band: Refresh both local and remote rules even if local rules change.
authorBen Pfaff <blp@nicira.com>
Tue, 20 Apr 2010 20:41:53 +0000 (13:41 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 20 Apr 2010 20:41:53 +0000 (13:41 -0700)
This code should call refresh_remotes() even if refresh_local() returns
true.  That is, the normal C short-circuit evaluation of || is not desired
here.  So always call both.

ofproto/in-band.c

index 85cc034d1ceca6f787ef6f449375d6d3db2ca5cc..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;
     }