]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
pppd regularly drops initial HDLC flag sequence, and we missed two bytes in Van Jacob...
authorDaniel Lenski <dlenski@gmail.com>
Tue, 19 May 2020 23:23:31 +0000 (16:23 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Wed, 20 May 2020 00:36:25 +0000 (17:36 -0700)
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
ppp.c

diff --git a/ppp.c b/ppp.c
index 9369aa02b0e12328e3bee55ee458d251fad43722..ceab0485da44dc25361679364e647ed70aed7dd7 100644 (file)
--- a/ppp.c
+++ b/ppp.c
@@ -109,7 +109,7 @@ static int unhdlc_in_place(struct openconnect_info *vpninfo, unsigned char *byte
        if (*inp == 0x7e)
                inp++;
        else
-               vpn_progress(vpninfo, PRG_DEBUG,
+               vpn_progress(vpninfo, PRG_TRACE,
                             _("HDLC initial flag sequence (0x7e) is missing\n"));
 
        for (; inp < endp; inp++) {
@@ -408,9 +408,10 @@ static int handle_config_request(struct openconnect_info *vpninfo,
                        vpn_progress(vpninfo, PRG_DEBUG,
                                     _("Received deprecated IP-Addresses from server, ignoring\n"));
                        break;
-               case PROTO_TAG_LEN(PPP_IPCP, IPCP_IPCOMP, 2):
+               case PROTO_TAG_LEN(PPP_IPCP, IPCP_IPCOMP, 4):
                        if (load_be16(p+2) == 0x002d) {
-                               /* Van Jacobson TCP/IP compression */
+                               /* Van Jacobson TCP/IP compression. Includes an
+                                * additional 2 payload bytes (Max-Slot-Id, Comp-Slot-Id) */
                                vpn_progress(vpninfo, PRG_DEBUG,
                                             _("Received Van Jacobson TCP/IP compression from server\n"));
                                /* No. Just no. */