On 2015-10-30 20:27, Maxime Bizon wrote:
not to mention that max buf size is dynamic (it depends on address
family)
You're right. Somehow I have completely overlooked the possibility of
two buffers coexisting at the same time.
Just for fun I've tried to untangle all the ifdefs and factored the code
out into three separate functions. This way it's a bit easier to follow
at a slight cost SLOC-wise. Have a look:
https://github.com/dmsh/strongswan/tree/draft/socket-default-refactoring
Caveat: it compiles on linux, but I haven't done any testing.
_______________________________________________
Dev mailing list
[email protected]
https://lists.strongswan.org/mailman/listinfo/dev