This avoids us ending up in state RUN with no keys and no key
initiation attempt, which with keepalive is a forbidden.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
case LABEL_MSG7:
/* We must forget about the current session. */
delete_keys(st,"request from peer",LOG_SEC);
+ /* probably, the peer is shutting down, and this is going to fail,
+ * but we need to be trying to bring the link up again */
+ if (st->keepalive)
+ initiate_key_setup(st,"peer requested key teardown",0);
return True;
case LABEL_MSG9:
/* Deliver to netlink layer */