Cperello/ipsec fixes

Fixes Ticket #6672 from trac