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.
This commit is contained in:
Tobias Brunner
2023-04-27 13:52:34 +02:00
parent 30803f90eb
commit 77b9f3abb0
+1 -1
View File
@@ -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))
{