From 13a4cb2abeedbd3f4ee1e05c0a19107958a77d14 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Tue, 19 May 2020 14:51:33 -0700 Subject: [PATCH] fix crash when we receive unknown protocol before agreeing on MRU/MTU Signed-off-by: Daniel Lenski --- ppp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppp.c b/ppp.c index 4ebd1a45..9369aa02 100644 --- a/ppp.c +++ b/ppp.c @@ -1147,7 +1147,7 @@ int ppp_mainloop(struct openconnect_info *vpninfo, int *timeout, int readable) */ store_be16(pp - 2, proto); if ((ret = queue_config_packet(vpninfo, PPP_LCP, ++ppp->lcp.id, PROTREJ, - MIN(payload_len + 2, vpninfo->ip_info.mtu - 10), + MIN(payload_len + 2, (vpninfo->ip_info.mtu ?: 256) - 10), pp - 2)) < 0) return ret; } -- 2.49.0