secchan: Make sure fail-open doesn't drop the first messages from connection.

Fail-open mode is entered or left in a secchan "periodic" callback, which
may not be called immediately after the connection to the controller
actually comes up.  This can cause the fail-open local-packet CB to
locally handle messages from the datapath and drop them, causing the
controller to think that it's being ignore and drop the connection.

Thanks to Dan for raising the issue.
This commit is contained in:
Ben Pfaff committed 2008-10-15 15:46:48 -07:00
1 parent 37c94b45fd
commit 4a7706ed49
1 file changed
+1 -1
+1 -1
View File
@@ -1878,7 +1878,7 @@ static bool
fail_open_local_packet_cb(struct relay *r, void *fail_open_)
{
struct fail_open_data *fail_open = fail_open_;
if (!fail_open->lswitch) {
if (rconn_is_connected(fail_open->remote_rconn) || !fail_open->lswitch) {
return false;
} else {
lswitch_process_packet(fail_open->lswitch, fail_open->local_rconn,