I have to access one Juniper gateway which has terribly high latency and drops my connection frequently. The authentication process in particular is agonizingly slow, and I realized that this was largely because the current implementation uses "Connection: close" on all HTTP requests. After some investigation, this appears to be unnecessary except in the *very last* HTTP request sent prior to converting the TLS socket from HTTP to the oNCP tunnel. It also appears that the first of the two oNCP "negotiation requests" is unnecessary, with at least two different Juniper server versions (NCP-Version 2 and 3) and both with and without ESP enabled. It'd be great if others can test these patches and verify that they can still reliably connect to Juniper VPNs with them. Thanks, Dan Daniel Lenski (2): Reduce unnecessary connection-rebuilding for Juniper Remove first oNCP negotiation request (only second is necessary) auth-juniper.c | 1 - oncp.c | 52 +++++++--------------------------------------------- 2 files changed, 7 insertions(+), 46 deletions(-) -- 2.7.4