From 7c586ff4367c535aa61cbb785361d76991ab05c9 Mon Sep 17 00:00:00 2001 From: tobhe Date: Fri, 26 Nov 2021 14:05:01 +0000 Subject: [PATCH] Fix ikev2_child_sa_rekey() warnings. The SPI can't be printed without a parent SA. --- sbin/iked/ikev2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c index edc5c3fd067..18c4f29b10d 100644 --- a/sbin/iked/ikev2.c +++ b/sbin/iked/ikev2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2.c,v 1.335 2021/11/24 20:48:00 tobhe Exp $ */ +/* $OpenBSD: ikev2.c,v 1.336 2021/11/26 14:05:01 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider @@ -6574,12 +6574,12 @@ ikev2_child_sa_rekey(struct iked *env, struct iked_spi *rekey) if (csa->csa_rekey) /* See if it's already taken care of */ return (0); if ((sa = csa->csa_ikesa) == NULL) { - log_warnx("%s: not established, SPI %s", SPI_SA(sa, __func__), + log_warnx("%s: SA %s doesn't have a parent SA", __func__, print_spi(rekey->spi, rekey->spi_size)); return (0); } if (!sa_stateok(sa, IKEV2_STATE_ESTABLISHED)) { - log_warnx("%s: SA %s is not established", __func__, + log_warnx("%s: not established, SPI %s", SPI_SA(sa, __func__), print_spi(rekey->spi, rekey->spi_size)); return (0); } -- 2.20.1