ikev2: cleanup stuck sessions 68/39268/2
authorDenys Haryachyy <garyachy@users.noreply.github.com>
Wed, 12 Jul 2023 14:32:55 +0000 (17:32 +0300)
committerBeno�t Ganne <bganne@cisco.com>
Thu, 27 Jul 2023 07:45:01 +0000 (07:45 +0000)
commit2652867480a185ccdeccf9ca9210a1213b82cf26
tree6c629448804ce1381f57896dec0b995b3dca7e81
parent0eff4e722c8565aebf8f004a30c73a64b0b921e4
ikev2: cleanup stuck sessions

The following issues are fixed:
* in responder code: do lookup again as the old pointer could be
  invalidated during the cleanup operation
* in initiar code: do the cleanup of session if there're no child SAs or
  if there's no response from the responder during initial request (this
  can easily happen if the response packet was lost/dropped/etc)
* print the state of ikev2 profile (for easier tshooting)

Type: fix

Change-Id: I853d9851c0cf131696585e3c98fa97e66789badd
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
src/plugins/ikev2/ikev2.c
src/plugins/ikev2/ikev2_cli.c
src/plugins/ikev2/ikev2_priv.h