]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
kernel-handler: Log security label received with acquire
authorTobias Brunner <tobias@strongswan.org>
Tue, 21 Dec 2021 10:26:12 +0000 (11:26 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 14 Apr 2022 16:42:01 +0000 (18:42 +0200)
src/libcharon/kernel/kernel_handler.c

index 4f467efee9946b34619e9e48b87a1b9b57b5a4bb..2f881d74616471f515e57c76dc2bdd04f5a8d46e 100644 (file)
@@ -55,14 +55,22 @@ static inline protocol_id_t proto_ip2ike(uint8_t protocol)
 METHOD(kernel_listener_t, acquire, bool,
        private_kernel_handler_t *this, uint32_t reqid, kernel_acquire_data_t *data)
 {
+       char buf[BUF_LEN] = "";
+
+       if (data->label)
+       {
+               snprintf(buf, sizeof(buf), ", label {%s}",
+                                data->label->get_string(data->label));
+       }
        if (data->src && data->dst)
        {
                DBG1(DBG_KNL, "creating acquire job for policy %R === %R with "
-                        "reqid {%u}", data->src, data->dst, reqid);
+                        "reqid {%u}%s", data->src, data->dst, reqid, buf);
        }
        else
        {
-               DBG1(DBG_KNL, "creating acquire job for policy with reqid {%u}", reqid);
+               DBG1(DBG_KNL, "creating acquire job for policy with reqid {%u}%s",
+                        reqid, buf);
        }
        lib->processor->queue_job(lib->processor,
                                                          (job_t*)acquire_job_create(reqid, data));