From 766b80be3e4beddda92a8835ad57042f38c1d941 Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Mon, 18 May 1998 21:25:42 +0000 Subject: support kernel notifies for setsockopt/getsockopt interface and fix various small bugs. --- sbin/ipsec/photurisd/handle_identity_request.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sbin/ipsec/photurisd/handle_identity_request.c') 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 + * Copyright 1997,1998 Niels Provos * 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 @@ -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 } -- cgit v1.2.3