Is there a problem connecting a client running 2.1.4 (the one with polarssl) to 
a server running 2.0.9?

How would the flow typically be?
I see client sending P_CONTROL_HARD_RESET_CLIENT_V2, and then immediately 
starts the ssl session (which writes the client hello, but fails to read the 
server hello).
Shouldn't it be that after sending the P_CONTROL_HARD_RESET_CLIENT_V2 the 
client will need to wait for P_CONTROL_HARD_RESET_SERVER_V2?
I do see the P_CONTROL_HARD_RESET_SERVER_V2 comes after some time, but there is 
always an attempt to start the ssl session from the client side.

Thanks

-----Original Message-----
From: Tiran Kaskas [mailto:tiran.kas...@telit.com] 
Sent: Monday, December 12, 2011 9:42 AM
To: Fabian Knittel
Cc: openvpn-devel@lists.sourceforge.net
Subject: Re: [Openvpn-devel] Problem with alloc_buf_gc function

You are right, I somehow mixed the data ptr with the struct copy by value.
I do have a problem with returning structures with my 16 bit machine, seems 
some of the data not being copied (probably need to define far segment).

-----Original Message-----
From: Fabian Knittel [mailto:fabian.knit...@avona.com] 
Sent: Monday, December 12, 2011 12:11 AM
To: Tiran Kaskas
Cc: openvpn-devel@lists.sourceforge.net
Subject: Re: [Openvpn-devel] Problem with alloc_buf_gc function

Hi Tiran,

Am 11.12.2011 21:57, schrieb Tiran Kaskas:
> Looking into the function alloc_buf_gc() in file buffer.c, it returns 
> a struct buffer, which seems to me is allocated on the stack, which is 
> causing an issue, I believe, since the function calling alloc_buf_gc() 
> will work on a buffer which becomes garbage.

'alloc_buf_gc()' is returning 'buf' (of type 'struct buffer') by value, not by 
pointer, so there is no problem here.  If it were returning 'buf'
by pointer your observation would be correct.  (In C++ a typical mistake would 
be to return 'buf' by reference.)

The function calling 'alloc_buf_gc()' will copy the contents of 'buf' to its 
local instance of 'struct buffer' before continuing.  (An optimised build might 
even eliminate the copy.)

Are you observing a specific problem with buffers or did you just happen to 
stumble over this piece of code?

Cheers
Fabian

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to