From: Daniel Lenski Date: Wed, 13 May 2020 17:15:46 +0000 (-0700) Subject: fix encap_names for Fortinet HDLC X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=be208a0a0e991a99b84845fc7afe856cd6404e17;p=users%2Fdwmw2%2Fopenconnect.git fix encap_names for Fortinet HDLC Signed-off-by: Daniel Lenski --- diff --git a/openconnect-internal.h b/openconnect-internal.h index f616f1b3..1c1a8784 100644 --- a/openconnect-internal.h +++ b/openconnect-internal.h @@ -179,6 +179,7 @@ struct pkt { #define PPP_ENCAP_F5 1 /* F5 BigIP no HDLC */ #define PPP_ENCAP_F5_HDLC 2 /* F5 BigIP HDLC */ #define PPP_ENCAP_FORTINET_HDLC 3 /* Fortinet HDLC */ +#define PPP_ENCAP_MAX PPP_ENCAP_FORTINET_HDLC #define COMPR_DEFLATE (1<<0) #define COMPR_LZS (1<<1) diff --git a/ppp.c b/ppp.c index 350985df..1e0de44f 100644 --- a/ppp.c +++ b/ppp.c @@ -157,7 +157,8 @@ static int unhdlc_in_place(struct openconnect_info *vpninfo, unsigned char *byte } static const char *ppps_names[] = { "DEAD", "ESTABLISH", "OPENED", "AUTHENTICATE", "NETWORK", "TERMINATE" }; -static const char *encap_names[] = { NULL, "F5", "F5 HDLC" }; +static const char *encap_names[PPPS_ENCAP_MAX] = { NULL, + "F5", "F5 HDLC", "FORTINET HDLC" }; static const char *lcp_names[] = { NULL, "Configure-Request", "Configure-Ack", "Configure-Nak", "Configure-Reject",