if (notify && notify->get_notify_message_type(notify) == REKEY_SA)
{
- this->old_child_sa = this->ike_sa->get_child_sa(this->ike_sa, notify->get_spi(notify));
+ u_int32_t spi = notify->get_spi(notify);
+ this->old_child_sa = this->ike_sa->get_child_sa(this->ike_sa, spi);
+ this->logger->log(this->logger, CONTROL, "Rekeying CHILD_SA with SPI 0x%x", spi);
+ }
+ else
+ {
+ this->logger->log(this->logger, CONTROL, "Create new CHILD_SA");
}
/* build response */
}
if (this->old_child_sa)
{ /* mark old child sa as rekeyed */
- this->old_child_sa->set_rekeyed(this->old_child_sa, this->child_sa->get_reqid(this->child_sa));
+ this->old_child_sa->set_rekeyed(this->old_child_sa);
}
this->ike_sa->add_child_sa(this->ike_sa, this->child_sa);
}