]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
controller: Ignore log messages unrelated to IKE_SA affected by a command
authorTobias Brunner <tobias@strongswan.org>
Wed, 19 Apr 2023 14:17:18 +0000 (16:17 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 27 Apr 2023 11:52:34 +0000 (13:52 +0200)
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.

src/libcharon/control/controller.c

index 1906a09b69d1b9c2294f7e0a64e47ff1cb3b7664..44e984b5fdc3f376d1ed8abf262d8c056711ebac 100644 (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))
                {