From 4f34c4719876e47b24d8b55d90757122d21e8406 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Sun, 17 May 2020 00:04:12 -0700 Subject: [PATCH] fix too-early fallthrough from OPENED to NETWORK state Signed-off-by: Daniel Lenski --- ppp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ppp.c b/ppp.c index 0a08ed25..c7b58503 100644 --- a/ppp.c +++ b/ppp.c @@ -746,9 +746,11 @@ static int handle_state_transition(struct openconnect_info *vpninfo, int *timeou case PPPS_ESTABLISH: if ((ppp->lcp.state & NCP_CONF_ACK_RECEIVED) && (ppp->lcp.state & NCP_CONF_ACK_SENT)) ppp->ppp_state = PPPS_OPENED; - else if (ka_check_deadline(timeout, now, ppp->lcp.last_req + 3)) { - ppp->lcp.last_req = now; - queue_config_request(vpninfo, PPP_LCP); + else { + if (ka_check_deadline(timeout, now, ppp->lcp.last_req + 3)) { + ppp->lcp.last_req = now; + queue_config_request(vpninfo, PPP_LCP); + } break; } /* fall through */ -- 2.49.0