<div dir="ltr">I've seen it only once.  Normally what happens is:<div><br></div><div><div>- the state machine assigns the IKE_AUTH request's Message ID to the IKE SA<br></div><div>- the CHILD SA is created</div><div>- the IKE AUTH Message ID is switched to the child</div><div>- <a href="http://MD.ST">MD.ST</a> is switched to the child</div><div>- a message is recorded</div><div>- the STF_OK (and STF_FAIL) sends the message; and at the same time checks all is consistent</div><div><br></div></div><div>However, here what happens is some variation on:</div><div><br></div><div><div>- the state machine assigns the IKE_AUTH request's Message ID to the IKE SA</div><div>- the CHILD SA is created</div><div>- the IKE AUTH Message ID is switched to the child</div><div>- something goes wrong and the OE code records AUTHENTICATION_FAILED and returns STF_FAIL</div><div><br></div><div>since <a href="http://MD.ST">MD.ST</a> and the Message ID aren't consistent, there's a pexpect() (a variation is switch both the Message ID and <a href="http://MD.ST">MD.ST</a>, only for the error code to switch back <a href="http://MD.ST">MD.ST</a> and delete the child ....)</div><div><br></div><div>The "fix" is to pair up the <a href="http://MD.ST">MD.ST</a> and Message ID switching code - more shuffling ....</div><div><br></div><div>(however, all this shuffling seems wrong)</div><div><br></div></div></div>