From 66b7113025f10345c6cb259bb4dd7867240c2a01 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Tue, 9 Feb 2021 23:10:57 -0800 Subject: [PATCH] unset delay_tunnel_reason as soon as PPP reaches network state This prevents an unnecessary extra iteration of waiting for PPP negotiation. Caught via ppp-over-tls test logs. Signed-off-by: Daniel Lenski --- ppp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ppp.c b/ppp.c index 55a04148..9d0c0322 100644 --- a/ppp.c +++ b/ppp.c @@ -914,8 +914,7 @@ static int handle_state_transition(struct openconnect_info *vpninfo, int *timeou } /* Delay tunnel setup until after PPP negotiation */ - if (ppp->ppp_state != PPPS_NETWORK) - vpninfo->delay_tunnel_reason = "PPP negotiation"; + vpninfo->delay_tunnel_reason = (ppp->ppp_state < PPPS_NETWORK) ? "PPP negotiation" : NULL; if (last_state != ppp->ppp_state) { vpn_progress(vpninfo, PRG_DEBUG, -- 2.49.0