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.
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,