[strongSwan] Setting the source address on outgoing packets does not work (patch)
andi at collax.com
Fri Nov 6 14:00:38 CET 2015
Setting the source address on outgoing packets does not work, which in
my case broke connection establishment with multi path routing.
A buffer to hold the ancillary data (the source address) for the packet
is defined within the scope of an 'if' block and the address of that
buffer is stored in the message structure defined outside the block.
But variable defined in an inner scope are only accessible within that
scope, thus what happens to the storage space allocated for the buffer
When compiling with GCC and without optimization, setting the address
does work (by accident, I assume), but with any optimization enabled,
GCC will happily eliminate most of the 'if' block.
Defining the data buffer in the same scope as the message structure does
fix the problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1760 bytes
Desc: not available
More information about the Users