diff options
author | Niels Provos <provos@cvs.openbsd.org> | 2000-12-11 21:21:19 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 2000-12-11 21:21:19 +0000 |
commit | 7c0703b2a547d65ce1921ec3adeb6cb277f5f35a (patch) | |
tree | ee72ca9953ddcde25be632639bb3242cac086577 /sbin/photurisd/handle_spi_update.c | |
parent | cd40f5ad40cd4912648f1cb155bf3167202ddc89 (diff) |
proper logging.
Diffstat (limited to 'sbin/photurisd/handle_spi_update.c')
-rw-r--r-- | sbin/photurisd/handle_spi_update.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sbin/photurisd/handle_spi_update.c b/sbin/photurisd/handle_spi_update.c index 401d8f808d0..6fc1ed8df79 100644 --- a/sbin/photurisd/handle_spi_update.c +++ b/sbin/photurisd/handle_spi_update.c @@ -34,7 +34,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: handle_spi_update.c,v 1.3 2000/12/11 20:32:15 provos Exp $"; +static char rcsid[] = "$Id: handle_spi_update.c,v 1.4 2000/12/11 21:21:17 provos Exp $"; #endif #include <stdio.h> @@ -53,7 +53,7 @@ static char rcsid[] = "$Id: handle_spi_update.c,v 1.3 2000/12/11 20:32:15 provos #include "secrets.h" #include "schedule.h" #include "scheme.h" -#include "errlog.h" +#include "log.h" #include "spi.h" #ifdef IPSEC #include "kernel.h" @@ -101,19 +101,19 @@ handle_spi_update(u_char *packet, int size, char *address, /* Decrypt message */ tmp = size - SPI_UPDATE_MIN; if (packet_decrypt(st, SPI_UPDATE_VERIFICATION(header), &tmp) == -1) { - log_error(0, "packet_decrypt() in handle_spi_update()"); + log_print("packet_decrypt() in handle_spi_update()"); goto verification_failed; } /* Verify message structure*/ if (packet_check((u_int8_t *)header, size - packet[size-1], &spi_msg) == -1) { - log_error(0, "bad packet structure in handle_spi_update()"); + log_print("bad packet structure in handle_spi_update()"); return -1; } i = get_validity_verification_size(st); if (!i || i != parts[0].size || i > sizeof(signature)) { - log_error(0, "verification size mismatch in handle_spi_update()"); + log_print("verification size mismatch in handle_spi_update()"); goto verification_failed; } bcopy(parts[0].where, signature, i); @@ -123,13 +123,13 @@ handle_spi_update(u_char *packet, int size, char *address, if (!isattribsubset(st->oSPIoattrib,st->oSPIoattribsize, attributes, attribsize)) { - log_error(0, "attributes are not a subset in handle_spi_update()"); + log_print("attributes are not a subset in handle_spi_update()"); return 0; } if (!verify_validity_verification(st, signature, packet, size)) { verification_failed: - log_error(0, "verification failed in handle_spi_update()"); + log_print("verification failed in handle_spi_update()"); packet_size = PACKET_BUFFER_SIZE; photuris_error_message(st, packet_buffer, &packet_size, header->icookie, header->rcookie, @@ -144,7 +144,7 @@ handle_spi_update(u_char *packet, int size, char *address, if (lifetime == 0) { /* Delete specified security association */ if ((spi = spi_find(st->address, header->SPI)) == NULL) { - log_error(0, "spi_find() in handle_spi_update()"); + log_print("spi_find() in handle_spi_update()"); return -1; } #ifdef IPSEC @@ -159,15 +159,15 @@ handle_spi_update(u_char *packet, int size, char *address, bcopy(header->SPI, st->uSPI, SPI_SIZE); if ((spi = spi_new(st->address, header->SPI)) == NULL) { - log_error(0, "spi_new() in handle_spi_update()"); + log_print("spi_new() in handle_spi_update()"); return -1; } if ((spi->local_address = strdup(local_address)) == NULL) { - log_error(1, "strdup() in handle_spi_update()"); + log_error("strdup() in handle_spi_update()"); return -1; } if((spi->attributes = calloc(attribsize, sizeof(u_int8_t))) == NULL) { - log_error(1, "calloc() in handle_spi_update()"); + log_error("calloc() in handle_spi_update()"); return -1; } spi->flags |= st->flags & IPSEC_NOTIFY ? SPI_NOTIFY : 0; |