From: Ben Pfaff Date: Wed, 15 Oct 2008 22:46:48 +0000 (-0700) Subject: secchan: Make sure fail-open doesn't drop the first messages from connection. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a7706ed497c021d66de3bad4de0b49ca50e7441;p=openvswitch 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. --- diff --git a/secchan/secchan.c b/secchan/secchan.c index 5b58787b..5037cec2 100644 --- a/secchan/secchan.c +++ b/secchan/secchan.c @@ -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,