<div dir="ltr"><div>Hey,</div><div><br></div><div>I suspect there is a bug here:</div><div><a href="https://github.com/strongswan/strongswan/blob/master/src/libcharon/sa/ike_sa_manager.c#L1849">https://github.com/strongswan/strongswan/blob/master/src/libcharon/sa/ike_sa_manager.c#L1849</a><br></div><div><br></div><div>If UNIQUE_REPLACE is set, and strongswan is initiating an IKE_SA, and in parallel a peer-initiated IKE_SA gets established, then the code pointed at will not abort the in-progress negotiation (because its state is not ESTABLISHED).</div><div><br></div><div>Combine this with the behavior that when an initiate times out (after enough retransmits) it automatically starts retransmitting, and you get an infinite loop of initiation attempts.</div><div><br></div><div>What is the logic in placing only some of the states here?</div><div><br></div><div>Noam</div><div><div><br></div></div></div>