diff options
author | Niels Provos <provos@cvs.openbsd.org> | 2000-12-15 06:24:04 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 2000-12-15 06:24:04 +0000 |
commit | 68fb1c4233a616bcb4d96afef2d345ea4752e9ac (patch) | |
tree | c1226cf44156611b1d2aeae1c52cb9dbd06e321f | |
parent | abcfe0854feca62812f39cc9608dd7bdc53c9bc0 (diff) |
send expire messages also for sa's that do not have been used.
okay angelos@
-rw-r--r-- | sys/netinet/ip_ipsp.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c index e949ccece06..ed7be168d5b 100644 --- a/sys/netinet/ip_ipsp.c +++ b/sys/netinet/ip_ipsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.c,v 1.101 2000/09/19 08:38:59 angelos Exp $ */ +/* $OpenBSD: ip_ipsp.c,v 1.102 2000/12/15 06:24:03 provos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -451,11 +451,8 @@ handle_expirations(void *arg) if ((tdb->tdb_flags & TDBF_TIMER) && (tdb->tdb_exp_timeout <= time.tv_sec)) { - /* - * If it's an "invalid" TDB or one that hasn't been used - * before, do a silent expiration. - */ - if ((!(tdb->tdb_flags & TDBF_INVALID)) && tdb->tdb_first_use) + /* If it's an "invalid" TDB do a silent expiration. */ + if (!(tdb->tdb_flags & TDBF_INVALID)) pfkeyv2_expire(tdb, SADB_EXT_LIFETIME_HARD); tdb_delete(tdb, 0); continue; @@ -475,9 +472,7 @@ handle_expirations(void *arg) if ((tdb->tdb_flags & TDBF_SOFT_TIMER) && (tdb->tdb_soft_timeout <= time.tv_sec)) { - /* If the TDB hasn't been used, don't renew it */ - if (tdb->tdb_first_use != 0) - pfkeyv2_expire(tdb, SADB_EXT_LIFETIME_SOFT); + pfkeyv2_expire(tdb, SADB_EXT_LIFETIME_SOFT); tdb->tdb_flags &= ~TDBF_SOFT_TIMER; tdb_expiration(tdb, TDBEXP_EARLY); } |