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 85cc034..444e69d 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;
     }