summaryrefslogtreecommitdiff
path: root/sbin/ipsec
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1997-09-03 08:44:43 +0000
committerNiels Provos <provos@cvs.openbsd.org>1997-09-03 08:44:43 +0000
commit06214b27b02b4ae62074356b2e0a20a283eb23c3 (patch)
treecb7ebdd0f16cccf986dc8bce2d5c872ac9f889a6 /sbin/ipsec
parent1bc08f4d7a40a5f565e5e5408144282e954a17c9 (diff)
forgot a state_insert, handling resource limit messages should work now!
Diffstat (limited to 'sbin/ipsec')
-rw-r--r--sbin/ipsec/photurisd/Makefile4
-rw-r--r--sbin/ipsec/photurisd/errlog.c24
-rw-r--r--sbin/ipsec/photurisd/schedule.c3
-rw-r--r--sbin/ipsec/photurisd/state.c2
4 files changed, 7 insertions, 26 deletions
diff --git a/sbin/ipsec/photurisd/Makefile b/sbin/ipsec/photurisd/Makefile
index c3f144300c8..c12737427a3 100644
--- a/sbin/ipsec/photurisd/Makefile
+++ b/sbin/ipsec/photurisd/Makefile
@@ -16,8 +16,8 @@ SRCS= photuris_cookie_request.c photuris_cookie_response.c \
modulus.c spi.c state.c validity.c attributes.c \
photurisd.c packet.c api.c kernel.c
-#CFLAGS+= -g -I. -DDEBUG -DIPSEC
-CFLAGS+= -I. -DIPSEC
+CFLAGS+= -Wall -g -I. -DDEBUG -DIPSEC
+#CFLAGS+= -I. -DIPSEC
MAN= photurisd.1
.include <bsd.prog.mk>
diff --git a/sbin/ipsec/photurisd/errlog.c b/sbin/ipsec/photurisd/errlog.c
index 174bbf3e352..29415299a67 100644
--- a/sbin/ipsec/photurisd/errlog.c
+++ b/sbin/ipsec/photurisd/errlog.c
@@ -31,31 +31,11 @@
*/
/*
- * $Header: /cvs/OpenBSD/src/sbin/ipsec/photurisd/Attic/errlog.c,v 1.4 1997/08/24 18:30:33 millert Exp $
- *
- * $Author: millert $
- *
- * $Log: errlog.c,v $
- * Revision 1.4 1997/08/24 18:30:33 millert
- * #include <string.h> for strlen().
- *
- * Revision 1.3 1997/07/25 19:13:20 mickey
- * #if __STDC__ --> #ifdef __STDC__
- *
- * Revision 1.2 1997/07/23 12:28:47 provos
- * tunnel,lifetimes,hostname via startkey/startup
- * errors to stderr before daemon, to syslog afterwards
- *
- * Revision 1.1.1.1 1997/07/18 22:48:49 provos
- * initial import of the photuris keymanagement daemon
- *
- * Revision 1.1 1997/05/22 17:34:16 provos
- * Initial revision
- *
+ * $OpenBSD: errlog.c,v 1.5 1997/09/03 08:44:41 provos Exp $
*/
#ifndef lint
-static char rcsid[] = "$Id: errlog.c,v 1.4 1997/08/24 18:30:33 millert Exp $";
+static char rcsid[] = "$Id: errlog.c,v 1.5 1997/09/03 08:44:41 provos Exp $";
#endif
#define _ERRLOG_C_
diff --git a/sbin/ipsec/photurisd/schedule.c b/sbin/ipsec/photurisd/schedule.c
index 84ea933f34a..a5a1f89afda 100644
--- a/sbin/ipsec/photurisd/schedule.c
+++ b/sbin/ipsec/photurisd/schedule.c
@@ -35,7 +35,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: schedule.c,v 1.4 1997/09/02 17:26:46 provos Exp $";
+static char rcsid[] = "$Id: schedule.c,v 1.5 1997/09/03 08:44:41 provos Exp $";
#endif
#define _SCHEDULE_C_
@@ -246,6 +246,7 @@ schedule_process(int sock)
"counter.\n", newst->address, newst->port);
#endif /* DEBUG */
start_exchange(sock, newst, st->address, st->port);
+ state_insert(newst);
break;
} else {
log_error(0, "exchange terminated, phase %d to %s:%d",
diff --git a/sbin/ipsec/photurisd/state.c b/sbin/ipsec/photurisd/state.c
index 5b45ef9d7a4..7a8d63dbe81 100644
--- a/sbin/ipsec/photurisd/state.c
+++ b/sbin/ipsec/photurisd/state.c
@@ -282,7 +282,7 @@ state_expire(void)
tm = time(NULL);
while (tmp != NULL) {
- if (tmp->retries < max_retries &&
+ if ((tmp->retries < max_retries || tmp->resource) &&
(tmp->lifetime == -1 || tmp->lifetime > tm)) {
tmp = tmp->next;
continue;