From: Tobias Brunner Date: Wed, 19 Apr 2023 14:17:18 +0000 (+0200) Subject: controller: Ignore log messages unrelated to IKE_SA affected by a command X-Git-Tag: 5.9.11rc1~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77b9f3abb0cf644fdc3d25cff482e8ed97661dc3;p=thirdparty%2Fstrongswan.git controller: Ignore log messages unrelated to IKE_SA affected by a command Until we know which IKE_SA is affected by an initiate() or terminate_*() command, unrelated log messages that don't have any IKE context (i.e. the passed `ike_sa` is NULL) would previously get logged. --- diff --git a/src/libcharon/control/controller.c b/src/libcharon/control/controller.c index 1906a09b69..44e984b5fd 100644 --- a/src/libcharon/control/controller.c +++ b/src/libcharon/control/controller.c @@ -228,7 +228,7 @@ METHOD(logger_t, listener_log, void, target = this->listener->ike_sa; this->listener->lock->unlock(this->listener->lock); - if (target == ike_sa) + if (target && target == ike_sa) { if (!this->callback(this->param, group, level, ike_sa, message)) {