From: Daniel Lenski Date: Wed, 10 Feb 2021 07:10:57 +0000 (-0800) Subject: unset delay_tunnel_reason as soon as PPP reaches network state X-Git-Tag: v8.20~327^2~8 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=66b7113025f10345c6cb259bb4dd7867240c2a01;p=users%2Fdwmw2%2Fopenconnect.git 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 --- 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,