From: Daniel Lenski Date: Sun, 17 May 2020 07:04:12 +0000 (-0700) Subject: fix too-early fallthrough from OPENED to NETWORK state X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4f34c4719876e47b24d8b55d90757122d21e8406;p=users%2Fdwmw2%2Fopenconnect.git fix too-early fallthrough from OPENED to NETWORK state Signed-off-by: Daniel Lenski --- 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 */