From 4a7706ed497c021d66de3bad4de0b49ca50e7441 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 15 Oct 2008 15:46:48 -0700 Subject: [PATCH] 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. --- secchan/secchan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secchan/secchan.c b/secchan/secchan.c index 5b58787b8..5037cec27 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, -- 2.43.0