]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
fix encap_names for Fortinet HDLC
authorDaniel Lenski <dlenski@gmail.com>
Wed, 13 May 2020 17:15:46 +0000 (10:15 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Wed, 13 May 2020 17:15:46 +0000 (10:15 -0700)
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
openconnect-internal.h
ppp.c

index f616f1b35bdbe4572bb3659712fd37735ecca249..1c1a8784c678bfdd9b0872a95c3f2c7453739f6e 100644 (file)
@@ -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 350985dfa932b1b8aa708a3012e3c78e010d313c..1e0de44f11bf2dd839395972f542ab77677dbb4c 100644 (file)
--- 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",