summaryrefslogtreecommitdiff
path: root/sbin/ipsec/photurisd/handle_identity_request.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1998-05-18 21:25:42 +0000
committerNiels Provos <provos@cvs.openbsd.org>1998-05-18 21:25:42 +0000
commit766b80be3e4beddda92a8835ad57042f38c1d941 (patch)
tree780da7aa6e314d6555e39c2e9bcffa81f3cca7d8 /sbin/ipsec/photurisd/handle_identity_request.c
parent36901152f2c312784811a6f7594f0612b974f4db (diff)
support kernel notifies for setsockopt/getsockopt interface and fix various
small bugs.
Diffstat (limited to 'sbin/ipsec/photurisd/handle_identity_request.c')
-rw-r--r--sbin/ipsec/photurisd/handle_identity_request.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/ipsec/photurisd/handle_identity_request.c b/sbin/ipsec/photurisd/handle_identity_request.c
index fee093ad3e5..73d1affc8e9 100644
--- a/sbin/ipsec/photurisd/handle_identity_request.c
+++ b/sbin/ipsec/photurisd/handle_identity_request.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
+ * Copyright 1997,1998 Niels Provos <provos@physnet.uni-hamburg.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,7 +34,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: handle_identity_request.c,v 1.5 1998/03/04 11:43:20 provos Exp $";
+static char rcsid[] = "$Id: handle_identity_request.c,v 1.6 1998/05/18 21:25:23 provos Exp $";
#endif
#include <stdio.h>
@@ -296,7 +296,7 @@ handle_identity_request(u_char *packet, int size, char *address,
spi_insert(spi);
#ifdef IPSEC
- kernel_insert_spi(spi);
+ kernel_insert_spi(st, spi);
#endif
schedule_insert(UPDATE, st->olifetime/2, spi->SPI, SPI_SIZE);
}
@@ -311,6 +311,7 @@ handle_identity_request(u_char *packet, int size, char *address,
log_error(1, "strdup() in handle_identity_request()");
return -1;
}
+ spi->flags |= st->flags & IPSEC_NOTIFY ? SPI_NOTIFY : 0;
bcopy(st->icookie, spi->icookie, COOKIE_SIZE);
spi->attribsize = st->uSPIattribsize;
spi->attributes = calloc(spi->attribsize, sizeof(u_int8_t));
@@ -331,7 +332,7 @@ handle_identity_request(u_char *packet, int size, char *address,
spi_insert(spi);
#ifdef IPSEC
- kernel_insert_spi(spi);
+ kernel_insert_spi(st, spi);
#endif
}