vswitch: Fix connection to a remote controller.
authorBen Pfaff <blp@nicira.com>
Fri, 27 Feb 2009 23:48:39 +0000 (15:48 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 3 Mar 2009 21:48:28 +0000 (13:48 -0800)
Without this change, vswitchd will kill secchan almost as soon as it
starts it, because it fails to recognize that it is connecting to a remote
controller instead of to vswitchd.

vswitchd/bridge.c

index 36755026dbe2d6cc828cd0e48269d81d2445c488..29d6b534c2ccbb5aafee53f284581911c5ce2da4 100644 (file)
@@ -549,7 +549,7 @@ run_secchan(struct bridge *br)
         if (process_exited(br->secchan)) {
             log_secchan_died(VLL_ERR, br, false);
             br->sc_state = SC_UNSTARTED;
-        } else if (!rconn_is_alive(br->rconn)) {
+        } else if (!br->controller && !rconn_is_alive(br->rconn)) {
             VLOG_ERR("%s: connection to secchan closed unexpectedly, "
                      "killing secchan", br->name);
             kill_secchan(br);