It is not entirely obvious if some logic was forgotten or if that variable
was added for debug logging or... Be that as it may, as tobhe points out,
this variable has been unused since the initial import of iked. The logic
seems sound without it, so it has never served a purpose and can go.
ok tobhe
-/* $OpenBSD: ikev2.c,v 1.361 2022/12/06 09:07:33 tobhe Exp $ */
+/* $OpenBSD: ikev2.c,v 1.362 2023/02/08 20:10:34 tb Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
uint64_t spi64, spi = 0;
uint32_t spi32;
uint8_t *buf;
- size_t found = 0, failed = 0;
+ size_t found = 0;
int ret = -1;
size_t i, sz, cnt, len;
}
if (ikev2_childsa_delete(env, sa, msg->msg_del_protoid, spi,
- &localspi[i], 0) == -1)
- failed++;
- else {
+ &localspi[i], 0) != -1) {
found++;
/* append SPI to log buffer */