]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
fix too-early fallthrough from OPENED to NETWORK state
authorDaniel Lenski <dlenski@gmail.com>
Sun, 17 May 2020 07:04:12 +0000 (00:04 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Sun, 17 May 2020 13:53:26 +0000 (06:53 -0700)
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
ppp.c

diff --git a/ppp.c b/ppp.c
index 0a08ed25db9f63cecbbf3102160d709bbe0d8e50..c7b585035d2a3214703c44c4f78d98b2e051941d 100644 (file)
--- 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 */