Fix for "Connection failed" on slow networks (GPRS, EDGE)
Opened this issue · 0 comments
GoogleCodeExporter commented
Hello,
on my device connect attempts nearly always failed when I was connected to a
slow network. 3G or WLAN worked like a charme.
The error I saw was mainly "Unequal Payload length" or sth. similar.
Taking a closer look at the logs, I discovered that there were some
payload messages resent by the gateway which were out of order for vpnc.
I could avoid this misbehaviour by adding a short delay in the sendrecv()
function:
---------------
if (sendonly)
break;
usleep(200000);
do {
pollresult = poll(&pfd, 1, s->ike.timeout << tries);
} while (pollresult == -1 && errno == EINTR);
---------------
Now I have 95% successful connections instead of 10% :-)
Maybe this will be helpful for others ...
Data transfer via my mobile APN only works with the cisco-udp option.
Some minor changes to vpnc-script were necessary to restore the old network
parameters after terminating VPN. It's almost perfect now :-)
kind regards,
Stefan
Original issue reported on code.google.com by bullipi...@gmail.com
on 9 Mar 2011 at 2:14