[Openswan dev] [Pluto][Bug #560] Memory leak fixes

Ilia Sotnikov hostcc at gmail.com
Wed Mar 22 15:00:30 CET 2006

On 3/21/06, Michael Richardson <mcr at sandelman.ottawa.on.ca> wrote:
>     Ilia> It was really interesting challenge ;) More serious questions is
>     Ilia> the missing perform_dh() implementation I mentioned before. Perhaps
>     Ilia> we should handle DH continuation correctly (the fix is only a
>     Ilia> workaround, not a final solution)?
>   Not having access to your patch (on airplane), I'm not sure I understand
> what you are asking.  There are aspects of pluto's cryptographic code which
> are not yet "offloaded" to the cryptographic helpers.
>   Are you trying to accomplish this?

I meant that when someone sees the allocation of DH continuation
structure he could logically suppose that OpenS/WAN will use it then
(in other words, handle DH continuation).
And it's obvious that if he wouldn't find such a call it would be
suspicious (in terms of programming).

In other words, if OpenS/WAN currently doesn't handle DH continuation
then we shouldn't allocate the structure. Otherwise we should use the
structure somehow, perhaps implementing the missing function
perform_dh() which takes the pointer to such a structure.
For the simplicity the patch uses the former  way
(allocate-then-free-immediately the DH continuation structure).

Please understand me correctly that I'm not debating about the quality
of the code, I'm trying to discuss both workaround and long-term

 Ilia Sotnikov

More information about the Dev mailing list