1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Change SA's state before sending SADB_EXPIRE message. This state will

be reported to keying daemon.

MFC after:	2 weeks
This commit is contained in:
Andrey V. Elsukov 2015-05-19 08:37:03 +00:00
parent 664802113f
commit 5bae2b34a4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=283102

View File

@ -4283,8 +4283,8 @@ key_flush_sad(time_t now)
if (sav->lft_h->addtime != 0 &&
now - sav->created > sav->lft_h->addtime) {
key_expire(sav, 1);
key_sa_chgstate(sav, SADB_SASTATE_DEAD);
key_expire(sav, 1);
KEY_FREESAV(&sav);
}
#if 0 /* XXX Should we keep to send expire message until HARD lifetime ? */
@ -4306,8 +4306,8 @@ key_flush_sad(time_t now)
/* check HARD lifetime by bytes */
else if (sav->lft_h->bytes != 0 &&
sav->lft_h->bytes < sav->lft_c->bytes) {
key_expire(sav, 1);
key_sa_chgstate(sav, SADB_SASTATE_DEAD);
key_expire(sav, 1);
KEY_FREESAV(&sav);
}
}