diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-29 01:19:38 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-29 01:19:38 +0000 |
commit | f10250830efbc5629cd45e21caff60f08b8158e1 (patch) | |
tree | 8504f184c4fd19d2a542b9e71b3188b39ce3941b | |
parent | d429c5c11b255d8c6d79d779141e53f33d40d03f (diff) |
Record last use time for SAs.
-rw-r--r-- | sys/netinet/ipsec_input.c | 4 | ||||
-rw-r--r-- | sys/netinet/ipsec_output.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c index 11fa75441ba..d6eaf8ebe66 100644 --- a/sys/netinet/ipsec_input.c +++ b/sys/netinet/ipsec_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_input.c,v 1.40 2001/05/27 03:49:14 angelos Exp $ */ +/* $OpenBSD: ipsec_input.c,v 1.41 2001/05/29 01:19:37 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -268,6 +268,8 @@ ipsec_common_input_cb(struct mbuf *m, struct tdb *tdbp, int skip, int protoff, af = tdbp->tdb_dst.sa.sa_family; sproto = tdbp->tdb_sproto; + tdbp->tdb_last_used = time.tv_sec; + /* Sanity check */ if (m == NULL) { diff --git a/sys/netinet/ipsec_output.c b/sys/netinet/ipsec_output.c index 26dafffce9e..f613e32c475 100644 --- a/sys/netinet/ipsec_output.c +++ b/sys/netinet/ipsec_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_output.c,v 1.11 2001/05/28 05:30:29 angelos Exp $ */ +/* $OpenBSD: ipsec_output.c,v 1.12 2001/05/29 01:19:37 angelos Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) @@ -294,6 +294,8 @@ ipsp_process_done(struct mbuf *m, struct tdb *tdb, struct tdb *tdb2) struct tdb_ident *tdbi; struct m_tag *mtag; + tdb->tdb_last_used = time.tv_sec; + switch (tdb->tdb_dst.sa.sa_family) { #ifdef INET |