]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
relax requirements for Juniper hostname packet response
authorDaniel Lenski <dlenski@gmail.com>
Wed, 14 Jun 2017 22:54:56 +0000 (15:54 -0700)
committerDavid Woodhouse <dwmw2@infradead.org>
Mon, 14 Aug 2017 14:27:18 +0000 (15:27 +0100)
commit342a85bf8b49165dddeb679a1d4abd55afca89e3
tree2c464cafb6b6c975a28e33d37be10624c3dc9683
parent76583bb434198dd35195a6a0a13bba15ac2e84c6
relax requirements for Juniper hostname packet response

This fixes the "Unexpected response of size 3 after hostname packet" or "Invalid packet waiting for KMP 301" errors
which I get intermittently when connecting to an old Juniper NC server:

    $ openconnect --prot=nc -vvvv
    ...
    NCP-Version: 2
    ...
    > 0000: 18 00 00 04 00 00 00 0c 00 64 65 61 64 62 65 65
    > 0010: 66 2d 31 32 33 bb 01 00 00 00 00
    Read 3 bytes of SSL record
    < 0000: d2 01 00
    Read 465 bytes of SSL record

Here's what is going on: this server is (sometimes) concatenating the 3-byte
response packet together with the longer IP-configuration packet that
follows.  When they are concatenated together, the server sends only a
single 2-byte length prefix for both (0x01d2 = 466).

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
oncp.c