diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-10-16 23:27:44 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-10-16 23:27:44 +0000 |
commit | efe0bea5b5672c28e3cbea655d52b4aed7111193 (patch) | |
tree | d1f7f00e1d8d7c74a22fa1aa4a0545fe76d079ee /sbin | |
parent | a5179a8b5d13d81a7c50628a1fb8f127c75e7ab7 (diff) |
Merge with EOM 1.110
author: provos
better referencing. okay niklas@
author: niklas
Allow new and old style configuration simultaneously
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/isakmpd/sa.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/sbin/isakmpd/sa.c b/sbin/isakmpd/sa.c index b5b99458117..94bedf804fd 100644 --- a/sbin/isakmpd/sa.c +++ b/sbin/isakmpd/sa.c @@ -1,5 +1,5 @@ -/* $OpenBSD: sa.c,v 1.31 2000/08/03 07:28:44 niklas Exp $ */ -/* $EOM: sa.c,v 1.108 2000/08/03 07:22:29 niklas Exp $ */ +/* $OpenBSD: sa.c,v 1.32 2000/10/16 23:27:43 niklas Exp $ */ +/* $EOM: sa.c,v 1.110 2000/10/16 18:16:59 provos Exp $ */ /* * Copyright (c) 1998, 1999, 2000 Niklas Hallqvist. All rights reserved. @@ -437,9 +437,17 @@ void sa_free (struct sa *sa) { if (sa->death) - timer_remove_event (sa->death); + { + timer_remove_event (sa->death); + sa->death = 0; + sa->refcnt--; + } if (sa->soft_death) - timer_remove_event (sa->soft_death); + { + timer_remove_event (sa->soft_death); + sa->soft_death = 0; + sa->refcnt--; + } sa_free_aux (sa); } @@ -639,6 +647,8 @@ sa_soft_expire (void *v_sa) * happen as soon as it is shown to be alive. */ sa->flags |= SA_FLAG_FADING; + + sa_release (sa); } /* SA has passed its best before date. */ @@ -666,7 +676,9 @@ sa_flag (char *attr) char *name; int flag; } sa_flag_map[] = { - { "active-only", SA_FLAG_ACTIVE_ONLY } + { "active-only", SA_FLAG_ACTIVE_ONLY }, + /* Below this point are flags that are internal to the implementation. */ + { "__ondemand", SA_FLAG_ONDEMAND } }; int i; @@ -724,6 +736,7 @@ sa_setup_expirations (struct sa *sa) sa_delete (sa, 1); return -1; } + sa_reference (sa); } if (!sa->death) @@ -741,6 +754,7 @@ sa_setup_expirations (struct sa *sa) sa_delete (sa, 1); return -1; } + sa_reference (sa); } return 0; } |