Hi! Great stuff, can't wait to use it!
André On 27.03.2014 09:57, Lev Stipakov wrote: > Hi, > > Same patch with added NULL check in push.c:308. Turns out that > peer_info might be NULL. > > -Lev > > On Wed, Mar 26, 2014 at 10:52 AM, Lev Stipakov <lstipa...@gmail.com> wrote: >> Hello, >> >> Despite that implementation of session-id has already been discussed, >> I would like to propose an alternative approach. >> >> I suggest to use an array of multi_instance objects and session-id as >> an item's index in that array. Why I think it is a good idea? >> >> 1) We could utilize less bytes for session-id, since array's max >> length would be equal to max_clients. 3 bytes for a max of 2**24 >> clients, no need to swap one byte to the end of packet. >> >> [op][s1][s2][s3][data] >> >> 2) Lookup in array is faster than lookup by 8-byte session-id in >> hashtable and happens with constant speed. >> >> 3) Proof of concept is attached! >> >> I have tested it with openvpn master branch (server) and ics-openvpn >> (android) - merged without any conflicts and works nicely. Of course >> it supports also peers without session-id support. >> >> This patch solves 2 issues for mobile clients: >> >> 1) UDP NAT timeout. After, say, 30, seconds router might close UDP >> socket and new packet from client to VPN server originates from >> different port. Lookup by peer address fails and packet got dropped. >> Currently this is solved by small keep-alive interval, which drains >> battery. With new implementation it is not an issue anymore since >> lookup is done by session-id, therefore keep-alive interval can be >> increased. >> >> 2) Transition between networks (for example WiFi->3G). Without >> session-id client got disconnected. With this patch and >> http://code.google.com/p/ics-openvpn/source/detail?r=bc9f3f448b9a4d95c999d3e582987840ba1e0fbf >> transition happens seamlessly. >> >> I would love to hear any critics / comments! >> >> -- >> -Lev > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Openvpn-devel mailing list > Openvpn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-devel